[Easymod-cvs] easymod2/mods/easymod/includes admin_easymod.php.txt, 1.53, 1.54
Status: Beta
Brought to you by:
wgeric
|
From: Jim W. <ter...@us...> - 2008-02-10 23:43:15
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs17.sourceforge.net:/tmp/cvs-serv24267 Modified Files: admin_easymod.php.txt Log Message: - fixed bug 1593154 - REPLACEs don't need to be preceeded by FINDs Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** admin_easymod.php.txt 10 Feb 2008 14:39:51 -0000 1.53 --- admin_easymod.php.txt 10 Feb 2008 23:43:11 -0000 1.54 *************** *** 2313,2322 **** // that the find_array is being managed correctly; OPEN and FIND write out any remenants of find_array; AFTER // and REPLACE destroy the array while BEFORE and the IN-LINE's preserve it to be used again ! if ((count($find_array) == 0 ) && (($commands[$i]['command'] == 'BEFOREADD') || (strstr($commands[$i]['command'], 'IN-LINE')))) { ! display_error( '<b>' . $lang['EM_err_critical_error'] . "</b><br /><br />\n" . $commands[$i]['command'] . $lang['EM_err_no_find'] . "<br />\n" . $lang['EM_line_num'] . $commands[$i]['line']); ! break; ! } // --- 2313,2337 ---- // that the find_array is being managed correctly; OPEN and FIND write out any remenants of find_array; AFTER // and REPLACE destroy the array while BEFORE and the IN-LINE's preserve it to be used again ! if (count($find_array) == 0) { ! $error = false; ! switch ($commands[$i]['command']) ! { ! case 'BEFOREADD': ! case 'REPLACE': ! case 'AFTERADD': ! case 'INCREMENT': ! case 'IN-LINE BEFOREADD': ! case 'IN-LINE REPLACE': ! case 'IN-LINE AFTERADD': ! display_error( '<b>' . $lang['EM_err_critical_error'] . "</b><br /><br />\n" . $commands[$i]['command'] . $lang['EM_err_no_find'] . "<br />\n" . $lang['EM_line_num'] . $commands[$i]['line']); ! $error = true; ! } + if ($error) + { + break; + } + } // *************** *** 3494,3498 **** if ($failure) { ! $sql[] = array('command' => $sql_line, 'status' => '<b>' . $lang['EM_not_attempted'] . '</b>'); } else if ($sql_allow) --- 3509,3513 ---- if ($failure) { ! $sql[] = array('command' => $sql_line, 'status' => '<b>' . 'zzz.1'.$lang['EM_not_attempted'] . '</b>'); } else if ($sql_allow) *************** *** 3505,3509 **** $failure = true; ! $error = $db->sql_error(); //echo "[" . $error['message'] . "][" . $error['code'] . "]<br />\n"; //exit; --- 3520,3524 ---- $failure = true; ! $error = $db->sql_error().'zzz'; //echo "[" . $error['message'] . "][" . $error['code'] . "]<br />\n"; //exit; |