diff --git a/contact.php b/contact.php index 4153b7043..c282a9672 100644 --- a/contact.php +++ b/contact.php @@ -11,9 +11,9 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/contact.php,v $ -| $Revision: 1.4 $ -| $Date: 2007-09-09 07:05:06 $ -| $Author: e107coders $ +| $Revision: 1.5 $ +| $Date: 2008-01-11 22:13:43 $ +| $Author: e107steved $ +----------------------------------------------------------------------------+ */ require_once("class2.php"); @@ -90,7 +90,7 @@ if(isset($_POST['send-contactus'])){ if(!$error) { $body .= "\n\nIP:\t".USERIP."\n"; - if(USERID !== FALSE) + if (USER) { $body .= "User:\t#".USERID." ".USERNAME."\n"; } diff --git a/e107_admin/sql/core_sql.php b/e107_admin/sql/core_sql.php index 4e5fa694d..5f3ca79ae 100644 --- a/e107_admin/sql/core_sql.php +++ b/e107_admin/sql/core_sql.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_admin/sql/core_sql.php,v $ -| $Revision: 1.6 $ -| $Date: 2007-12-22 23:03:52 $ +| $Revision: 1.7 $ +| $Date: 2008-01-11 22:13:43 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -238,7 +238,8 @@ CREATE TABLE download_requests ( download_request_datestamp int(10) unsigned NOT NULL default '0', PRIMARY KEY (download_request_id), KEY download_request_userid (download_request_userid), - KEY download_request_download_id (download_request_download_id) + KEY download_request_download_id (download_request_download_id), + KEY download_request_datestamp (download_request_datestamp) ) TYPE=MyISAM; # -------------------------------------------------------- diff --git a/e107_admin/update_routines.php b/e107_admin/update_routines.php index c53a319c1..6c491f89c 100644 --- a/e107_admin/update_routines.php +++ b/e107_admin/update_routines.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_admin/update_routines.php,v $ -| $Revision: 1.16 $ -| $Date: 2008-01-06 22:31:33 $ +| $Revision: 1.17 $ +| $Date: 2008-01-11 22:13:43 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -254,7 +254,7 @@ function update_706_to_800($type='') catch_error(); } - //change menu_path for sitebutton_menu + //change menu_path for sitebutton_menu if($sql->db_Select("menus", "menu_path", "menu_path='sitebutton_menu' || menu_path='sitebutton_menu/'")) { if ($just_check) return update_needed(); @@ -307,10 +307,29 @@ function update_706_to_800($type='') } + if ($sql -> db_Query("SHOW INDEX FROM ".MPREFIX."download_requests")) + { + $found = FALSE; + while ($row = $sql -> db_Fetch()) + { // One index per field + if (in_array('download_request_datestamp', $row)) + { + $found = TRUE; + break; + } + } + if (!$found) + { + if ($just_check) return update_needed(); + mysql_query("ALTER TABLE `".MPREFIX."download_requests` ADD INDEX `download_request_datestamp` (`download_request_datestamp`);"); + } + } + + // Front page prefs (logic has changed) if (!isset($pref['frontpage_force'])) { // Just set basic options; no real method of converting the existing - if ($just_check) return update_needed(); + if ($just_check) return update_needed('Change front page prefs'); $pref['frontpage_force'] = array(e_UC_PUBLIC => ''); $pref['frontpage'] = array(e_UC_PUBLIC => 'news.php'); $do_save = TRUE; @@ -322,13 +341,28 @@ function update_706_to_800($type='') { if (isset($pref[$p])) { - if ($just_check) return update_needed(); + if ($just_check) return update_needed('Remove obsolete prefs'); unset($pref[$p]); $do_save = TRUE; } } + if (mysql_table_exists('linkwords')) + { // Need to extend field linkword_link varchar(200) NOT NULL default '' + if ($sql -> db_Query("SHOW FIELDS FROM ".MPREFIX."linkwords LIKE 'linkword_link'")) + { + $row = $sql -> db_Fetch(); + if (str_replace('varchar', 'char', strtolower($row['Type'])) != 'char(200)') + { + if ($just_check) return update_needed('Update linkwords field definition'); + mysql_query("ALTER TABLE `".MPREFIX."linkwords` MODIFY `linkword_link` VARCHAR(200) NOT NULL DEFAULT '' "); + catch_error(); + } + } + } + + // Tables defined in core_sql.php //--------------------------------- diff --git a/e107_plugins/linkwords/admin_config.php b/e107_plugins/linkwords/admin_config.php index 7b841c865..7e011e75c 100644 --- a/e107_plugins/linkwords/admin_config.php +++ b/e107_plugins/linkwords/admin_config.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/linkwords/admin_config.php,v $ -| $Revision: 1.5 $ -| $Date: 2007-07-23 21:02:35 $ +| $Revision: 1.6 $ +| $Date: 2008-01-11 22:13:43 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -165,7 +165,7 @@ $text = "