[Easymod-cvs] easymod2/mods/easymod/includes admin_easymod.php.txt,1.26,1.27 mod_history.tpl,1.2,1.3
Status: Beta
Brought to you by:
wgeric
From: Markus P. <mar...@us...> - 2005-07-29 17:33:19
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15980/mods/easymod/includes Modified Files: admin_easymod.php.txt mod_history.tpl mod_history_details.tpl Log Message: Implementation of the following extensions: - Record Processed Files. - Restore Backups. - Delete MOD Record. Index: mod_history.tpl =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/mod_history.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mod_history.tpl 11 Jun 2005 23:31:32 -0000 1.2 --- mod_history.tpl 29 Jul 2005 17:33:08 -0000 1.3 *************** *** 2,5 **** --- 2,20 ---- <p>{L_INSTALLED_DESC}</p> + <table width="100%" cellpadding="0" cellspacing="0" border="0"> + <tr> + <td> + <form action="{S_ACTION}" method="post"> + {L_FILTER_BY_FILE}: + <select name="filter_option">{S_FILTER_OPTIONS}</select> + <input type="submit" name="filter" value="{L_FILTER}" class="liteoption" /> + {S_HIDDEN_FIELDS} + </form> + </td> + <td align="right"> + {L_TOTAL_MODS}: {S_TOTAL_MODS} ({L_HISTORY_STATUS}) + </td> + </tr> + </table> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline"> <tr> *************** *** 33,37 **** <!-- BEGIN no_install --> <tr> ! <td colspan="6" align="center" class="row1"><span class="gen">{L_NONE_INSTALLED}</span></td> </tr> <!-- END no_install --> --- 48,52 ---- <!-- BEGIN no_install --> <tr> ! <td colspan="8" align="center" class="row1"><span class="gen">{L_NONE_INSTALLED}</span></td> </tr> <!-- END no_install --> Index: mod_history_details.tpl =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/mod_history_details.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mod_history_details.tpl 11 Jun 2005 23:34:29 -0000 1.1 --- mod_history_details.tpl 29 Jul 2005 17:33:08 -0000 1.2 *************** *** 34,38 **** <tr> <td class="row1" align="left" width="25%"><span class="gen">{L_FILES}:</span></td> ! <td class="row2" align="left" width="75%"><span class="gen">{FILES}</span></td> </tr> <tr> --- 34,38 ---- <tr> <td class="row1" align="left" width="25%"><span class="gen">{L_FILES}:</span></td> ! <td class="row2" align="left" width="75%"><span class="gen">{FILES}{FILE_LIST}</span></td> </tr> <tr> *************** *** 44,47 **** --- 44,48 ---- <td class="catbottom" align="center" colspan="2"> <select name="mode" class="post"> + <option value="history">{L_BACK_TO_HISTORY}</option> <!-- BEGIN switch_files --> <option value="del_files">{L_DELETE_FILES}</option> Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** admin_easymod.php.txt 29 Jul 2005 09:46:44 -0000 1.26 --- admin_easymod.php.txt 29 Jul 2005 17:33:08 -0000 1.27 *************** *** 1007,1010 **** --- 1007,1012 ---- else if ($mode == 'history') { + $filter_option = isset($HTTP_POST_VARS['filter_option']) ? htmlspecialchars(trim($HTTP_POST_VARS['filter_option'])) : ''; + // load the history page template $template->set_filenames(array( *************** *** 1012,1037 **** ); ! $template->assign_vars(array( ! 'L_INSTALLED' => $lang['EM_Installed'], ! 'L_INSTALLED_DESC' => $lang['EM_installed_desc'], ! 'L_INSTALL_DATE' => $lang['EM_install_date'], ! 'L_MOD_NAME' => $lang['EM_Mod'], ! 'L_FILE' => $lang['EM_File'], ! 'L_VERSION' => $lang['EM_Version'], ! 'L_AUTHOR' => $lang['EM_Author'], ! 'L_DESCRIPTION' => $lang['EM_Description'], ! 'L_DATE' => $lang['EM_Process_Date'], ! 'L_PHPBB_VER' => $lang['EM_phpBB_Version'], ! 'L_THEMES' => $lang['EM_Themes'], ! 'L_LANGUAGES' => $lang['EM_Languages'], ! 'L_NONE_INSTALLED' => $lang['EM_none_installed'], ! 'S_DETAILS' => $lang['EM_details']) ! ); $sql = "SELECT * ! FROM " . EASYMOD_TABLE . " ORDER BY mod_id DESC" ; if( !$result = $db->sql_query($sql) ) --- 1014,1079 ---- ); + // Build the select options for the 'Filter By File' field. + // First get distinct file names from DB, they include path relative to phpBB directory. + // ...we will later build the $distinct_files array based on the basename of files. + $sql = 'SELECT DISTINCT mod_processed_file FROM ' . EASYMOD_PROCESSED_FILES_TABLE; + if( !($result = $db->sql_query($sql)) ) + { + message_die(GENERAL_ERROR, $lang['EM_err_em_info'], '', __LINE__, __FILE__, $sql); + } + $distinct_rows = $db->sql_fetchrowset($result); + $distinct_count = count($distinct_rows); ! $distinct_files = array(); ! for( $i = 0; $i < $distinct_count; $i++ ) ! { ! $basename = basename($distinct_rows[$i]['mod_processed_file']); ! if( !in_array($basename, $distinct_files) ) ! { ! $distinct_files[] = $basename; ! } ! } ! sort($distinct_files); ! $filter_select_options = '<option value="">' . $lang['EM_All_mods'] . '</option>'; ! for( $i = 0; $i < count($distinct_files); $i++ ) ! { ! $selected = $distinct_files[$i] == $filter_option ? ' selected="selected"' : ''; ! $filter_select_options .= '<option value="' . $distinct_files[$i] . '"' . $selected . '>' . $distinct_files[$i] . '</option>'; ! } + // Build the list of mod_ids matching the selected processed file + if( !empty($filter_option) ) + { + $sql = "SELECT mod_id FROM " . EASYMOD_PROCESSED_FILES_TABLE . " + WHERE mod_processed_file LIKE '%" . $filter_option . "%' + ORDER BY mod_id" ; + if( !($result = $db->sql_query($sql)) ) + { + message_die(GENERAL_ERROR, $lang['EM_err_em_info'], '', __LINE__, __FILE__, $sql); + } + $mod_id_list = array(); + while( $row = $db->sql_fetchrow($result) ) + { + $mod_id_list[] = $row['mod_id']; + } + if( count($mod_id_list) <= 0 ) + { + $mod_id_list[] = -1; + } + $filter_by_mod_id_list = 'WHERE mod_id IN (' . implode(',', $mod_id_list) . ')'; + $history_status = $lang['EM_Filtered']; + } + else + { + $filter_by_mod_id_list = ''; + $history_status = $lang['EM_Unfiltered']; + } + + // finally, get the list of matching MODs $sql = "SELECT * ! FROM " . EASYMOD_TABLE . " ! $filter_by_mod_id_list ORDER BY mod_id DESC" ; if( !$result = $db->sql_query($sql) ) *************** *** 1040,1047 **** } ! $i = 0 ; while( $row = $db->sql_fetchrow($result) ) { ! $row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2']; $template->assign_block_vars('install', array( 'ROW_CLASS' => $row_class, --- 1082,1089 ---- } ! $total_mods = 0 ; while( $row = $db->sql_fetchrow($result) ) { ! $row_class = ( !($total_mods % 2) ) ? $theme['td_class1'] : $theme['td_class2']; $template->assign_block_vars('install', array( 'ROW_CLASS' => $row_class, *************** *** 1054,1058 **** 'S_ACTION' => append_sid('admin_easymod.' . $phpEx), ! 'S_HIDDEN_FIELDS' => '<input type="hidden" name="mod_id" value="' . $row['mod_id'] . '"><input type="hidden" name="mode" value="history_details"><input type="hidden" name="password" value="' . $password . '">', ///////////////// --- 1096,1100 ---- 'S_ACTION' => append_sid('admin_easymod.' . $phpEx), ! 'S_HIDDEN_FIELDS' => '<input type="hidden" name="mod_id" value="' . $row['mod_id'] . '"><input type="hidden" name="mode" value="history_details"><input type="hidden" name="password" value="' . $password . '"><input type="hidden" name="filter_option" value="' . $filter_option . '" />', ///////////////// *************** *** 1062,1071 **** 'LANGS' => $row['mod_processed_langs']) ); ! $i++ ; } ! if ( $i == 0 ) { $template->assign_block_vars('no_install', array()) ; } } --- 1104,1138 ---- 'LANGS' => $row['mod_processed_langs']) ); ! $total_mods++ ; } ! if ( $total_mods == 0 ) { $template->assign_block_vars('no_install', array()) ; } + + $template->assign_vars(array( + 'L_INSTALLED' => $lang['EM_Installed'], + 'L_INSTALLED_DESC' => $lang['EM_installed_desc'], + 'L_INSTALL_DATE' => $lang['EM_install_date'], + 'L_MOD_NAME' => $lang['EM_Mod'], + 'L_FILE' => $lang['EM_File'], + 'L_VERSION' => $lang['EM_Version'], + 'L_AUTHOR' => $lang['EM_Author'], + 'L_DESCRIPTION' => $lang['EM_Description'], + 'L_DATE' => $lang['EM_Process_Date'], + 'L_PHPBB_VER' => $lang['EM_phpBB_Version'], + 'L_THEMES' => $lang['EM_Themes'], + 'L_LANGUAGES' => $lang['EM_Languages'], + 'L_NONE_INSTALLED' => ( empty($filter_by_mod_id_list) ? $lang['EM_none_installed'] : $lang['EM_none_found'] ), + 'S_DETAILS' => $lang['EM_details'], + 'L_FILTER' => $lang['EM_Filter'], + 'L_FILTER_BY_FILE' => $lang['EM_Filter_by_file'], + 'S_FILTER_OPTIONS' => stripslashes($filter_select_options), + 'L_HISTORY_STATUS' => $history_status, + 'L_TOTAL_MODS' => $lang['EM_Total_mods'], + 'S_TOTAL_MODS' => $total_mods, + 'S_HIDDEN_FIELDS' => '<input type="hidden" name="mode" value="history" /><input type="hidden" name="password" value="' . $password . '" />', + 'S_ACTION' => append_sid('admin_easymod.' . $phpEx)) + ); } *************** *** 1073,1077 **** // history details // ! else if ( $mode == 'history_details' ) { // get the mod id --- 1140,1144 ---- // history details // ! else if ( $mode == 'history_details' || (isset($HTTP_POST_VARS['cancel']) && in_array($mode, array('post_process', 'del_files', 'del_record', 'restore_backups', 'install_lang', 'install_themes', 'uninstall'))) ) { // get the mod id *************** *** 1105,1108 **** --- 1172,1176 ---- 'L_INSERTED' => $lang['EM_rows_added'], + 'L_BACK_TO_HISTORY' => $lang['EM_back_to_history'], 'L_DELETE_FILES' => $lang['EM_del_files'], 'L_DELETE_RECORD' => $lang['EN_del_record'], *************** *** 1114,1118 **** 'S_ACTION' => append_sid($phpbb_root_path . 'admin/admin_easymod.'.$phpEx), ! 'S_HIDDEN_FIELDS' => '<input type="hidden" name="mod_id" value="' . $mod_id . '"><input type="hidden" name="password" value="' . $password . '">') ); --- 1182,1186 ---- 'S_ACTION' => append_sid($phpbb_root_path . 'admin/admin_easymod.'.$phpEx), ! 'S_HIDDEN_FIELDS' => '<input type="hidden" name="mod_id" value="' . $mod_id . '"><input type="hidden" name="password" value="' . $password . '"><input type="hidden" name="filter_option" value="' . $HTTP_POST_VARS['filter_option'] . '" />') ); *************** *** 1154,1157 **** --- 1222,1241 ---- } + // build the list of processed files for the current MOD + $sql = "SELECT mod_processed_file FROM " . EASYMOD_PROCESSED_FILES_TABLE . " + WHERE mod_id = $mod_id + ORDER BY mod_processed_file"; + if( !($result = $db->sql_query($sql)) ) + { + message_die(GENERAL_ERROR, $lang['EM_err_em_info'], '', __LINE__, __FILE__, $sql); + } + $epf_rows = $db->sql_fetchrowset($result); + $epf_count = count($epf_rows); + $epf_list = ''; + for( $i = 0; $i < $epf_count; $i++ ) + { + $epf_list .= '<br />' . $epf_rows[$i]['mod_processed_file']; + } + $template->assign_vars(array( 'TITLE' => $row['mod_title'], *************** *** 1168,1171 **** --- 1252,1256 ---- 'LANGUAGES' => $row['mod_processed_langs'], 'FILES' => $row['mod_files_edited'], + 'FILE_LIST' => $epf_list, 'ADDED' => $row['mod_tables_added'], 'ALTERED' => $row['mod_tables_altered'], *************** *** 1192,1196 **** { // display confirm and delete sql entry ! message_die(GENERAL_MESSAGE, $lang['Coming_soon']); } --- 1277,1340 ---- { // display confirm and delete sql entry ! ! // get the mod id ! if ( isset($HTTP_POST_VARS['mod_id']) ) ! { ! $mod_id = intval($HTTP_POST_VARS['mod_id']); ! } ! else ! { ! message_die(GENERAL_ERROR, $lang['EM_No_mod_selected']); ! } ! ! // Should we display the confirm box? ! if( !isset($HTTP_POST_VARS['confirm']) ) ! { ! $s_hidden_fields = '<input type="hidden" name="mod_id" value="'.$mod_id.'" />'. ! '<input type="hidden" name="password" value="'.$password.'" />'. ! '<input type="hidden" name="mode" value="'.$mode.'" />'; ! $template->set_filenames(array( ! 'body' => 'confirm_body.tpl') ! ); ! $template->assign_vars(array( ! 'L_INDEX' => '', // Not really necessary here ! 'MESSAGE_TITLE' => $lang['EM_del_record'], ! 'MESSAGE_TEXT' => $lang['EM_are_you_sure'], ! 'L_YES' => $lang['Yes'], ! 'L_NO' => $lang['No'], ! 'S_CONFIRM_ACTION' => append_sid('admin_easymod.' . $phpEx), ! 'S_HIDDEN_FIELDS' => $s_hidden_fields) ! ); ! } ! else ! { ! // ok, let's do it! ! $sql = "SELECT * FROM " . EASYMOD_TABLE . " ! WHERE mod_id = $mod_id"; ! if( !($result = $db->sql_query($sql)) || !($row = $db->sql_fetchrow($result)) ) ! { ! message_die(GENERAL_ERROR, $lang['EM_err_em_info'], '', __LINE__, __FILE__, $sql); ! } ! $mod_file = $phpbb_root_path . 'admin/mods/' . $row['mod_file']; ! $mod_folder = dirname($mod_file).'/'; ! ! $sql = "DELETE FROM " . EASYMOD_TABLE . " ! WHERE mod_id = $mod_id"; ! if( !$db->sql_query($sql) ) ! { ! message_die(GENERAL_ERROR, $lang['EM_err_delete_em_info'], '', __LINE__, __FILE__, $sql); ! } ! ! $message = '<form method="post" action="' . append_sid('admin_easymod.' . $phpEx . '?mode=history') . '">'; ! $message .= '<br />' . $lang['EM_record_deleted'] . '<br /><br />'; ! if( @file_exists($mod_file) ) ! { ! $message .= '<br />' . $lang['EM_warning_deldir'] . '<br /><br /><b>' . $mod_folder . '</b><br /><br /><br />'; ! } ! $message .= '<input type="submit" name="submit" class="liteoption" value="' . $lang['MOD_history'] . '">'; ! $message .= '<input type="hidden" name="password" value="' . $password . '">'; ! $message .= '</form>'; ! message_die(GENERAL_MESSAGE, $message); ! } } *************** *** 1199,1206 **** // Restore Backups // ! else if ( $mode == 'restore_backups' ) { // display confirm and move the backups into place ! message_die(GENERAL_ERROR, $lang['Coming_soon']); } --- 1343,1443 ---- // Restore Backups // ! else if ( $mode == 'restore_backups' && !isset($HTTP_POST_VARS['confirm']) ) { // display confirm and move the backups into place ! ! // get the mod id ! if ( isset($HTTP_POST_VARS['mod_id']) ) ! { ! $mod_id = intval($HTTP_POST_VARS['mod_id']); ! } ! else ! { ! message_die(GENERAL_ERROR, $lang['EM_No_mod_selected']); ! } ! ! // Read MOD information from DB... ! $sql = "SELECT * FROM " . EASYMOD_TABLE . " ! WHERE mod_id = $mod_id"; ! if( !($result = $db->sql_query($sql)) || !($mod_row = $db->sql_fetchrow($result)) ) ! { ! message_die(GENERAL_ERROR, $lang['EM_err_em_info'], '', __LINE__, __FILE__, $sql); ! } ! $sql = "SELECT mod_processed_file FROM " . EASYMOD_PROCESSED_FILES_TABLE . " ! WHERE mod_id = $mod_id ! ORDER BY mod_processed_file"; ! if( !($result = $db->sql_query($sql)) ) ! { ! message_die(GENERAL_ERROR, $lang['EM_err_em_info'], '', __LINE__, __FILE__, $sql); ! } ! $epf_rows = $db->sql_fetchrowset($result); ! $epf_count = count($epf_rows); ! ! // build the command array for the restore backups job ! $mod_file = './mods/' . $mod_row['mod_file']; ! $mod_folder = dirname($mod_file).'/'; ! $command_ary = array(); ! for( $i = 0; $i < $epf_count; $i++ ) ! { ! $mod_processed_file = $epf_rows[$i]['mod_processed_file']; ! $command_ary[] = array('backups/' . $mod_processed_file . '.txt', '../../../' . $mod_processed_file); ! } ! ! if( ($num_command_steps = count($command_ary)) <= 0 ) ! { ! message_die(GENERAL_ERROR, $lang['EM_err_no_step']); ! } ! ! // ok, let's build the NEW post_process stuff, then display the confirm dialog box! ! $mode = 'post_process'; ! ! $hidden_vars_ary = array( ! 'mod_id' => $mod_id, ! 'password' => $password, ! 'mode' => $mode, ! 'install_path' => dirname($mod_file).'/', ! 'install_file' => basename($mod_file), ! 'themes' => $mod_row['mod_processed_themes'], ! 'languages' => $mod_row['mod_processed_langs'], ! 'files' => $mod_row['mod_files_edited'], ! 'num_proc' => $mod_row['mod_files_edited'], ! 'num_unproc' => 0 ! ); ! ! $s_hidden_fields = ''; ! for( $i=0; $i < $num_command_steps; $i++ ) ! { ! $command_line = 'copy ' . $command_ary[$i][0] . ' ' . $command_ary[$i][1]; ! $s_hidden_fields .= '<input type="hidden" name="command_step'.$i.'" value="' . $command_line . "\">\n"; ! } ! $s_hidden_fields .= '<input type="hidden" name="num_command_steps" value="' . $i . "\">\n" ; ! ! foreach( $hidden_vars_ary as $key => $val ) ! { ! $s_hidden_fields .= '<input type="hidden" name="' . $key . '" value="' . $val . "\">\n"; ! } ! ! $template->set_filenames(array( ! 'body' => 'confirm_body.tpl') ! ); ! ! $message = '<b>' . $lang['EM_restore_backups'] . "</b>:<br /><br />\n"; ! for( $i=0; $i < $num_command_steps; $i++ ) ! { ! $from = $mod_folder.$command_ary[$i][0]; ! $to = ((substr($command_ary[$i][1], 0, 9) == '../../../') ? substr($command_ary[$i][1], 9) : $command_ary[$i][1]); ! $message .= '<b>COPY</b> ' . $from . ' <b>TO</b> ' . $to . "<br />\n"; ! } ! $message .= '<br /><br />' . $lang['EM_are_you_sure']; ! ! $template->assign_vars(array( ! 'L_INDEX' => '', // Not really necessary here ! 'MESSAGE_TITLE' => $lang['EM_restore_backups'], ! 'MESSAGE_TEXT' => $message, ! 'L_YES' => $lang['Yes'], ! 'L_NO' => $lang['No'], ! 'S_CONFIRM_ACTION' => append_sid('admin_easymod.' . $phpEx), ! 'S_HIDDEN_FIELDS' => $s_hidden_fields) ! ); } *************** *** 3047,3050 **** --- 3284,3289 ---- $em_pass = $password ; + $processed_files = array(); + // execute the move! $mod_count = 0 ; *************** *** 3104,3109 **** if ($is_backup) { $template->assign_block_vars('backups', array( ! 'FROM' => ((substr($from, 0, 9) == '../../../') ? substr($from, 9) : $from), 'TO' => $ret_value) ); --- 3343,3352 ---- if ($is_backup) { + // this is relative to the phpBB directory + $from_file = (substr($from, 0, 9) == '../../../') ? substr($from, 9) : $from; + $processed_files[] = $from_file; + $template->assign_block_vars('backups', array( ! 'FROM' => $from_file, 'TO' => $ret_value) ); *************** *** 3208,3214 **** $mod_version = str_replace("'", "''", substr( $mod_version, 0, 15)) ; - $sql = 'INSERT INTO ' . EASYMOD_TABLE . " ( mod_file, mod_title, mod_version, mod_author_handle, mod_author_email, mod_author_url, mod_author_name, mod_description, mod_process_date, mod_phpBB_version, mod_processed_themes, mod_processed_langs, mod_files_edited) - VALUES ( '" . substr($install_path, 7) . $install_file . "', '$mod_title', '$mod_version', '$mod_author_handle', '$mod_author_email', '$mod_author_url', '$mod_author_name', '$mod_description', " . time() . ", '" . $phpbb_version . "', '" . $themes . "', '" . $languages . "', $files)"; - if ($preview) --- 3451,3454 ---- *************** *** 3216,3222 **** // do not update the DB while in preview mode } ! else if ( !($result = $db->sql_query($sql)) ) { ! message_die(GENERAL_ERROR, $lang['EM_err_em_info'], '', __LINE__, __FILE__, $sql); } } --- 3456,3502 ---- // do not update the DB while in preview mode } ! else { ! // We might come here from the 'Restore Backups' option, in this case we'll find the mod_id in the POST array. ! if ( isset($HTTP_POST_VARS['mod_id']) && ($mod_id = intval($HTTP_POST_VARS['mod_id'])) > 0 ) ! { ! // If we have restored backups, what we really need now is delete the MOD record. ! $sql = 'DELETE FROM ' . EASYMOD_TABLE . " WHERE mod_id = $mod_id"; ! } ! else ! { ! // Otherwise, we have just installed a new MOD. ! $sql = 'INSERT INTO ' . EASYMOD_TABLE . " ( mod_file, mod_title, mod_version, mod_author_handle, mod_author_email, mod_author_url, mod_author_name, mod_description, mod_process_date, mod_phpBB_version, mod_processed_themes, mod_processed_langs, mod_files_edited) ! VALUES ( '" . substr($install_path, 7) . $install_file . "', '$mod_title', '$mod_version', '$mod_author_handle', '$mod_author_email', '$mod_author_url', '$mod_author_name', '$mod_description', " . time() . ", '" . $phpbb_version . "', '" . $themes . "', '" . $languages . "', $files)"; ! } ! ! if ( !($result = $db->sql_query($sql)) ) ! { ! message_die(GENERAL_ERROR, $lang['EM_err_em_info'], '', __LINE__, __FILE__, $sql); ! } ! ! if( isset($mod_id) ) ! { ! $sql = 'DELETE FROM ' . EASYMOD_PROCESSED_FILES_TABLE . " WHERE mod_id = $mod_id"; ! if ( !($result = $db->sql_query($sql)) ) ! { ! message_die(GENERAL_ERROR, $lang['EM_err_em_info'], '', __LINE__, __FILE__, $sql); ! } ! } ! else ! { ! // get the ID of the just installed MOD. ! $mod_id = $db->sql_nextid(); ! ! for( $i = 0; $i < count($processed_files); $i++ ) ! { ! $sql = 'INSERT INTO ' . EASYMOD_PROCESSED_FILES_TABLE . " (mod_processed_file, mod_id) ! VALUES ('" . $processed_files[$i] . "', $mod_id)"; ! if ( !($result = $db->sql_query($sql)) ) ! { ! message_die(GENERAL_ERROR, $lang['EM_err_em_info'], '', __LINE__, __FILE__, $sql); ! } ! } ! } } } |