[Easymod-cvs] easymod2/mods/easymod/includes admin_easymod.php.txt,1.9,1.10
Status: Beta
Brought to you by:
wgeric
From: Jim W. <ter...@us...> - 2005-05-27 08:11:12
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17992/mods/easymod/includes Modified Files: admin_easymod.php.txt Log Message: - CREATE TABLE queries with INDEXes should now work. - Actions with IN-LINE as a substring now get reported as unprocessed commands as appropriate. - Fixed some random bug introduced in 1.7 of admin_easymod.php.txt. Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** admin_easymod.php.txt 25 May 2005 01:10:50 -0000 1.9 --- admin_easymod.php.txt 27 May 2005 08:10:50 -0000 1.10 *************** *** 1563,1566 **** --- 1563,1567 ---- // a catch all at the end will switch to false if we fail to process $processed = true ; + $bad_command = false; // protect against malformed script that didn't perform a FIND first; this acts as a gatekeeper to ensure *************** *** 1794,1808 **** $result = perform_inline_add( $find_array, $file_list, $search_fragment, $body[$i][0], 'replace') ; } - - // strip off white space and get our search fragment (we already know it is not an empty string) ! if ($commands[$i]['command'] == 'IN-LINE FIND') { $search_fragment = trim($body[$i][0]) ; } // display any errors; if it was critical, terminate processing; if warn, remove file from list // the command will also close the files that we were writing ! else if ( handle_error( $result, $file_list, $commands[$i]['line'], true, $find_array)) { break ; --- 1795,1811 ---- $result = perform_inline_add( $find_array, $file_list, $search_fragment, $body[$i][0], 'replace') ; } // strip off white space and get our search fragment (we already know it is not an empty string) ! else if ($commands[$i]['command'] == 'IN-LINE FIND') { $search_fragment = trim($body[$i][0]) ; } + else + { + $bad_command = true; + } // display any errors; if it was critical, terminate processing; if warn, remove file from list // the command will also close the files that we were writing ! if ( handle_error( $result, $file_list, $commands[$i]['line'], true, $find_array)) { break ; *************** *** 2108,2116 **** $exec_close = true ; } // // where unloved commands go ;-) // ! else { $processed = false ; --- 2111,2123 ---- $exec_close = true ; } + else + { + $bad_command = true; + } // // where unloved commands go ;-) // ! if ($bad_command) { $processed = false ; *************** *** 2841,2845 **** // create the directory before moving files into it ! $command_file->modio_mkdirs_copy(dirname($parms[2])); // now the magic happens ;-) --- 2848,2857 ---- // create the directory before moving files into it ! // could be optimized such that modio_mkdirs_copy is only called once per ! // new directory, as opposed to once per original COPY action, but oh well... ! if ((substr($parms[1],0,9) != "processed") && (substr($parms[1],0,9) != "../../../")) ! { ! $command_file->modio_mkdirs_copy( substr(dirname($parms[2]),9).'/' ) ; ! } // now the magic happens ;-) |