[Easymod-cvs] easymod/install/em_files/admin em_history.php,1.1,1.2 em_manage.php,1.2,1.3
Status: Beta
Brought to you by:
wgeric
From: Eric F. <wg...@us...> - 2005-12-09 23:22:46
|
Update of /cvsroot/easymod/easymod/install/em_files/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9565/em_files/admin Modified Files: em_history.php em_manage.php Log Message: added install time to MOD table. Prep for uninstall ... still need to decide exactly how to do this Index: em_manage.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/admin/em_manage.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** em_manage.php 6 Dec 2005 23:55:06 -0000 1.2 --- em_manage.php 9 Dec 2005 23:22:37 -0000 1.3 *************** *** 483,486 **** --- 483,487 ---- $mod_file = str_replace("'", "''", htmlspecialchars(stripslashes($mod_file))); + $current_time = time(); $mod_name = str_replace("'", "''", htmlspecialchars(stripslashes($mod_parser->header['name']))); $mod_version = str_replace("'", "''", htmlspecialchars(stripslashes($mod_parser->header['version']))); *************** *** 493,498 **** add_log('EM_Log_install', $mod_name, $mod_version); ! $sql = 'INSERT INTO ' . EM_MODS_TABLE . "( mod_file, mod_name, mod_version, mod_author_username, mod_author_email, mod_author_realname, mod_author_website, mod_desc ) ! VALUES ('$mod_file', '$mod_name', '$mod_version', '$author_username', '$author_email', '$author_realname', '$author_realname', '$mod_desc' )"; if( !($result = $db->sql_query($sql)) ) { --- 494,499 ---- add_log('EM_Log_install', $mod_name, $mod_version); ! $sql = 'INSERT INTO ' . EM_MODS_TABLE . "( mod_file, mod_install_time, mod_name, mod_version, mod_author_username, mod_author_email, mod_author_realname, mod_author_website, mod_desc ) ! VALUES ('$mod_file', $current_time,'$mod_name', '$mod_version', '$author_username', '$author_email', '$author_realname', '$author_realname', '$mod_desc' )"; if( !($result = $db->sql_query($sql)) ) { *************** *** 667,670 **** --- 668,677 ---- elseif( $mode == 'uninstall' ) { + $mod_id = request_var('mod_id', 0); + if ( empty($mod_id) ) + { + redirect(append_sid("{$phpbb_root_path}admin/em_history.$phpEx")); + } + $step = request_var('step', 0); switch($step) *************** *** 681,685 **** //---------------------------------------------------------------------------------// ! // Updating (check) //---------------------------------------------------------------------------------// elseif( $mode == 'update' ) --- 688,692 ---- //---------------------------------------------------------------------------------// ! // Updating //---------------------------------------------------------------------------------// elseif( $mode == 'update' ) Index: em_history.php =================================================================== RCS file: /cvsroot/easymod/easymod/install/em_files/admin/em_history.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** em_history.php 4 Dec 2005 03:12:30 -0000 1.1 --- em_history.php 9 Dec 2005 23:22:37 -0000 1.2 *************** *** 32,37 **** $installed_mods = array(); $mods_count = 0; ! $sql = 'SELECT mod_id, mod_file, mod_name, mod_version, mod_desc, mod_styles ! FROM ' . EM_MODS_TABLE; if( !($result = $db->sql_query($sql)) ) { --- 32,38 ---- $installed_mods = array(); $mods_count = 0; ! $sql = 'SELECT mod_id, mod_file, mod_install_time, mod_name, mod_version, mod_desc, mod_styles ! FROM ' . EM_MODS_TABLE . ' ! ORDER BY mod_install_time DESC'; if( !($result = $db->sql_query($sql)) ) { *************** *** 56,69 **** // Show to page $template->assign_block_vars('installed_mods', array( ! 'S_MORE_INFO' => append_sid(basename(__FILE__) . '?mode=info&id=' . $row['mod_id']), ! 'S_UPDATE' => append_sid(basename(__FILE__) . '?mode=check_update&id=' . $row['mod_id']), ! 'S_UNINSTALL' => append_sid(basename(__FILE__) . '?mode=check_uninstall&id=' . $row['mod_id']), ! 'ROW_CLASS' => (!($mods_count % 2)) ? $theme['td_class1'] : $theme['td_class2'], ! 'MOD_STATUS_IMG' => $mod_status_img, ! 'MOD_STATUS_LANG' => $mod_status_lang, ! 'MOD_NAME' => $row['mod_name'], ! 'MOD_DESC' => str_cut($row['mod_desc'], 80), ! 'MOD_VERSION' => $row['mod_version'], ! 'MOD_STYLES' => '', )); $mods_count++; --- 57,71 ---- // Show to page $template->assign_block_vars('installed_mods', array( ! 'S_MORE_INFO' => append_sid("{$phpbb_root_path}admin/em_manage.$phpEx?mode=info&id=" . $row['mod_id']), ! 'S_UPDATE' => append_sid("{$phpbb_root_path}admin/em_history.$phpEx?mode=check_update&id=" . $row['mod_id']), ! 'S_UNINSTALL' => append_sid("{$phpbb_root_path}admin/em_manage.$phpEx?mode=uninstall&id=" . $row['mod_id']), ! 'ROW_CLASS' => (!($mods_count % 2)) ? $theme['td_class1'] : $theme['td_class2'], ! 'MOD_STATUS_IMG' => $mod_status_img, ! 'MOD_STATUS_LANG' => $mod_status_lang, ! 'MOD_INSTALL_TIME' => create_date($board_config['default_dateformat'], $row['mod_install_time'], $board_config['board_timezone']), ! 'MOD_NAME' => $row['mod_name'], ! 'MOD_DESC' => str_cut($row['mod_desc'], 80), ! 'MOD_VERSION' => $row['mod_version'], ! 'MOD_STYLES' => '', )); $mods_count++; *************** *** 80,93 **** // Misc. template vars $template->assign_vars(array( ! 'L_MANAGE' => $lang['EM_History'], ! 'L_MANAGE_EXPLAIN' => $lang['EM_History_explain'], ! 'L_INSTALLED_MODS' => $lang['EM_Installed_mods'], ! 'L_MOD_STATUS' => $lang['EM_Mod_status'], ! 'L_MOD_NAME' => $lang['EM_Mod_name'], ! 'L_MOD_DESCRIPTION' => $lang['EM_Mod_description'], ! 'L_MOD_VERSION' => $lang['EM_Mod_version'], ! 'L_MORE_INFO' => $lang['EM_More_info'], ! 'L_UPDATE' => $lang['EM_Update'], ! 'L_UNINSTALL' => $lang['EM_Uninstall'], )); --- 82,96 ---- // Misc. template vars $template->assign_vars(array( ! 'L_MANAGE' => $lang['EM_History'], ! 'L_MANAGE_EXPLAIN' => $lang['EM_History_explain'], ! 'L_INSTALLED_MODS' => $lang['EM_Installed_mods'], ! 'L_MOD_STATUS' => $lang['EM_Mod_status'], ! 'L_MOD_INSTALL_TIME' => $lang['EM_Mod_install_time'], ! 'L_MOD_NAME' => $lang['EM_Mod_name'], ! 'L_MOD_DESCRIPTION' => $lang['EM_Mod_description'], ! 'L_MOD_VERSION' => $lang['EM_Mod_version'], ! 'L_MORE_INFO' => $lang['EM_More_info'], ! 'L_UPDATE' => $lang['EM_Update'], ! 'L_UNINSTALL' => $lang['EM_Uninstall'], )); |