[ Index ] |
|
Code source de b2evolution 2.1.0-beta |
1 <?php 2 /** 3 * This file implements the UI for file copy / move 4 * 5 * fplanque>> This whole thing is flawed: 6 * 1) only geeks can possibly like to use the same interface for renaming, moving and copying 7 * 2) even the geeky unix commands won't pretend copying and moving are the same thing. They are not! 8 * Only moving and renaming are similar, and again FOR GEEKS ONLY. 9 * 3) The way this works it breaks the File meta data (I'm working on it). 10 * 4) For Move and Copy, this should use a "destination directory tree" on the right (same as for upload) 11 * 5) Given all the reasons above copy, move and rename should be clearly separated into 3 different interfaces. 12 * 13 * This file is part of the evoCore framework - {@link http://evocore.net/} 14 * See also {@link http://sourceforge.net/projects/evocms/}. 15 * 16 * @copyright (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/} 17 * Parts of this file are copyright (c)2004-2006 by Daniel HAHLER - {@link http://thequod.de/contact}. 18 * 19 * {@internal License choice 20 * - If you have received this file as part of a package, please find the license.txt file in 21 * the same folder or the closest folder above for complete license terms. 22 * - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/) 23 * then you must choose one of the following licenses before using the file: 24 * - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php 25 * - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php 26 * }} 27 * 28 * {@internal Open Source relicensing agreement: 29 * Daniel HAHLER grants Francois PLANQUE the right to license 30 * Daniel HAHLER's contributions to this file and the b2evolution project 31 * under any OSI approved OSS license (http://www.opensource.org/licenses/). 32 * }} 33 * 34 * @package admin 35 * 36 * {@internal Below is a list of authors who have contributed to design/coding of this file: }} 37 * @author blueyed: Daniel HAHLER. 38 * @author fplanque: Francois PLANQUE. 39 * 40 * @version $Id: _file_copy_move.form.php,v 1.1 2007/06/25 10:59:58 fplanque Exp $ 41 */ 42 if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' ); 43 44 /** 45 * @global string 46 */ 47 global $fm_mode; 48 49 /** 50 * @global Filelist 51 */ 52 global $fm_source_Filelist; 53 54 /** 55 * @global array 56 */ 57 global $new_names; 58 59 60 $Form = & new Form( NULL, 'fm_copymove_checkchanges' ); 61 62 $Form->global_icon( T_('Quit copy/move mode!'), 'close', regenerate_url('fm_sources,fm_mode') ); 63 64 $Form->begin_form( 'fform', $fm_mode == 'file_copy' ? T_('Copy') : T_('Move') ); 65 66 $Form->hidden_ctrl(); 67 $Form->hiddens_by_key( get_memorized() ); 68 $Form->hidden( 'confirm', 1 ); 69 70 $fm_source_Filelist->restart(); 71 while( $loop_src_File = & $fm_source_Filelist->get_next() ) 72 { 73 $Form->begin_fieldset( T_('Source').': '.$loop_src_File->get_rdfp_rel_path() ); 74 75 if( isset( $overwrite[$loop_src_File->get_md5_ID()] ) ) 76 { 77 $Form->checkbox( 'overwrite['.$loop_src_File->get_md5_ID().']', $overwrite[$loop_src_File->get_md5_ID()], T_('Overwrite'), T_('Check to overwrite the existing file') ); 78 } 79 80 $Form->text( 'new_names['.$loop_src_File->get_md5_ID().']', $new_names[$loop_src_File->get_md5_ID()], 32, 81 T_('New name'), $loop_src_File->dget('title'), 128 ); 82 83 $Form->end_fieldset(); 84 } 85 86 $Form->end_form( array( array( 'submit', 'submit', $fm_mode == 'file_copy' ? T_('Copy') : T_('Move'), 'SaveButton' ), 87 array( 'reset', '', T_('Reset'), 'ResetButton' ) ) ); 88 89 echo '<p class="notes"><strong>'.T_('You are in copy/move mode.') 90 .'</strong> '.T_('Please navigate to the desired target location.').'</p>'; 91 92 /* 93 * $Log: _file_copy_move.form.php,v $ 94 * Revision 1.1 2007/06/25 10:59:58 fplanque 95 * MODULES (refactored MVC) 96 * 97 * Revision 1.7 2007/04/26 00:11:10 fplanque 98 * (c) 2007 99 * 100 * Revision 1.6 2007/01/24 03:45:29 fplanque 101 * decrap / removed a lot of bloat... 102 * 103 * Revision 1.5 2006/11/24 18:27:25 blueyed 104 * Fixed link to b2evo CVS browsing interface in file docblocks 105 */ 106 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Thu Nov 29 23:58:50 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |