From 82b6533277ef65ef2b5f1a1ead5648413ebd55b6 Mon Sep 17 00:00:00 2001 From: CaMer0n Date: Thu, 17 Sep 2009 14:25:11 +0000 Subject: [PATCH] Notice removal and removing banner table from the core_sql --- e107_admin/sql/core_sql.php | 27 ++----------------- .../batch/admin_shortcodes_class.php | 13 +++++---- e107_handlers/mysql_class.php | 15 ++++++----- e107_plugins/banner/banner_sql.php | 17 ++++++++++++ 4 files changed, 36 insertions(+), 36 deletions(-) create mode 100644 e107_plugins/banner/banner_sql.php diff --git a/e107_admin/sql/core_sql.php b/e107_admin/sql/core_sql.php index 88057804b..d1bd96b24 100644 --- a/e107_admin/sql/core_sql.php +++ b/e107_admin/sql/core_sql.php @@ -9,8 +9,8 @@ * Core SQL * * $Source: /cvs_backup/e107_0.8/e107_admin/sql/core_sql.php,v $ - * $Revision: 1.26 $ - * $Date: 2009-09-17 01:47:19 $ + * $Revision: 1.27 $ + * $Date: 2009-09-17 14:25:09 $ * $Author: e107coders $ */ @@ -87,29 +87,6 @@ CREATE TABLE banlist ( ) TYPE=MyISAM; # -------------------------------------------------------- -# -# Table structure for table `banner` -# - -CREATE TABLE banner ( - banner_id int(10) unsigned NOT NULL auto_increment, - banner_clientname varchar(100) NOT NULL default '', - banner_clientlogin varchar(20) NOT NULL default '', - banner_clientpassword varchar(50) NOT NULL default '', - banner_image varchar(150) NOT NULL default '', - banner_clickurl varchar(150) NOT NULL default '', - banner_impurchased int(10) unsigned NOT NULL default '0', - banner_startdate int(10) unsigned NOT NULL default '0', - banner_enddate int(10) unsigned NOT NULL default '0', - banner_active tinyint(3) unsigned NOT NULL default '0', - banner_clicks int(10) unsigned NOT NULL default '0', - banner_impressions int(10) unsigned NOT NULL default '0', - banner_ip text NOT NULL, - banner_campaign varchar(150) NOT NULL default '', - PRIMARY KEY (banner_id) -) TYPE=MyISAM; -# -------------------------------------------------------- - # # Table structure for table `comments` # diff --git a/e107_files/shortcode/batch/admin_shortcodes_class.php b/e107_files/shortcode/batch/admin_shortcodes_class.php index 5c45f4d84..5cf33629d 100644 --- a/e107_files/shortcode/batch/admin_shortcodes_class.php +++ b/e107_files/shortcode/batch/admin_shortcodes_class.php @@ -1,7 +1,7 @@ ".E_16_NEWS.($submitted_news ? " ".ADLAN_LAT_2.": $submitted_news" : ' '.ADLAN_LAT_2.': 0').''; $text .= "
".E_16_UPLOADS.($active_uploads ? " ".ADLAN_LAT_7.": $active_uploads" : ' '.ADLAN_LAT_7.': '.$active_uploads).'
'; - if(isset($pref['e_latest_list'])) + if(vartrue($pref['e_latest_list'])) { foreach($pref['e_latest_list'] as $val) { @@ -819,11 +819,14 @@ class admin_shortcodes $text .= "
".E_16_BANLIST." ".ADLAN_112.": ".$banned."
"; $text .= "
".E_16_COMMENT." ".ADLAN_114.": ".$comments."
"; - foreach($pref['e_status_list'] as $val) + if(vartrue($pref['e_status_list'])) { - if (is_readable(e_PLUGIN.$val.'/e_status.php')) + foreach($pref['e_status_list'] as $val) { - include_once(e_PLUGIN.$val.'/e_status.php'); + if (is_readable(e_PLUGIN.$val.'/e_status.php')) + { + include_once(e_PLUGIN.$val.'/e_status.php'); + } } } diff --git a/e107_handlers/mysql_class.php b/e107_handlers/mysql_class.php index de1225476..5a6bd14c2 100644 --- a/e107_handlers/mysql_class.php +++ b/e107_handlers/mysql_class.php @@ -9,8 +9,8 @@ * mySQL Handler * * $Source: /cvs_backup/e107_0.8/e107_handlers/mysql_class.php,v $ - * $Revision: 1.53 $ - * $Date: 2009-09-17 00:13:39 $ + * $Revision: 1.54 $ + * $Date: 2009-09-17 14:25:10 $ * $Author: e107coders $ */ @@ -49,7 +49,7 @@ $db_ConnectionID = NULL; // Stores ID for the first DB connection used - which s * * @package e107 * @category e107_handlers - * @version $Revision: 1.53 $ + * @version $Revision: 1.54 $ * @author $Author: e107coders $ * */ @@ -159,7 +159,7 @@ class e_db_mysql { //@TODO: simplify when yet undiscovered side-effects will be fixed $this->db_Set_Charset(); - if ( ! @mysql_select_db($this->mySQLdefaultdb, $this->mySQLaccess)) + if (!@mysql_select_db($this->mySQLdefaultdb, $this->mySQLaccess)) { return 'e2'; } @@ -650,8 +650,11 @@ class e_db_mysql { $type=MYSQL_ASSOC; } $b = microtime(); - $row = @mysql_fetch_array($this->mySQLresult,$type); - e107::getSingleton('e107_traffic')->Bump('db_Fetch', $b); + if($this->mySQLresult) + { + $row = @mysql_fetch_array($this->mySQLresult,$type); + e107::getSingleton('e107_traffic')->Bump('db_Fetch', $b); + } if ($row) { $this->dbError('db_Fetch'); diff --git a/e107_plugins/banner/banner_sql.php b/e107_plugins/banner/banner_sql.php new file mode 100644 index 000000000..872467d34 --- /dev/null +++ b/e107_plugins/banner/banner_sql.php @@ -0,0 +1,17 @@ +CREATE TABLE banner ( + banner_id int(10) unsigned NOT NULL auto_increment, + banner_clientname varchar(100) NOT NULL default '', + banner_clientlogin varchar(20) NOT NULL default '', + banner_clientpassword varchar(50) NOT NULL default '', + banner_image varchar(150) NOT NULL default '', + banner_clickurl varchar(150) NOT NULL default '', + banner_impurchased int(10) unsigned NOT NULL default '0', + banner_startdate int(10) unsigned NOT NULL default '0', + banner_enddate int(10) unsigned NOT NULL default '0', + banner_active tinyint(3) unsigned NOT NULL default '0', + banner_clicks int(10) unsigned NOT NULL default '0', + banner_impressions int(10) unsigned NOT NULL default '0', + banner_ip text NOT NULL, + banner_campaign varchar(150) NOT NULL default '', + PRIMARY KEY (banner_id) +) TYPE=MyISAM; \ No newline at end of file