easymod-cvs Mailing List for EasyMOD (Page 8)
Status: Beta
Brought to you by:
wgeric
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
(16) |
May
(36) |
Jun
(53) |
Jul
(21) |
Aug
|
Sep
(10) |
Oct
(4) |
Nov
(69) |
Dec
(57) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(8) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
(5) |
Oct
(3) |
Nov
|
Dec
|
2007 |
Jan
|
Feb
(7) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
(12) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Markus P. <mar...@us...> - 2005-09-26 09:57:43
|
Update of /cvsroot/easymod/sql_parser/root/includes/sql In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10795 Removed Files: sql_builder.php sql_builder_msaccess.php sql_builder_mssql.php sql_builder_mysql.php sql_builder_postgresql.php sql_parser.php sql_reserved_keywords.php Log Message: Trying to cleanup stuff caused by wrong import. --- sql_builder.php DELETED --- --- sql_builder_msaccess.php DELETED --- --- sql_builder_mysql.php DELETED --- --- sql_reserved_keywords.php DELETED --- --- sql_parser.php DELETED --- --- sql_builder_postgresql.php DELETED --- --- sql_builder_mssql.php DELETED --- |
From: Markus P. <mar...@us...> - 2005-09-26 09:56:15
|
Update of /cvsroot/easymod/sql_parser/root/language/lang_english In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10557 Added Files: lang_sql_parser.php Log Message: Trying to cleanup stuff caused by wrong import. --- NEW FILE: lang_sql_parser.php --- <?php /** * * @package SQL Parser * @version $Id: lang_sql_parser.php,v 1.3 2005/09/26 09:56:04 markus_petrux Exp $ * @copyright (c) 2005 phpBB Group * @license http://opensource.org/licenses/gpl-license.php GNU General Public License * */ /** * Language definitions for SQL Parser * * @language english */ $lang += array( 'SQL_error_open_file' = 'Failed opening file "%s"', 'SQL_unknown_dbms' = 'Unknown or unsupported DBMS "%s"', 'SQL_nonclosed_string' = 'A non-closed string constant has been found: %s', 'SQL_missing_semicolon' = 'Missing semicolon, it might be an indication of further syntax errors', 'SQL_in_statement' = ', statement: %d', 'SQL_in_table_name' = ', table: "%s"', 'SQL_unknown_command' = 'Unknown SQL command "%s"', 'SQL_unexpected_syntax' = 'Unexpected syntax in "%s"', 'SQL_nonportable_option' = 'Non-portable syntax option(s) "%1$s", ignored', 'SQL_invalid_table_name' = 'Invalid table name "%s"', 'SQL_invalid_index_name' = 'Invalid index name "%s"', 'SQL_invalid_column_name' = 'Invalid column name "%s"', 'SQL_reserved_keyword' = 'Identifier "%1$s" is a reserved keyword (reference: %2$s)', 'SQL_invalid_index_name' = 'Invalid index name "%s"', 'SQL_invalid_index' = 'Invalid index "%s"', 'SQL_missing_keys' = 'Missing keys in "%s"', 'SQL_invalid_key_length' = 'Invalid key length "%s"', 'SQL_missing_key_length' = 'Missing key length "%1$s", mandatory for "%2$s" columns', 'SQL_invalid_column' = 'Invalid column definition "%s"', 'SQL_already_column' = 'Column "%s" already defined', 'SQL_invalid_primary' = 'Invalid primary key "%s"', 'SQL_already_primary' = 'Primary key "%s" already defined', 'SQL_unknown_primary' = 'Unknown column name "%s" in primary key', 'SQL_notnull_primary' = 'Inconsistent primary key "%s", should be defined as not null', 'SQL_autoinc_noindex' = 'Inconsistent usage of AUTO_INCREMENT in column "%s", it must be indexed', 'SQL_unknown_key' = 'Unknown column name for key "%s"', 'SQL_missing_default' = 'Missing default value "%s"', 'SQL_unknown_attribute' = 'Unexpected or unknown attribute "%1$s", in "%2$s"', 'SQL_nosupport_datatype' = 'Unsupported data type "%s"', 'SQL_invalid_datatype' = 'Invalid or unknown data type "%1$s", code: %2$d', 'SQL_unknown_datatype' = 'Unknown data type "%s"', 'SQL_illegal_null' = 'Illegal use of NULL for a NOT NULL column "%s"', 'SQL_illegal_attribute' = 'Illegal use of "%s" attribute', 'SQL_illegal_attriblen' = 'Illegal attribute length "%s"', 'SQL_warn_empty_number' = 'An empty string constant for a numeric data type has been converted to 0 "%s"', 'SQL_warn_bad_constant' = 'Possible inconsistencies detected, constant converted to (%1$s) in "%2$s"', 'SQL_warn_display_width' = 'Inconsistent display width specified "%1$s" in column "%2$s"', 'SQL_warn_mysql_ext' = 'MySQL extension "%1$s" used for column "%2$s"', 'SQL_warn_column_type' = 'Column "%1$s" has been found using %2$d different data types in %3$d tables: %4$s', 'SQL_warn_column_type_tb' = '%1$s in %2$s', ); ?> |
From: Markus P. <mar...@us...> - 2005-09-26 09:54:56
|
Update of /cvsroot/easymod/sql_parser/root/language/lang_english In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10356 Removed Files: lang_sql_parser.php Log Message: Trying to cleanup stuff caused by wrong import. --- lang_sql_parser.php DELETED --- |
From: Markus P. <mar...@us...> - 2005-07-29 17:33:19
|
Update of /cvsroot/easymod/easymod2/mods/easymod/languages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15980/mods/easymod/languages Modified Files: lang_easymod_english.php Log Message: Implementation of the following extensions: - Record Processed Files. - Restore Backups. - Delete MOD Record. Index: lang_easymod_english.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/languages/lang_easymod_english.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** lang_easymod_english.php 21 Jun 2005 18:16:25 -0000 1.1 --- lang_easymod_english.php 29 Jul 2005 17:33:08 -0000 1.2 *************** *** 64,67 **** --- 64,71 ---- $lang['EM_uninstall'] = 'Uninstall MOD'; $lang['Coming_soon'] = 'Coming Soon!'; + $lang['EM_back_to_history'] = 'Back to History'; + $lang['EM_are_you_sure'] = 'Are you sure you want to perform the requested operation?'; + $lang['EM_record_deleted'] = 'The selected MOD Record has been removed from the database.'; + $lang['EM_warning_deldir'] = 'WARNING: To fully remove this MOD from your system, you must delete the following directory:'; // settings *************** *** 122,125 **** --- 126,136 ---- $lang['EM_Themes'] = 'Themes' ; $lang['EM_Languages'] = 'Languages' ; + $lang['EM_Filter'] = 'Filter'; + $lang['EM_Filtered'] = 'Filtered'; + $lang['EM_Unfiltered'] = 'Unfiltered'; + $lang['EM_Filter_by_file'] = 'Filter MODs by processed file'; + $lang['EM_All_mods'] = 'All MODs'; + $lang['EM_Total_mods'] = 'Total MODs'; + $lang['EM_none_found'] = 'No MODs have been found.'; // process *************** *** 421,430 **** // step 4 $lang['EM_step4'] = '<b>Step 4 (of 5):</b> Depending on your selection, the modified files have been automatically moved into place or prepared for you to move them manually. If there are no errors, click the "Confirm" button to update your database and complete the installation process.' ; ! $lang['EM_add_db'] = 'Adding EasyMOD table to your database' ; $lang['EM_exec_sql'] = 'Executing SQL' ; $lang['EM_progress'] = 'Progress' ; $lang['EM_done'] = 'Done' ; $lang['EM_result'] = 'Result' ; ! $lang['EM_already_exist'] = 'The table was previously created' ; $lang['EM_failed_sql'] = 'Some queries failed, the statements and errors are listing below' ; $lang['EM_no_worry'] = 'This is probably nothing to worry about, install will continue. Should this fail to complete you may need to seek help at our development board.' ; --- 432,441 ---- // step 4 $lang['EM_step4'] = '<b>Step 4 (of 5):</b> Depending on your selection, the modified files have been automatically moved into place or prepared for you to move them manually. If there are no errors, click the "Confirm" button to update your database and complete the installation process.' ; ! $lang['EM_add_db'] = 'Adding EasyMOD tables to your database' ; $lang['EM_exec_sql'] = 'Executing SQL' ; $lang['EM_progress'] = 'Progress' ; $lang['EM_done'] = 'Done' ; $lang['EM_result'] = 'Result' ; ! $lang['EM_already_exist'] = 'The tables were previously created' ; $lang['EM_failed_sql'] = 'Some queries failed, the statements and errors are listing below' ; $lang['EM_no_worry'] = 'This is probably nothing to worry about, install will continue. Should this fail to complete you may need to seek help at our development board.' ; *************** *** 432,435 **** --- 443,447 ---- $lang['EM_update_db'] = 'Updating EasyMOD table data' ; $lang['EM_store_entries'] = 'Storing config table entries' ; + $lang['EM_store_files'] = 'Storing processed files table' ; $lang['EM_do_worry'] = 'Could not successfully update table. Something is wrong and install cannot complete.' ; $lang['EM_complete_post'] = 'Completing Post-Process' ; *************** *** 534,537 **** --- 546,550 ---- $lang['EM_err_theme_info'] = 'Could not query database for theme info' ; $lang['EM_err_copy_format'] = 'Could not perform improperly formed COPY command.' ; + $lang['EM_err_delete_em_info'] = 'Could not delete EasyMod entry!'; // mod_io errors |
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); ! } ! } ! } } } |
From: Markus P. <mar...@us...> - 2005-07-29 17:33:17
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15980/mods/easymod Modified Files: easymod_install.php Log Message: Implementation of the following extensions: - Record Processed Files. - Restore Backups. - Delete MOD Record. Index: easymod_install.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_install.php,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** easymod_install.php 10 Jul 2005 22:54:47 -0000 1.28 --- easymod_install.php 29 Jul 2005 17:33:07 -0000 1.29 *************** *** 832,835 **** --- 832,841 ---- + // Check which tables should we create before building the $sql array. + $test_sql = "SELECT * FROM " . EASYMOD_TABLE ; + $create_easymod_table = ( $db->sql_query($test_sql) ? false : true ); + $test_sql = "SELECT * FROM " . EASYMOD_PROCESSED_FILES_TABLE ; + $create_easymod_processed_files_table = ( $db->sql_query($test_sql) ? false : true ); + /// /// Add the easymod table *************** *** 841,887 **** case 'mysqli': case 'mysql4': ! $sql[] = "CREATE TABLE " . EASYMOD_TABLE . " ( ! mod_id mediumint(8) NOT NULL auto_increment, ! mod_title varchar(255) NULL DEFAULT '', ! mod_file varchar(255) NULL DEFAULT '', ! mod_version varchar(15) NULL DEFAULT '', ! mod_author_handle varchar(25) NULL DEFAULT '', ! mod_author_email varchar(100) NULL DEFAULT '', ! mod_author_name varchar(100) NULL DEFAULT '', ! mod_author_url varchar(100) NULL DEFAULT '', ! mod_description text NULL DEFAULT '', ! mod_process_date int(11) NULL DEFAULT '0', ! mod_phpBB_version varchar(15) NULL DEFAULT '', ! mod_processed_themes varchar(200) NULL DEFAULT '', ! mod_processed_langs varchar(200) NULL DEFAULT '', ! mod_files_edited mediumint(8) NULL DEFAULT '0', ! mod_tables_added mediumint(8) NULL DEFAULT '0', ! mod_tables_altered mediumint(8) NULL DEFAULT '0', ! mod_rows_inserted mediumint(8) NULL DEFAULT '0', ! PRIMARY KEY (mod_id))" ; break ; case 'postgresql': ! $sql[] = "CREATE SEQUENCE " . EASYMOD_TABLE . "_mod_id_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1" ; ! $sql[] = "CREATE TABLE " . EASYMOD_TABLE . " ( ! mod_id int4 NOT NULL DEFAULT nextval('" . EASYMOD_TABLE . "_mod_id_seq'::text), ! CONSTRAINT PK_phpbb_easymod PRIMARY KEY (mod_id), ! mod_title varchar(255) NULL DEFAULT '', ! mod_file varchar(255) NULL DEFAULT '', ! mod_version varchar(15) NULL DEFAULT '', ! mod_author_handle varchar(25) NULL DEFAULT '', ! mod_author_email varchar(100) NULL DEFAULT '', ! mod_author_name varchar(100) NULL DEFAULT '', ! mod_author_url varchar(100) NULL DEFAULT '', ! mod_description text NULL DEFAULT '', ! mod_process_date int4 NULL DEFAULT '0', ! mod_phpBB_version varchar(15) NULL DEFAULT '', ! mod_processed_themes varchar(200) NULL DEFAULT '', ! mod_processed_langs varchar(200) NULL DEFAULT '', ! mod_files_edited int4 NULL DEFAULT '0', ! mod_tables_added int4 NULL DEFAULT '0', ! mod_tables_altered int4 NULL DEFAULT '0', ! mod_rows_inserted int4 NULL DEFAULT '0' )" ; break ; --- 847,917 ---- case 'mysqli': case 'mysql4': ! if( $create_easymod_table ) ! { ! $sql[] = "CREATE TABLE " . EASYMOD_TABLE . " ( ! mod_id mediumint(8) NOT NULL auto_increment, ! mod_title varchar(255) NULL DEFAULT '', ! mod_file varchar(255) NULL DEFAULT '', ! mod_version varchar(15) NULL DEFAULT '', ! mod_author_handle varchar(25) NULL DEFAULT '', ! mod_author_email varchar(100) NULL DEFAULT '', ! mod_author_name varchar(100) NULL DEFAULT '', ! mod_author_url varchar(100) NULL DEFAULT '', ! mod_description text NULL DEFAULT '', ! mod_process_date int(11) NULL DEFAULT '0', ! mod_phpBB_version varchar(15) NULL DEFAULT '', ! mod_processed_themes varchar(200) NULL DEFAULT '', ! mod_processed_langs varchar(200) NULL DEFAULT '', ! mod_files_edited mediumint(8) NULL DEFAULT '0', ! mod_tables_added mediumint(8) NULL DEFAULT '0', ! mod_tables_altered mediumint(8) NULL DEFAULT '0', ! mod_rows_inserted mediumint(8) NULL DEFAULT '0', ! PRIMARY KEY (mod_id))" ; ! } ! ! if( $create_easymod_processed_files_table ) ! { ! $sql[] = "CREATE TABLE " . EASYMOD_PROCESSED_FILES_TABLE . " ( ! mod_processed_file varchar(255) NOT NULL DEFAULT '', ! mod_id mediumint(8) NOT NULL DEFAULT '0', ! KEY mod_processed_file (mod_processed_file), ! KEY mod_id (mod_id))"; ! } break ; case 'postgresql': ! if( $create_easymod_table ) ! { ! $sql[] = "CREATE SEQUENCE " . EASYMOD_TABLE . "_mod_id_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1" ; ! $sql[] = "CREATE TABLE " . EASYMOD_TABLE . " ( ! mod_id int4 NOT NULL DEFAULT nextval('" . EASYMOD_TABLE . "_mod_id_seq'::text), ! CONSTRAINT PK_phpbb_easymod PRIMARY KEY (mod_id), ! mod_title varchar(255) NULL DEFAULT '', ! mod_file varchar(255) NULL DEFAULT '', ! mod_version varchar(15) NULL DEFAULT '', ! mod_author_handle varchar(25) NULL DEFAULT '', ! mod_author_email varchar(100) NULL DEFAULT '', ! mod_author_name varchar(100) NULL DEFAULT '', ! mod_author_url varchar(100) NULL DEFAULT '', ! mod_description text NULL DEFAULT '', ! mod_process_date int4 NULL DEFAULT '0', ! mod_phpBB_version varchar(15) NULL DEFAULT '', ! mod_processed_themes varchar(200) NULL DEFAULT '', ! mod_processed_langs varchar(200) NULL DEFAULT '', ! mod_files_edited int4 NULL DEFAULT '0', ! mod_tables_added int4 NULL DEFAULT '0', ! mod_tables_altered int4 NULL DEFAULT '0', ! mod_rows_inserted int4 NULL DEFAULT '0' )" ; ! } ! ! if( $create_easymod_processed_files_table ) ! { ! $sql[] = 'CREATE TABLE ' . EASYMOD_PROCESSED_FILES_TABLE . " ( ! mod_processed_file varchar(255) NOT NULL DEFAULT '', ! mod_id int4 NOT NULL DEFAULT '0' )"; ! $sql[] = 'CREATE INDEX ' . EASYMOD_PROCESSED_FILES_TABLE . '_ix1 ON ' . EASYMOD_PROCESSED_FILES_TABLE . ' (mod_processed_file)'; ! $sql[] = 'CREATE INDEX ' . EASYMOD_PROCESSED_FILES_TABLE . '_ix2 ON ' . EASYMOD_PROCESSED_FILES_TABLE . ' (mod_id)'; ! } break ; *************** *** 893,944 **** GO" ; */ ! $sql[] = "CREATE TABLE [" . EASYMOD_TABLE . "] ( ! [mod_id] [int] IDENTITY (1, 1) NOT NULL, ! [mod_title] [varchar] (255) NULL, ! [mod_file] [varchar] (255) NULL, ! [mod_version] [varchar] (15) NULL, ! [mod_author_handle] [varchar] (25) NULL, ! [mod_author_email] [varchar] (100) NULL, ! [mod_author_name] [varchar] (100) NULL, ! [mod_author_url] [varchar] (100) NULL, ! [mod_description] [varchar] (255) NULL, ! [mod_process_date] [int] NULL, ! [mod_phpBB_version] [varchar] (15) NULL, ! [mod_processed_themes] [varchar] (200) NULL, ! [mod_processed_langs] [varchar] (200) NULL, ! [mod_files_edited] [int] NULL, ! [mod_tables_added] [int] NULL, ! [mod_tables_altered] [int] NULL, ! [mod_rows_inserted] [int] NULL ! ) ON [PRIMARY];" ; //GO" ; ! $sql[] = "ALTER TABLE [" . EASYMOD_TABLE . "] WITH NOCHECK ADD ! CONSTRAINT [PK_" . EASYMOD_TABLE . "] PRIMARY KEY CLUSTERED ! ( ! [mod_id] ! ) ON [PRIMARY]" ; //GO" ; ! // CONSTRAINT [DF_phpbb_easymod_mod_id] DEFAULT ('0') FOR [mod_id], ! $sql[] = "ALTER TABLE [" . EASYMOD_TABLE . "] WITH NOCHECK ADD ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_title] DEFAULT ('') FOR [mod_title], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_file] DEFAULT ('') FOR [mod_file], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_version] DEFAULT ('') FOR [mod_version], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_author_handle] DEFAULT ('') FOR [mod_author_handle], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_author_email] DEFAULT ('') FOR [mod_author_email], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_author_name] DEFAULT ('') FOR [mod_author_name], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_author_url] DEFAULT ('') FOR [mod_author_url], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_description] DEFAULT ('') FOR [mod_description], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_process_date] DEFAULT ('0') FOR [mod_process_date], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_phpBB_version] DEFAULT ('') FOR [mod_phpBB_version], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_processed_themes] DEFAULT ('') FOR [mod_processed_themes], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_processed_langs] DEFAULT ('') FOR [mod_processed_langs], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_files_edited] DEFAULT ('0') FOR [mod_files_edited], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_tables_added] DEFAULT ('0') FOR [mod_tables_added], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_tables_altered] DEFAULT ('0') FOR [mod_tables_altered], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_rows_inserted] DEFAULT ('0') FOR [mod_rows_inserted]" ; ! // GO" ; /* --- 923,997 ---- GO" ; */ ! if( $create_easymod_table ) ! { ! $sql[] = "CREATE TABLE [" . EASYMOD_TABLE . "] ( ! [mod_id] [int] IDENTITY (1, 1) NOT NULL, ! [mod_title] [varchar] (255) NULL, ! [mod_file] [varchar] (255) NULL, ! [mod_version] [varchar] (15) NULL, ! [mod_author_handle] [varchar] (25) NULL, ! [mod_author_email] [varchar] (100) NULL, ! [mod_author_name] [varchar] (100) NULL, ! [mod_author_url] [varchar] (100) NULL, ! [mod_description] [varchar] (255) NULL, ! [mod_process_date] [int] NULL, ! [mod_phpBB_version] [varchar] (15) NULL, ! [mod_processed_themes] [varchar] (200) NULL, ! [mod_processed_langs] [varchar] (200) NULL, ! [mod_files_edited] [int] NULL, ! [mod_tables_added] [int] NULL, ! [mod_tables_altered] [int] NULL, ! [mod_rows_inserted] [int] NULL ! ) ON [PRIMARY];" ; //GO" ; ! $sql[] = "ALTER TABLE [" . EASYMOD_TABLE . "] WITH NOCHECK ADD ! CONSTRAINT [PK_" . EASYMOD_TABLE . "] PRIMARY KEY CLUSTERED ! ( ! [mod_id] ! ) ON [PRIMARY]" ; //GO" ; ! // CONSTRAINT [DF_phpbb_easymod_mod_id] DEFAULT ('0') FOR [mod_id], ! $sql[] = "ALTER TABLE [" . EASYMOD_TABLE . "] WITH NOCHECK ADD ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_title] DEFAULT ('') FOR [mod_title], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_file] DEFAULT ('') FOR [mod_file], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_version] DEFAULT ('') FOR [mod_version], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_author_handle] DEFAULT ('') FOR [mod_author_handle], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_author_email] DEFAULT ('') FOR [mod_author_email], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_author_name] DEFAULT ('') FOR [mod_author_name], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_author_url] DEFAULT ('') FOR [mod_author_url], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_description] DEFAULT ('') FOR [mod_description], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_process_date] DEFAULT ('0') FOR [mod_process_date], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_phpBB_version] DEFAULT ('') FOR [mod_phpBB_version], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_processed_themes] DEFAULT ('') FOR [mod_processed_themes], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_processed_langs] DEFAULT ('') FOR [mod_processed_langs], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_files_edited] DEFAULT ('0') FOR [mod_files_edited], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_tables_added] DEFAULT ('0') FOR [mod_tables_added], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_tables_altered] DEFAULT ('0') FOR [mod_tables_altered], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_rows_inserted] DEFAULT ('0') FOR [mod_rows_inserted]" ; ! // GO" ; ! ! } ! ! if( $create_easymod_processed_files_table ) ! { ! $sql[] = "CREATE TABLE [" . EASYMOD_PROCESSED_FILES_TABLE . "] ( ! [mod_id] [int] NOT NULL, ! [mod_processed_file] [varchar] (255) NULL ! ) ON [PRIMARY];" ; ! //GO" ; ! $sql[] = "ALTER TABLE [" . EASYMOD_PROCESSED_FILES_TABLE . "] WITH NOCHECK ADD ! CONSTRAINT [DF_" . EASYMOD_PROCESSED_FILES_TABLE . "_mod_processed_file] DEFAULT ('') FOR [mod_processed_file], ! CONSTRAINT [DF_" . EASYMOD_PROCESSED_FILES_TABLE . "_mod_id] DEFAULT ('0') FOR [mod_id]"; ! //GO" ; ! $sql[] = "CREATE INDEX [" . EASYMOD_PROCESSED_FILES_TABLE . "_IX1] ! ON [" . EASYMOD_PROCESSED_FILES_TABLE . "]([mod_processed_file]) ON [PRIMARY]"; ! //GO" ; ! $sql[] = "CREATE INDEX [" . EASYMOD_PROCESSED_FILES_TABLE . "_IX2] ! ON [" . EASYMOD_PROCESSED_FILES_TABLE . "]([mod_id]) ON [PRIMARY]"; ! //GO" ; ! } /* *************** *** 950,971 **** case 'msaccess': ! $sql[] = "CREATE TABLE " . EASYMOD_TABLE . " ( ! mod_id COUNTER NOT NULL CONSTRAINT PK_" . EASYMOD_TABLE . " PRIMARY KEY, ! mod_title TEXT(255) NULL, ! mod_file TEXT(255) NULL, ! mod_version TEXT(15) NULL, ! mod_author_handle TEXT(25) NULL, ! mod_author_email TEXT(100) NULL, ! mod_author_name TEXT(100) NULL, ! mod_author_url TEXT(100) NULL, ! mod_description MEMO NULL, ! mod_process_date INTEGER NULL, ! mod_phpBB_version TEXT(15) NULL, ! mod_processed_themes TEXT(200) NULL, ! mod_processed_langs TEXT(200) NULL, ! mod_files_edited INTEGER NULL, ! mod_tables_added INTEGER NULL, ! mod_tables_altered INTEGER NULL, ! mod_rows_inserted INTEGER NULL )" ; break ; --- 1003,1036 ---- case 'msaccess': ! if( $create_easymod_table ) ! { ! $sql[] = "CREATE TABLE " . EASYMOD_TABLE . " ( ! mod_id COUNTER NOT NULL CONSTRAINT PK_" . EASYMOD_TABLE . " PRIMARY KEY, ! mod_title TEXT(255) NULL, ! mod_file TEXT(255) NULL, ! mod_version TEXT(15) NULL, ! mod_author_handle TEXT(25) NULL, ! mod_author_email TEXT(100) NULL, ! mod_author_name TEXT(100) NULL, ! mod_author_url TEXT(100) NULL, ! mod_description MEMO NULL, ! mod_process_date INTEGER NULL, ! mod_phpBB_version TEXT(15) NULL, ! mod_processed_themes TEXT(200) NULL, ! mod_processed_langs TEXT(200) NULL, ! mod_files_edited INTEGER NULL, ! mod_tables_added INTEGER NULL, ! mod_tables_altered INTEGER NULL, ! mod_rows_inserted INTEGER NULL )" ; ! } ! ! if( $create_easymod_processed_files_table ) ! { ! $sql[] = 'CREATE TABLE ' . EASYMOD_PROCESSED_FILES_TABLE . " ( ! mod_processed_file TEXT(255) NOT NULL DEFAULT '', ! mod_id INTEGER NOT NULL DEFAULT '0' )"; ! $sql[] = 'CREATE INDEX ' . EASYMOD_PROCESSED_FILES_TABLE . '_ix1 ON ' . EASYMOD_PROCESSED_FILES_TABLE . ' (mod_processed_file)'; ! $sql[] = 'CREATE INDEX ' . EASYMOD_PROCESSED_FILES_TABLE . '_ix2 ON ' . EASYMOD_PROCESSED_FILES_TABLE . ' (mod_id)'; ! } break ; *************** *** 979,993 **** ! // if the EM table already exists, then don't bother making it again ! $test_sql = "SELECT * FROM " . EASYMOD_TABLE ; ! if ( $result = $db->sql_query($test_sql)) { echo '<p>' . $lang['EM_progress'] . ' :: <b class="ok">' . $lang['EM_done'] . '</b> - ' . $lang['EM_already_exist'] . "<br />\n" ; } ! // we need to create the table else { ! echo '<b>' . $lang['EM_exec_sql'] . ': </b>' ; for($i = 0; $i < count($sql); $i++) { --- 1044,1057 ---- ! // if the EM tables already exist, then don't bother making them again ! if ( count($sql) <= 0 ) { echo '<p>' . $lang['EM_progress'] . ' :: <b class="ok">' . $lang['EM_done'] . '</b> - ' . $lang['EM_already_exist'] . "<br />\n" ; } ! // we need to create the EM tables else { ! echo '<b>' . $lang['EM_exec_sql'] . ": </b><br />\n"; for($i = 0; $i < count($sql); $i++) { *************** *** 1625,1628 **** --- 1689,1695 ---- _sql($sql, $errored, $error_ary); + // save the new record id for later use. + $mod_id = $db->sql_nextid(); + echo '</b> <b class="ok">' . $lang['EM_done'] . '</b><br />' . $lang['EM_result'] . " :: \n"; *************** *** 1645,1648 **** --- 1712,1827 ---- + // populate the processed files table + echo "<br /><br /><strong>" . $lang['EM_store_files'] . "</strong><br />\n<br />\n" ; + + // If we're upgrading, then there might be data here already + $sql_test = 'SELECT COUNT(*) AS cnt FROM ' . EASYMOD_PROCESSED_FILES_TABLE; + if( !($result = $db->sql_query($sql_test)) ) + { + handle_error( OPEN_FAIL_CRITICAL, $file_list, false, "<p>" . $lang['EM_err_em_info'] . "</p>\n") ; + } + $epf_count = $db->sql_fetchrow($result); + $epf_count = intval($epf_count['cnt']); + + $sql = array(); + + if( $epf_count > 0 ) + { + // if we found records here, that means we have all data from all previously processed MODs + // all we have to do is add a new record corresponding to this version of EM. + $processed_file = "admin/admin_easymod.$phpEx"; + $sql[] = 'INSERT INTO ' . EASYMOD_PROCESSED_FILES_TABLE . " (mod_processed_file, mod_id) + VALUES ('" . $processed_file . "', " . $mod_id . ")"; + // Note $mod_id was stored just after inserting the the record for this EM installation. + } + else + { + // if NO records were found here, that means: + // a) this is a new EM installation. + // b) we are upgrading to the first EM version capable of recording processed files. + // The same logic applies to both scenarios. We have to parse all MODs found in the main + // EM table (there would be just one if its a new installation or many if it's an upgrade). + $sql_test = 'SELECT mod_id, mod_title, mod_file + FROM ' . EASYMOD_TABLE . ' + ORDER BY mod_id'; + if( !($result = $db->sql_query($sql_test)) ) + { + handle_error( OPEN_FAIL_CRITICAL, $file_list, false, "<p>" . $lang['EM_err_em_info'] . "</p>\n") ; + } + $em_rows = $db->sql_fetchrowset($result); + $em_count = count($em_rows); + + // for each MOD we'll read its 'post_process.bat' file to get + // its list of processed files from there. + for( $i = 0; $i < $em_count; $i++ ) + { + if( $em_rows[$i]['mod_title'] == 'EasyMOD' ) + { + $processed_file = "admin/admin_easymod.$phpEx"; + $sql[] = 'INSERT INTO ' . EASYMOD_PROCESSED_FILES_TABLE . " (mod_processed_file, mod_id) + VALUES ('" . $processed_file . "', " . $em_rows[$i]['mod_id'] . ")"; + continue; + } + + // current working directory is admin/mods/easymod, so we should be able to reach MODs like this: + $post_process_bat = dirname('../' . $em_rows[$i]['mod_file']) . '/post_process.bat'; + + // Ignore errors when reading 'post_process.bat' files + if( @file_exists($post_process_bat) && ($read_file = @fopen($post_process_bat, 'r')) ) + { + while( !feof($read_file) ) + { + $newline = fgets($read_file, 4096); + $parms = explode(' ', str_replace(array('\\', "\n", "\r"), array('/', '', ''), $newline)); + if( $parms[0] == 'copy' ) + { + $split_to = explode('/', $parms[2]); + if( $split_to[0] == 'backups' ) + { + $processed_file = (substr($parms[1], 0, 9) == '../../../') ? substr($parms[1], 9) : $parms[1]; + $sql[] = 'INSERT INTO ' . EASYMOD_PROCESSED_FILES_TABLE . " (mod_processed_file, mod_id) + VALUES ('" . $processed_file . "', " . $em_rows[$i]['mod_id'] . ")"; + } + } + } + @fclose($read_file); + } + } + } + + echo '<b>' . $lang['EM_exec_sql'] . ": </b><br />\n"; + for($i = 0; $i < count($sql); $i++) + { + echo "$sql[$i]<br />\n" ; + } + + echo '<p>' . $lang['EM_progress'] . ' :: <b>'; + flush(); + + $error_ary = array(); + $errored = false; + for($i = 0; $i < count($sql); $i++) + { + _sql($sql[$i], $errored, $error_ary); + } + + echo '</b> <b class="ok">' . $lang['EM_done'] . '</b><br />' . $lang['EM_result'] . " :: \n"; + + if ( $errored ) + { + echo ' <b>' . $lang['EM_failed_sql'] . "</b>\n<ul>"; + + for($i = 0; $i < count($error_ary['sql']); $i++) + { + echo '<li>' . $lang['EM_err_error'] . ' :: <b>' . $error_ary['error_code'][$i]['message'] . "</b><br />\n"; + echo "SQL :: <b>" . $error_ary['sql'][$i] . "</b><br /><br /></li>\n"; + } + echo "</ul>\n<p>" . $lang['EM_no_worry'] . "</p>\n"; + } + else + { + echo '<b>' . $lang['EM_no_errors'] . "</b>\n"; + } + // *************** *** 1667,1669 **** } ! ?> --- 1846,1848 ---- } ! ?> \ No newline at end of file |
From: Markus P. <mar...@us...> - 2005-07-29 17:33:16
|
Update of /cvsroot/easymod/easymod2/mods/easymod/em_includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15980/mods/easymod/em_includes Modified Files: em_functions.php Log Message: Implementation of the following extensions: - Record Processed Files. - Restore Backups. - Delete MOD Record. Index: em_functions.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_functions.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** em_functions.php 15 Jul 2005 05:21:21 -0000 1.15 --- em_functions.php 29 Jul 2005 17:33:08 -0000 1.16 *************** *** 30,33 **** --- 30,34 ---- // define the EM table; there is no need to add this to constants.php define('EASYMOD_TABLE', $table_prefix.'easymod'); + define('EASYMOD_PROCESSED_FILES_TABLE', $table_prefix.'easymod_processed_files'); define('OPEN_OK', 0); |
From: Markus P. <mar...@us...> - 2005-07-29 09:46:53
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23879 Modified Files: admin_easymod.php.txt Log Message: Fixed condition for the 'uninstall' step in the main admin_easymod.php process, IIRC, it was first reported by Nux at Area51. Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** admin_easymod.php.txt 22 Jul 2005 19:17:30 -0000 1.25 --- admin_easymod.php.txt 29 Jul 2005 09:46:44 -0000 1.26 *************** *** 1229,1233 **** // uninstall the mod // ! else if ( $mode == 'unistall_mod' ) { message_die(GENERAL_MESSAGE, $lang['Coming_soon']); --- 1229,1233 ---- // uninstall the mod // ! else if ( $mode == 'uninstall' ) { message_die(GENERAL_MESSAGE, $lang['Coming_soon']); |
From: Jim W. <ter...@us...> - 2005-07-22 19:17:39
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15388/mods/easymod/includes Modified Files: admin_easymod.php.txt Log Message: - Previews now works for the INCREMENT action. Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** admin_easymod.php.txt 15 Jul 2005 05:21:25 -0000 1.24 --- admin_easymod.php.txt 22 Jul 2005 19:17:30 -0000 1.25 *************** *** 1767,1771 **** if ($i>0) { ! $do_preview = ((strstr($commands[$i-1]['command'], 'IN-LINE')) && ($preview)) ? true : false ; } else --- 1767,1771 ---- if ($i>0) { ! $do_preview = ((strstr($commands[$i-1]['command'], 'IN-LINE') || $commands[$i-1]['command'] == 'INCREMENT') && ($preview)) ? true : false ; } else *************** *** 1833,1837 **** // if we were doing an BEFORE or an IN-LINE command we need to write out the find_array // also, see if we need to write the lines in preview format ! $do_preview = ((strstr($commands[$i-1]['command'], 'IN-LINE')) && ($preview)) ? true : false ; write_find_array( $find_array, $file_list, $do_preview) ; --- 1833,1837 ---- // if we were doing an BEFORE or an IN-LINE command we need to write out the find_array // also, see if we need to write the lines in preview format ! $do_preview = ((strstr($commands[$i-1]['command'], 'IN-LINE') || $commands[$i-1]['command'] == 'INCREMENT') && ($preview)) ? true : false ; write_find_array( $find_array, $file_list, $do_preview) ; *************** *** 1881,1885 **** // see if we need to write the lines in preview format ! $do_preview = ((strstr($commands[$i-1]['command'], 'IN-LINE')) && ($preview)) ? true : false ; write_find_array( $find_array, $file_list, $do_preview) ; --- 1881,1885 ---- // see if we need to write the lines in preview format ! $do_preview = ((strstr($commands[$i-1]['command'], 'IN-LINE') || $commands[$i-1]['command'] == 'INCREMENT') && ($preview)) ? true : false ; write_find_array( $find_array, $file_list, $do_preview) ; *************** *** 2364,2368 **** { // also, see if we need to write the lines in preview format ! $do_preview = ((strstr($commands[$i-1]['command'], 'IN-LINE')) && ($preview)) ? true : false ; write_find_array( $find_array, $file_list, $do_preview) ; $find_array = array() ; --- 2364,2368 ---- { // also, see if we need to write the lines in preview format ! $do_preview = ((strstr($commands[$i-1]['command'], 'IN-LINE') || $commands[$i-1]['command'] == 'INCREMENT') && ($preview)) ? true : false ; write_find_array( $find_array, $file_list, $do_preview) ; $find_array = array() ; *************** *** 2428,2432 **** { // also, see if we need to write the lines in preview format ! $do_preview = (strstr($commands[$i-1]['command'], 'IN-LINE')) ? true : false ; write_find_array( $find_array, $file_list, $do_preview) ; } --- 2428,2432 ---- { // also, see if we need to write the lines in preview format ! $do_preview = ((strstr($commands[$i-1]['command'], 'IN-LINE') || $commands[$i-1]['command'] == 'INCREMENT') && ($preview)) ? true : false ; write_find_array( $find_array, $file_list, $do_preview) ; } *************** *** 3270,3272 **** include('page_footer_admin.'.$phpEx); ! ?> --- 3270,3272 ---- include('page_footer_admin.'.$phpEx); ! ?> \ No newline at end of file |
From: Jim W. <ter...@us...> - 2005-07-15 05:21:34
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7072/mods/easymod/includes Modified Files: admin_easymod.php.txt Log Message: IN-LINE FINDs preceeding INCREMENTs now return errors as appropriate. Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** admin_easymod.php.txt 10 Jul 2005 22:10:01 -0000 1.23 --- admin_easymod.php.txt 15 Jul 2005 05:21:25 -0000 1.24 *************** *** 1961,1972 **** $inc_data[2] = isset($inc_data[2]) ? $inc_data[2] : 1; ! // perform the increment as appropriate ! for ( $file = 0; $file < count($file_list); $file++ ) { for ( $j = 0; $j < count($find_array); $j++ ) { $increment_search = ($search_fragment != '') ? $search_fragment : $search_array[$j]; ! $find_array[$file][$j] = increment_wildcard($inc_data[1], $inc_data[2], $increment_search, $find_array[$file][$j]); } } } --- 1961,2021 ---- $inc_data[2] = isset($inc_data[2]) ? $inc_data[2] : 1; ! // perform the increment / throw an error as appropriate ! for ( $file_count = 0; $file_count < count($file_list); $file_count++ ) { for ( $j = 0; $j < count($find_array); $j++ ) { $increment_search = ($search_fragment != '') ? $search_fragment : $search_array[$j]; ! $result = increment_wildcard($inc_data[1], $inc_data[2], $increment_search, $find_array[$file_count][$j]); ! if ($result !== false) ! { ! $find_array[$file_count][$j] = $result; ! break; ! } } + if ($j == count($find_array)) + { + // halt if this is an english lang file + if (strstr( $file_list[$file_count]->path, 'language/lang_english')) + { + $file_list[$file_count]->err_msg = '<b>' . $lang['EM_err_critical_error'] . '</b><br /><br />' ; + $err_level = FIND_FAIL_CRITICAL ; + } + + // halt if this is a subsilver style file + else if (strstr( $file_list[$file_count]->path, 'templates/subSilver')) + { + $file_list[$file_count]->err_msg = '<b>' . $lang['EM_err_critical_error'] . '</b><br /><br />' ; + $err_level = FIND_FAIL_CRITICAL ; + } + + // if a different lang, then allow to continue processing + else if (strstr( $file_list[$file_count]->path, 'language/lang_')) + { + $file_list[$file_count]->err_msg = '<b>' . $lang['EM_err_warning'] . '</b><br /><br />' ; + $err_level = FIND_FAIL_OK ; + } + + // if a different style file, then allow to continue processing + else if (strstr( $file_list[$file_count]->path, 'templates/')) + { + $file_list[$file_count]->err_msg = '<b>' . $lang['EM_err_warning'] . '</b><br /><br />' ; + $err_level = FIND_FAIL_OK ; + } + + // any other file then halt processing + else + { + $file_list[$file_count]->err_msg = '<b>' . $lang['EM_err_critical_error'] . '</b><br /><br />' ; + $err_level = FIND_FAIL_CRITICAL ; + } + $file_list[$file_count]->err_msg .= sprintf( $lang['EM_err_ifind_fail'], $file_list[$file_count]->path . trim($file_list[$file_count]->filename)) . ':<br /><br />' . htmlspecialchars($search_fragment) . "<br />\n" ; + } + } + // 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( $err_level, $file_list, $commands[$i]['line'], true, $find_array)) + { + break ; } } |
From: Jim W. <ter...@us...> - 2005-07-15 05:21:34
|
Update of /cvsroot/easymod/easymod2/mods/easymod/em_includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7072/mods/easymod/em_includes Modified Files: em_functions.php Log Message: IN-LINE FINDs preceeding INCREMENTs now return errors as appropriate. Index: em_functions.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_functions.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** em_functions.php 8 Jul 2005 17:15:53 -0000 1.14 --- em_functions.php 15 Jul 2005 05:21:21 -0000 1.15 *************** *** 672,675 **** --- 672,679 ---- } $beg = preg_replace('#^(.*'.implode('\d+',$parts).').*#s','$1',$search_result,1); + if ($beg == $search_result) + { + return false; + } $aft = substr($search_result,strlen($beg)); $num = preg_replace('#^(\\d+).*#','$1',$aft); |
From: Eric F. <wg...@us...> - 2005-07-10 22:55:04
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17044/mods/easymod Modified Files: easymod_install.php Log Message: wish that bug report was reported an hour earlier, oh well Index: easymod_install.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_install.php,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** easymod_install.php 10 Jul 2005 22:10:01 -0000 1.27 --- easymod_install.php 10 Jul 2005 22:54:47 -0000 1.28 *************** *** 763,767 **** $command_file->afile[] = 'copy includes/mod_sql_body.tpl ../../../' . $files[$i]['path'] . 'mod_sql_body.tpl' ; $command_file->afile[] = 'copy includes/mod_preview.tpl ../../../' . $files[$i]['path'] . 'mod_preview.tpl' ; ! $command_file->afile[] = 'copy easymod.gif ../../../' . $pics[$i]['path'] . 'easymod.gif' ; $command_file->afile[] = 'copy includes/emc.gif ../../../' . $pics[$i]['path'] . 'emc.gif' ; --- 763,768 ---- $command_file->afile[] = 'copy includes/mod_sql_body.tpl ../../../' . $files[$i]['path'] . 'mod_sql_body.tpl' ; $command_file->afile[] = 'copy includes/mod_preview.tpl ../../../' . $files[$i]['path'] . 'mod_preview.tpl' ; ! $command_file->afile[] = 'copy includes/mod_diy_body.tpl ../../../' . $files[$i]['path'] . 'mod_diy_body.tpl'; ! $command_file->afile[] = 'copy easymod.gif ../../../' . $pics[$i]['path'] . 'easymod.gif' ; $command_file->afile[] = 'copy includes/emc.gif ../../../' . $pics[$i]['path'] . 'emc.gif' ; |
From: Eric F. <wg...@us...> - 2005-07-10 22:10:40
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25066/mods/easymod Modified Files: easymod_install.php Log Message: maybe some day I will be able to do this right the first time Index: easymod_install.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_install.php,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** easymod_install.php 10 Jul 2005 22:06:54 -0000 1.26 --- easymod_install.php 10 Jul 2005 22:10:01 -0000 1.27 *************** *** 24,28 **** $script_path = 'admin/mods/easymod/' ; //// ! $easymod_install_version = '0.2.1' ; //// --- 24,28 ---- $script_path = 'admin/mods/easymod/' ; //// ! $easymod_install_version = '0.2.1a' ; //// |
From: Eric F. <wg...@us...> - 2005-07-10 22:10:21
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25066/mods/easymod/includes Modified Files: admin_easymod.php.txt Log Message: maybe some day I will be able to do this right the first time Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** admin_easymod.php.txt 10 Jul 2005 22:06:55 -0000 1.22 --- admin_easymod.php.txt 10 Jul 2005 22:10:01 -0000 1.23 *************** *** 95,101 **** /// /// ! define('EASYMOD_VER', 'beta1 (0.2.1)') ; ! define('FAQ_LINK', '<a href="http://area51.phpbb.com/phpBB22/viewtopic.php?t=12141" target="_blank">') ; ! define('REPORT_LINK', '<a href="http://area51.phpbb.com/phpBB22/viewtopic.php?t=12143" target="_blank">') ; /// /// --- 95,101 ---- /// /// ! define('EASYMOD_VER', 'beta1 (0.2.1a)') ; ! define('FAQ_LINK', '<a href="http://area51.phpbb.com/phpBB/viewtopic.php?t=12141" target="_blank">') ; ! define('REPORT_LINK', '<a href="http://area51.phpbb.com/phpBB/viewtopic.php?t=12143" target="_blank">') ; /// /// *************** *** 2728,2732 **** if (( $error == '') && ((SQL_LAYER == 'mssql') || (SQL_LAYER == 'postgresql'))) { ! $link = 'http://area51.phpbb.com/phpBB22/viewtopic.php?t=' ; $link .= (SQL_LAYER == 'postgresql') ? '15388' : '15389' ; --- 2728,2732 ---- if (( $error == '') && ((SQL_LAYER == 'mssql') || (SQL_LAYER == 'postgresql'))) { ! $link = 'http://area51.phpbb.com/phpBB/viewtopic.php?t=' ; $link .= (SQL_LAYER == 'postgresql') ? '15388' : '15389' ; |
From: Eric F. <wg...@us...> - 2005-07-10 22:07:08
|
Update of /cvsroot/easymod/easymod2/mods/easymod/em_includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23448/mods/easymod/em_includes Modified Files: em_ftp.php Log Message: grumble ... php 5 functions ... Index: em_ftp.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_ftp.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** em_ftp.php 8 Jul 2005 00:22:56 -0000 1.6 --- em_ftp.php 10 Jul 2005 22:06:55 -0000 1.7 *************** *** 1070,1074 **** { $perms = 0 . intval($perms); ! if ( ftp_chmod($this->ftp_conn_id, $perms, $file) ) { return true; --- 1070,1074 ---- { $perms = 0 . intval($perms); ! if ( function_exists('ftp_chmod') && ftp_chmod($this->ftp_conn_id, $perms, $file) ) { return true; |
From: Eric F. <wg...@us...> - 2005-07-10 22:07:07
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23448/mods/easymod/includes Modified Files: admin_easymod.php.txt Log Message: grumble ... php 5 functions ... Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** admin_easymod.php.txt 8 Jul 2005 00:22:56 -0000 1.21 --- admin_easymod.php.txt 10 Jul 2005 22:06:55 -0000 1.22 *************** *** 95,99 **** /// /// ! define('EASYMOD_VER', 'beta1 (0.2.0b)') ; define('FAQ_LINK', '<a href="http://area51.phpbb.com/phpBB22/viewtopic.php?t=12141" target="_blank">') ; define('REPORT_LINK', '<a href="http://area51.phpbb.com/phpBB22/viewtopic.php?t=12143" target="_blank">') ; --- 95,99 ---- /// /// ! define('EASYMOD_VER', 'beta1 (0.2.1)') ; define('FAQ_LINK', '<a href="http://area51.phpbb.com/phpBB22/viewtopic.php?t=12141" target="_blank">') ; define('REPORT_LINK', '<a href="http://area51.phpbb.com/phpBB22/viewtopic.php?t=12143" target="_blank">') ; |
From: Eric F. <wg...@us...> - 2005-07-10 22:07:07
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23448/mods/easymod Modified Files: easymod_install.php Log Message: grumble ... php 5 functions ... Index: easymod_install.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_install.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** easymod_install.php 30 Jun 2005 21:10:47 -0000 1.25 --- easymod_install.php 10 Jul 2005 22:06:54 -0000 1.26 *************** *** 24,28 **** $script_path = 'admin/mods/easymod/' ; //// ! $easymod_install_version = '0.2.0b' ; //// --- 24,28 ---- $script_path = 'admin/mods/easymod/' ; //// ! $easymod_install_version = '0.2.1' ; //// |
From: Eric F. <wg...@us...> - 2005-07-08 17:16:04
|
Update of /cvsroot/easymod/easymod2/mods/easymod/em_includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv433/mods/easymod/em_includes Modified Files: em_functions.php Log Message: bug fixes Index: em_functions.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_functions.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** em_functions.php 28 Jun 2005 19:25:46 -0000 1.13 --- em_functions.php 8 Jul 2005 17:15:53 -0000 1.14 *************** *** 697,701 **** $sP = 'b'; elseif($in_Perms & 0x8000) // Regular ! $sP = '−'; elseif($in_Perms & 0xA000) // Symbolic Link $sP = 'l'; --- 697,701 ---- $sP = 'b'; elseif($in_Perms & 0x8000) // Regular ! $sP = '-;'; elseif($in_Perms & 0xA000) // Symbolic Link $sP = 'l'; *************** *** 706,725 **** // owner ! $sP .= (($in_Perms & 0x0100) ? 'r' : '−') . ! (($in_Perms & 0x0080) ? 'w' : '−') . (($in_Perms & 0x0040) ? (($in_Perms & 0x0800) ? 's' : 'x' ) : ! (($in_Perms & 0x0800) ? 'S' : '−')); // group ! $sP .= (($in_Perms & 0x0020) ? 'r' : '−') . ! (($in_Perms & 0x0010) ? 'w' : '−') . (($in_Perms & 0x0008) ? (($in_Perms & 0x0400) ? 's' : 'x' ) : ! (($in_Perms & 0x0400) ? 'S' : '−')); // world ! $sP .= (($in_Perms & 0x0004) ? 'r' : '−') . ! (($in_Perms & 0x0002) ? 'w' : '−') . (($in_Perms & 0x0001) ? (($in_Perms & 0x0200) ? 't' : 'x' ) : ! (($in_Perms & 0x0200) ? 'T' : '−')); return $sP ; --- 706,725 ---- // owner ! $sP .= (($in_Perms & 0x0100) ? 'r' : '-') . ! (($in_Perms & 0x0080) ? 'w' : '-') . (($in_Perms & 0x0040) ? (($in_Perms & 0x0800) ? 's' : 'x' ) : ! (($in_Perms & 0x0800) ? 'S' : '-')); // group ! $sP .= (($in_Perms & 0x0020) ? 'r' : '-') . ! (($in_Perms & 0x0010) ? 'w' : '-') . (($in_Perms & 0x0008) ? (($in_Perms & 0x0400) ? 's' : 'x' ) : ! (($in_Perms & 0x0400) ? 'S' : '-')); // world ! $sP .= (($in_Perms & 0x0004) ? 'r' : '-') . ! (($in_Perms & 0x0002) ? 'w' : '-') . (($in_Perms & 0x0001) ? (($in_Perms & 0x0200) ? 't' : 'x' ) : ! (($in_Perms & 0x0200) ? 'T' : '-')); return $sP ; |
From: Eric F. <wg...@us...> - 2005-07-08 00:23:06
|
Update of /cvsroot/easymod/easymod2/mods/easymod/em_includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5248/mods/easymod/em_includes Modified Files: em_ftp.php em_modio.php Log Message: ftp bug fixes, ended up making it so that it deletes the file before moving it into place, this could cause problems Index: em_ftp.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_ftp.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** em_ftp.php 7 Jul 2005 17:14:14 -0000 1.5 --- em_ftp.php 8 Jul 2005 00:22:56 -0000 1.6 *************** *** 678,695 **** if (!$fp) { $this->_debug_print("Error : Cannot read file \"".$localfile."\"\n"); ! $this->_debug_print("Error : PUT command failed\n"); return FALSE; } if (!$this->_type($mode)) { ! $this->_debug_print("Error : PUT command failed\n"); return FALSE; } if (!($string = $this->_pasv())) { ! $this->_debug_print("Error : PUT command failed\n"); return FALSE; } $this->_putcmd("STOR", $remotefile); --- 678,698 ---- if (!$fp) { $this->_debug_print("Error : Cannot read file \"".$localfile."\"\n"); ! $this->_debug_print("Error : PUT1 command failed\n"); return FALSE; } if (!$this->_type($mode)) { ! $this->_debug_print("Error : PUT2 command failed\n"); return FALSE; } if (!($string = $this->_pasv())) { ! $this->_debug_print("Error : PUT3 command failed\n"); return FALSE; } + // delete the old file and then move on + $this->ftp_delete($remotefile); + $this->_putcmd("STOR", $remotefile); *************** *** 697,701 **** if (!$sock_data || !$this->_ok()) { $this->_debug_print("Error : Cannot connect to remote host\n"); ! $this->_debug_print("Error : PUT command failed\n"); return FALSE; } --- 700,704 ---- if (!$sock_data || !$this->_ok()) { $this->_debug_print("Error : Cannot connect to remote host\n"); ! $this->_debug_print("Error : PUT4 command failed\n"); return FALSE; } *************** *** 711,716 **** $response = $this->_ok(); if (!$response) { ! $this->_debug_print("Error : PUT command failed\n"); } return $response; } --- 714,734 ---- $response = $this->_ok(); if (!$response) { ! $this->_debug_print("Error : PUT5 command failed\n"); ! ! // try deleting the file and then moving it into place after that ! if ( $this->ftp_delete($remotefile) ) ! { ! $this->_putcmd("STOR", $remotefile); ! $response = $this->_ok(); ! if (!$response) { ! $this->_debug_print("Error : PUT6 command failed\n"); ! } ! } ! else ! { ! $this->_debug_print("Error : DELE command failed\n"); ! } } + return $response; } *************** *** 1051,1055 **** else { ! if ( @ftp_chmod($this->ftp_conn_id, $file, $perms) ) { return true; --- 1069,1074 ---- else { ! $perms = 0 . intval($perms); ! if ( ftp_chmod($this->ftp_conn_id, $perms, $file) ) { return true; *************** *** 1058,1062 **** { $chmod_cmd = 'CHMOD ' . $perms . ' ' .$file; ! return @ftp_site($this->ftp_conn_id, $chmod_cmd); } } --- 1077,1081 ---- { $chmod_cmd = 'CHMOD ' . $perms . ' ' .$file; ! return ftp_site($this->ftp_conn_id, $chmod_cmd); } } *************** *** 1083,1086 **** --- 1102,1115 ---- $result = ftp_put( $this->ftp_conn_id, $remote_filename, $local_filename, ($file_type==1) ? FTP_BINARY : FTP_ASCII ) ; + + // if did not work, attempt to delete the file and then move the new one in place + if ( !$result ) + { + if ( ftp_delete($this->ftp_conn_id, $remote_filename) ) + { + $result = ftp_put( $this->ftp_conn_id, $remote_filename, $local_filename, ($file_type==1) ? FTP_BINARY : FTP_ASCII ) ; + } + } + if ( $result ) { *************** *** 1097,1101 **** if ($this->ftp_type == 'fsock') { ! return $this->ftp->ftp_put_array( $to_file, $array_lines, 0) ; } else --- 1126,1135 ---- if ($this->ftp_type == 'fsock') { ! $result = $this->ftp->ftp_put_array( $to_file, $array_lines, 0) ; ! if ( $result ) ! { ! $this->emftp_chmod($to_file, '0644'); ! } ! return $result; } else |
From: Eric F. <wg...@us...> - 2005-07-08 00:23:06
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5248/mods/easymod/includes Modified Files: admin_easymod.php.txt Log Message: ftp bug fixes, ended up making it so that it deletes the file before moving it into place, this could cause problems Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** admin_easymod.php.txt 3 Jul 2005 02:42:19 -0000 1.20 --- admin_easymod.php.txt 8 Jul 2005 00:22:56 -0000 1.21 *************** *** 46,49 **** --- 46,50 ---- // $phpbb_root_path = './../'; + $script_path = 'admin/'; require($phpbb_root_path . 'extension.inc'); *************** *** 944,948 **** // ftp settings $ftp_user = (isset($HTTP_POST_VARS['ftp_user'])) ? htmlspecialchars( $HTTP_POST_VARS['ftp_user']) : '' ; ! $ftp_pass = (isset($HTTP_POST_VARS['ftp_pass']) && !empty($HTTP_POST_VARS['ftp_pass'])) ? htmlspecialchars( $HTTP_POST_VARS['ftp_pass']) : $command_file->ftp_pass ; $ftp_host = (isset($HTTP_POST_VARS['ftp_host'])) ? htmlspecialchars( $HTTP_POST_VARS['ftp_host']) : '' ; $ftp_port = (isset($HTTP_POST_VARS['ftp_port'])) ? intval( $HTTP_POST_VARS['ftp_port']) : 0 ; --- 945,949 ---- // ftp settings $ftp_user = (isset($HTTP_POST_VARS['ftp_user'])) ? htmlspecialchars( $HTTP_POST_VARS['ftp_user']) : '' ; ! $ftp_pass = (isset($HTTP_POST_VARS['ftp_pass'])) ? htmlspecialchars( $HTTP_POST_VARS['ftp_pass']) : '' ; $ftp_host = (isset($HTTP_POST_VARS['ftp_host'])) ? htmlspecialchars( $HTTP_POST_VARS['ftp_host']) : '' ; $ftp_port = (isset($HTTP_POST_VARS['ftp_port'])) ? intval( $HTTP_POST_VARS['ftp_port']) : 0 ; *************** *** 952,959 **** $ftp_dir == ( $ftp_dir == '') ? '/' : $ftp_dir ; - // if user is removing ftp server, then remove the password as well - $ftp_pass = ( !empty($ftp_host) ) ? $ftp_pass : ''; - - // confirm passwords match and update pw if needed if ( $em_pass == $em_pass_confirm) --- 953,956 ---- *************** *** 962,965 **** --- 959,963 ---- em_db_update( 'EM_password', md5($em_pass)) ; $pass_msg = ($em_pass == '') ? $lang['EM_pass_disabled'] : $lang['EM_pass_updated'] ; + $force_ftp_pass = true; } // the confirm is empty so they are not trying to update the pw, so don't *************** *** 967,970 **** --- 965,969 ---- { $pass_msg = $lang['EM_pass_not_updated'] ; + $force_ftp_pass = false; } // passwords do not match so throw an error *************** *** 974,982 **** } - // decrypt the FTP password - include($phpbb_root_path . '/admin/em_includes/em_cipher.php') ; - $cipher = new Cipher_BlockMode_cbc(); - $cipher->blowfish->setKey( $em_pass); - $ftp_pass = $cipher->encrypt( $ftp_pass) ; // update the settings --- 973,976 ---- *************** *** 986,990 **** em_db_update( 'EM_ftp_dir', $ftp_dir) ; em_db_update( 'EM_ftp_user', $ftp_user) ; ! em_db_update( 'EM_ftp_pass', $ftp_pass) ; em_db_update( 'EM_ftp_host', $ftp_host) ; em_db_update( 'EM_ftp_port', $ftp_port) ; --- 980,995 ---- em_db_update( 'EM_ftp_dir', $ftp_dir) ; em_db_update( 'EM_ftp_user', $ftp_user) ; ! ! if ( $force_ftp_pass || !empty($ftp_pass) ) ! { ! // decrypt the FTP password ! include($phpbb_root_path . '/admin/em_includes/em_cipher.php') ; ! $cipher = new Cipher_BlockMode_cbc(); ! $cipher->blowfish->setKey( $em_pass); ! $ftp_pass = $cipher->encrypt( $ftp_pass) ; ! ! em_db_update( 'EM_ftp_pass', $ftp_pass) ; ! } ! em_db_update( 'EM_ftp_host', $ftp_host) ; em_db_update( 'EM_ftp_port', $ftp_port) ; *************** *** 1197,1201 **** { // display confirm and move the backups into place ! message_die(GENERAL_MESSAGE, $lang['Coming_soon']); } --- 1202,1206 ---- { // display confirm and move the backups into place ! message_die(GENERAL_ERROR, $lang['Coming_soon']); } *************** *** 1207,1211 **** { // list which languages so user can choose and go through install process ! message_die(GENERAL_MESSAGE, $lang['Coming_soon']); } --- 1212,1216 ---- { // list which languages so user can choose and go through install process ! message_die(GENERAL_ERROR, $lang['Coming_soon']); } *************** *** 1217,1221 **** { // list which themes so user can choose and go through install process ! message_die(GENERAL_MESSAGE, $lang['Coming_soon']); } --- 1222,1226 ---- { // list which themes so user can choose and go through install process ! message_die(GENERAL_ERROR, $lang['Coming_soon']); } *************** *** 1224,1228 **** // uninstall the mod // ! else if ( $mode == 'uninstall_mod' ) { message_die(GENERAL_MESSAGE, $lang['Coming_soon']); --- 1229,1233 ---- // uninstall the mod // ! else if ( $mode == 'unistall_mod' ) { message_die(GENERAL_MESSAGE, $lang['Coming_soon']); *************** *** 2147,2153 **** { // check to see if the file exists ! if ( !file_exists($targ['path'] . $targ['file']) ) { ! display_error( '<b>' . $lang['EM_err_error'] . "</b><br /><br />\n" . sprintf($lang['EM_err_comm_copy'], $targ['path'], $targ['file']) . '<br />' . trim($body[$i][$j]) . "<br />\n" . $lang['EM_line_num'] .$commands[$i]['line']); $bad_copy = true ; } --- 2152,2158 ---- { // check to see if the file exists ! if ( !file_exists($install_path . $targ['path'] . $targ['file']) ) { ! display_error( '<b>' . $lang['EM_err_critical_error'] . "</b><br /><br />\n" . sprintf($lang['EM_err_comm_copy'], $install_path . $targ['path'], $targ['file']) . '<br />' . trim($body[$i][$j]) . "<br />\n" . $lang['EM_line_num'] .$commands[$i]['line']); $bad_copy = true ; } *************** *** 2965,2969 **** // write the command files $command_file = get_em_settings( 'post_process.sh', '', $password, $preview) ; ! $command_bat = new mod_io( 'post_process.bat', '', $command_file->read_method, $command_file->write_method, $command_file->move_method, $command_file->ftp_user, $command_file->ftp_pass, $command_file->ftp_dir, $command_file->ftp_host, $command_file->ftp_port, $command_file->ftp_type, $command_file->ftp_cache) ; // open the command file: config=true,command=true --- 2970,2974 ---- // write the command files $command_file = get_em_settings( 'post_process.sh', '', $password, $preview) ; ! $command_bat = new mod_io( 'post_process.bat', '', $command_file->read_method, $command_file->write_method, $command_file->move_method, $command_file->ftp_user, $command_file->ftp_pass, $command_file->ftp_path, $command_file->ftp_host, $command_file->ftp_port, $command_file->ftp_type, $command_file->ftp_cache) ; // open the command file: config=true,command=true |
From: Eric F. <wg...@us...> - 2005-07-07 17:14:22
|
Update of /cvsroot/easymod/easymod2/mods/easymod/em_includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29539/mods/easymod/em_includes Modified Files: em_ftp.php Log Message: hmmm Index: em_ftp.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_ftp.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** em_ftp.php 3 Jul 2005 02:42:19 -0000 1.4 --- em_ftp.php 7 Jul 2005 17:14:14 -0000 1.5 *************** *** 1051,1055 **** else { ! if ( ftp_chmod($this->ftp_conn_id, $file, $perms) ) { return true; --- 1051,1055 ---- else { ! if ( @ftp_chmod($this->ftp_conn_id, $file, $perms) ) { return true; *************** *** 1058,1062 **** { $chmod_cmd = 'CHMOD ' . $perms . ' ' .$file; ! return ftp_site($this->ftp_conn_id, $chmod_cmd); } } --- 1058,1062 ---- { $chmod_cmd = 'CHMOD ' . $perms . ' ' .$file; ! return @ftp_site($this->ftp_conn_id, $chmod_cmd); } } |
From: Eric F. <wg...@us...> - 2005-07-03 02:42:37
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17389/mods/easymod/includes Modified Files: admin_easymod.php.txt Log Message: Made it so that FTP chmods folders to 755 and files to 644. I did this because some ftp servers may not chmod files automatically. Atleast mine on my local machine doesnt (I need to change the config so that it does). Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** admin_easymod.php.txt 2 Jul 2005 21:49:57 -0000 1.19 --- admin_easymod.php.txt 3 Jul 2005 02:42:19 -0000 1.20 *************** *** 1197,1201 **** { // display confirm and move the backups into place ! message_die(GENERAL_ERROR, $lang['Coming_soon']); } --- 1197,1201 ---- { // display confirm and move the backups into place ! message_die(GENERAL_MESSAGE, $lang['Coming_soon']); } *************** *** 1207,1211 **** { // list which languages so user can choose and go through install process ! message_die(GENERAL_ERROR, $lang['Coming_soon']); } --- 1207,1211 ---- { // list which languages so user can choose and go through install process ! message_die(GENERAL_MESSAGE, $lang['Coming_soon']); } *************** *** 1217,1221 **** { // list which themes so user can choose and go through install process ! message_die(GENERAL_ERROR, $lang['Coming_soon']); } --- 1217,1221 ---- { // list which themes so user can choose and go through install process ! message_die(GENERAL_MESSAGE, $lang['Coming_soon']); } *************** *** 1224,1228 **** // uninstall the mod // ! else if ( $mode == 'unistall_mod' ) { message_die(GENERAL_MESSAGE, $lang['Coming_soon']); --- 1224,1228 ---- // uninstall the mod // ! else if ( $mode == 'uninstall_mod' ) { message_die(GENERAL_MESSAGE, $lang['Coming_soon']); |
From: Eric F. <wg...@us...> - 2005-07-03 02:42:37
|
Update of /cvsroot/easymod/easymod2/mods/easymod/em_includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17389/mods/easymod/em_includes Modified Files: em_ftp.php em_modio.php Log Message: Made it so that FTP chmods folders to 755 and files to 644. I did this because some ftp servers may not chmod files automatically. Atleast mine on my local machine doesnt (I need to change the config so that it does). Index: em_modio.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_modio.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** em_modio.php 11 Jun 2005 23:05:53 -0000 1.4 --- em_modio.php 3 Jul 2005 02:42:19 -0000 1.5 *************** *** 542,545 **** --- 542,546 ---- if ( copy( $from, $to)) { + chmod($to, 0644); return '<b>' . $lang['EM_pp_complete'] . '</b>' ; } *************** *** 560,565 **** { // make the "to" file path relative to the phpBB root and the "from" relative to EM runtime ! $to = ( substr($to, 0, 9) == '../../../') ? substr($to, 9) : $script_path . '/' . $ipath . $to ; ! $from = ( substr($from, 0, 9) == '../../../') ? substr($from, 9) : $script_path . '/' . $ipath . $from ; ////////////////////// --- 561,566 ---- { // make the "to" file path relative to the phpBB root and the "from" relative to EM runtime ! $to = ( substr($to, 0, 9) == '../../../') ? substr($to, 9) : $script_path . $ipath . $to ; ! $from = ( substr($from, 0, 9) == '../../../') ? substr($from, 9) : $script_path . $ipath . $from ; ////////////////////// Index: em_ftp.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/em_includes/em_ftp.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** em_ftp.php 11 Jun 2005 23:05:53 -0000 1.3 --- em_ftp.php 3 Jul 2005 02:42:19 -0000 1.4 *************** *** 760,763 **** --- 760,772 ---- ////////////////////////////// + function emftp_chmod($file, $perms) + { + $this->_putcmd('SITE CHMOD', substr($perms, 1) . ' ' . $file); + $response = $this->_ok(); + if (!$response) { + $this->_debug_print("Error : CHMOD command failed\n"); + } + return $response; + } function ftp_site($command) *************** *** 1034,1042 **** } function ftp_put( $remote_filename, $local_filename, $file_type) { if ($this->ftp_type == 'fsock') { ! return $this->ftp->ftp_put( $remote_filename, $local_filename, $file_type) ; } else --- 1043,1076 ---- } + function emftp_chmod($file, $perms) + { + if ( $this->ftp_type == 'fsock') + { + return $this->ftp->emftp_chmod($file, $perms); + } + else + { + if ( ftp_chmod($this->ftp_conn_id, $file, $perms) ) + { + return true; + } + else + { + $chmod_cmd = 'CHMOD ' . $perms . ' ' .$file; + return ftp_site($this->ftp_conn_id, $chmod_cmd); + } + } + } + function ftp_put( $remote_filename, $local_filename, $file_type) { if ($this->ftp_type == 'fsock') { ! $result = $this->ftp->ftp_put( $remote_filename, $local_filename, $file_type) ; ! if ( $result ) ! { ! $this->emftp_chmod($remote_filename, '0644'); ! } ! return $result; } else *************** *** 1048,1052 **** } ! return ftp_put( $this->ftp_conn_id, $remote_filename, $local_filename, ($file_type==1) ? FTP_BINARY : FTP_ASCII ) ; } } --- 1082,1091 ---- } ! $result = ftp_put( $this->ftp_conn_id, $remote_filename, $local_filename, ($file_type==1) ? FTP_BINARY : FTP_ASCII ) ; ! if ( $result ) ! { ! $this->emftp_chmod($remote_filename, '0644'); ! } ! return $result; } } *************** *** 1094,1097 **** --- 1133,1140 ---- // put the file and then cleanup the temp file $result = ftp_put( $this->ftp_conn_id, $to_file, $tmpfname, FTP_ASCII ) ; + if ( $result ) + { + $this->emftp_chmod($to_file, '0644'); + } unlink($tmpfname); *************** *** 1116,1124 **** if ($this->ftp_type == 'fsock') { ! return $this->ftp->ftp_mkdir( $dir_name) ; } else { $result = @ftp_mkdir( $this->ftp_conn_id, $dir_name) ; // return $result ; ///////////// --- 1159,1173 ---- if ($this->ftp_type == 'fsock') { ! $result = $this->ftp->ftp_mkdir( $dir_name) ; ! if ( $result ) ! { ! $this->emftp_chmod($dir_name, '0755'); ! } ! return $result; } else { $result = @ftp_mkdir( $this->ftp_conn_id, $dir_name) ; + $this->emftp_chmod($dir_name, '0755'); // return $result ; ///////////// |
From: Eric F. <wg...@us...> - 2005-07-02 21:50:05
|
Update of /cvsroot/easymod/easymod2/mods/easymod/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28308/mods/easymod/includes Modified Files: admin_easymod.php.txt Log Message: bug fixes so I can release 0.2.0b Index: admin_easymod.php.txt =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/includes/admin_easymod.php.txt,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** admin_easymod.php.txt 30 Jun 2005 21:10:59 -0000 1.18 --- admin_easymod.php.txt 2 Jul 2005 21:49:57 -0000 1.19 *************** *** 628,632 **** // important! we are writing the file output to screen so the PRE tag will format it nicely for us ! echo '<style type="text/css"><!-- .preview {color:red} --></style>' . "\n" ; echo "<PRE>\n" ; } --- 628,632 ---- // important! we are writing the file output to screen so the PRE tag will format it nicely for us ! echo '<style type="text/css"><!-- .preview {color:red; margin: 0px; padding: 0px} --></style>' . "\n" ; echo "<PRE>\n" ; } *************** *** 1177,1181 **** // display which folders to delete, either // processed, backups, or the complete folder ! message_die(GENERAL_MESSAGE, $lang['Comming_soon']); } --- 1177,1181 ---- // display which folders to delete, either // processed, backups, or the complete folder ! message_die(GENERAL_MESSAGE, $lang['Coming_soon']); } *************** *** 1187,1191 **** { // display confirm and delete sql entry ! message_die(GENERAL_MESSAGE, $lang['Comming_soon']); } --- 1187,1191 ---- { // display confirm and delete sql entry ! message_die(GENERAL_MESSAGE, $lang['Coming_soon']); } *************** *** 1197,1201 **** { // display confirm and move the backups into place ! message_die(GENERAL_ERROR, $lang['Comming_soon']); } --- 1197,1201 ---- { // display confirm and move the backups into place ! message_die(GENERAL_ERROR, $lang['Coming_soon']); } *************** *** 1207,1211 **** { // list which languages so user can choose and go through install process ! message_die(GENERAL_ERROR, $lang['Comming_soon']); } --- 1207,1211 ---- { // list which languages so user can choose and go through install process ! message_die(GENERAL_ERROR, $lang['Coming_soon']); } *************** *** 1217,1221 **** { // list which themes so user can choose and go through install process ! message_die(GENERAL_ERROR, $lang['Comming_soon']); } --- 1217,1221 ---- { // list which themes so user can choose and go through install process ! message_die(GENERAL_ERROR, $lang['Coming_soon']); } *************** *** 1226,1230 **** else if ( $mode == 'unistall_mod' ) { ! message_die(GENERAL_MESSAGE, $lang['Comming_soon']); } --- 1226,1230 ---- else if ( $mode == 'unistall_mod' ) { ! message_die(GENERAL_MESSAGE, $lang['Coming_soon']); } *************** *** 2143,2146 **** --- 2143,2156 ---- $dest['file'] = '*.*' ; } + } + else + { + // check to see if the file exists + if ( !file_exists($targ['path'] . $targ['file']) ) + { + display_error( '<b>' . $lang['EM_err_error'] . "</b><br /><br />\n" . sprintf($lang['EM_err_comm_copy'], $targ['path'], $targ['file']) . '<br />' . trim($body[$i][$j]) . "<br />\n" . $lang['EM_line_num'] .$commands[$i]['line']); + $bad_copy = true ; + } + } |
From: Eric F. <wg...@us...> - 2005-06-30 21:11:10
|
Update of /cvsroot/easymod/easymod2/mods/easymod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25597/mods/easymod Modified Files: easymod_install.php Log Message: bug fixes for 0.2.0b, cant figure out what is going on with the em_functions.php not being found error Index: easymod_install.php =================================================================== RCS file: /cvsroot/easymod/easymod2/mods/easymod/easymod_install.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** easymod_install.php 29 Jun 2005 00:03:16 -0000 1.24 --- easymod_install.php 30 Jun 2005 21:10:47 -0000 1.25 *************** *** 865,869 **** $sql[] = "CREATE TABLE " . EASYMOD_TABLE . " ( ! mod_id int4 NOT NULL DEFAULT nextval('phpbb_easymod_mod_id_seq'::text), CONSTRAINT PK_phpbb_easymod PRIMARY KEY (mod_id), mod_title varchar(255) NULL DEFAULT '', --- 865,869 ---- $sql[] = "CREATE TABLE " . EASYMOD_TABLE . " ( ! mod_id int4 NOT NULL DEFAULT nextval('" . EASYMOD_TABLE . "_mod_id_seq'::text), CONSTRAINT PK_phpbb_easymod PRIMARY KEY (mod_id), mod_title varchar(255) NULL DEFAULT '', *************** *** 914,918 **** $sql[] = "ALTER TABLE [" . EASYMOD_TABLE . "] WITH NOCHECK ADD ! CONSTRAINT [PK_phpbb_easymod] PRIMARY KEY CLUSTERED ( [mod_id] --- 914,918 ---- $sql[] = "ALTER TABLE [" . EASYMOD_TABLE . "] WITH NOCHECK ADD ! CONSTRAINT [PK_" . EASYMOD_TABLE . "] PRIMARY KEY CLUSTERED ( [mod_id] *************** *** 923,942 **** // CONSTRAINT [DF_phpbb_easymod_mod_id] DEFAULT ('0') FOR [mod_id], $sql[] = "ALTER TABLE [" . EASYMOD_TABLE . "] WITH NOCHECK ADD ! CONSTRAINT [DF_phpbb_easymod_mod_title] DEFAULT ('') FOR [mod_title], ! CONSTRAINT [DF_phpbb_easymod_mod_file] DEFAULT ('') FOR [mod_file], ! CONSTRAINT [DF_phpbb_easymod_mod_version] DEFAULT ('') FOR [mod_version], ! CONSTRAINT [DF_phpbb_easymod_mod_author_handle] DEFAULT ('') FOR [mod_author_handle], ! CONSTRAINT [DF_phpbb_easymod_mod_author_email] DEFAULT ('') FOR [mod_author_email], ! CONSTRAINT [DF_phpbb_easymod_mod_author_name] DEFAULT ('') FOR [mod_author_name], ! CONSTRAINT [DF_phpbb_easymod_mod_author_url] DEFAULT ('') FOR [mod_author_url], ! CONSTRAINT [DF_phpbb_easymod_mod_description] DEFAULT ('') FOR [mod_description], ! CONSTRAINT [DF_phpbb_easymod_mod_process_date] DEFAULT ('0') FOR [mod_process_date], ! CONSTRAINT [DF_phpbb_easymod_mod_phpBB_version] DEFAULT ('') FOR [mod_phpBB_version], ! CONSTRAINT [DF_phpbb_easymod_mod_processed_themes] DEFAULT ('') FOR [mod_processed_themes], ! CONSTRAINT [DF_phpbb_easymod_mod_processed_langs] DEFAULT ('') FOR [mod_processed_langs], ! CONSTRAINT [DF_phpbb_easymod_mod_files_edited] DEFAULT ('0') FOR [mod_files_edited], ! CONSTRAINT [DF_phpbb_easymod_mod_tables_added] DEFAULT ('0') FOR [mod_tables_added], ! CONSTRAINT [DF_phpbb_easymod_mod_tables_altered] DEFAULT ('0') FOR [mod_tables_altered], ! CONSTRAINT [DF_phpbb_easymod_mod_rows_inserted] DEFAULT ('0') FOR [mod_rows_inserted]" ; // GO" ; --- 923,942 ---- // CONSTRAINT [DF_phpbb_easymod_mod_id] DEFAULT ('0') FOR [mod_id], $sql[] = "ALTER TABLE [" . EASYMOD_TABLE . "] WITH NOCHECK ADD ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_title] DEFAULT ('') FOR [mod_title], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_file] DEFAULT ('') FOR [mod_file], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_version] DEFAULT ('') FOR [mod_version], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_author_handle] DEFAULT ('') FOR [mod_author_handle], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_author_email] DEFAULT ('') FOR [mod_author_email], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_author_name] DEFAULT ('') FOR [mod_author_name], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_author_url] DEFAULT ('') FOR [mod_author_url], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_description] DEFAULT ('') FOR [mod_description], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_process_date] DEFAULT ('0') FOR [mod_process_date], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_phpBB_version] DEFAULT ('') FOR [mod_phpBB_version], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_processed_themes] DEFAULT ('') FOR [mod_processed_themes], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_processed_langs] DEFAULT ('') FOR [mod_processed_langs], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_files_edited] DEFAULT ('0') FOR [mod_files_edited], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_tables_added] DEFAULT ('0') FOR [mod_tables_added], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_tables_altered] DEFAULT ('0') FOR [mod_tables_altered], ! CONSTRAINT [DF_" . EASYMOD_TABLE . "_mod_rows_inserted] DEFAULT ('0') FOR [mod_rows_inserted]" ; // GO" ; *************** *** 950,954 **** case 'msaccess': $sql[] = "CREATE TABLE " . EASYMOD_TABLE . " ( ! mod_id COUNTER NOT NULL CONSTRAINT PK_phpbb_easymod PRIMARY KEY, mod_title TEXT(255) NULL, mod_file TEXT(255) NULL, --- 950,954 ---- case 'msaccess': $sql[] = "CREATE TABLE " . EASYMOD_TABLE . " ( ! mod_id COUNTER NOT NULL CONSTRAINT PK_" . EASYMOD_TABLE . " PRIMARY KEY, mod_title TEXT(255) NULL, mod_file TEXT(255) NULL, |