From d00989642f70be58f011a0a1d6951e52566cb114 Mon Sep 17 00:00:00 2001 From: Mike Little Date: Sun, 15 Jun 2003 22:48:49 +0000 Subject: [PATCH] tablesettings no longer used git-svn-id: https://develop.svn.wordpress.org/trunk@229 602fd350-edb4-49c9-b593-d223f7449a82 --- b2-include/b2functions.php | 4 ++-- wp-admin/b2header.php | 17 ++++++----------- wp-admin/b2sidebar.php | 6 +----- 3 files changed, 9 insertions(+), 18 deletions(-) diff --git a/b2-include/b2functions.php b/b2-include/b2functions.php index da58049aba..98dadcb18a 100644 --- a/b2-include/b2functions.php +++ b/b2-include/b2functions.php @@ -471,7 +471,7 @@ function get_usernumposts($userid) { } function get_settings($setting) { - global $tablesettings, $wpdb, $cache_settings, $use_cache, $querycount; + global $wpdb, $cache_settings, $use_cache, $querycount; if ((empty($cache_settings)) OR (!$use_cache)) { $settings = get_alloptions(); $cache_settings = $settings; @@ -497,7 +497,7 @@ function get_alloptions() { } function get_postdata($postid) { - global $tableusers, $tablesettings, $tablecategories, $tableposts, $tablecomments, $querycount, $wpdb; + global $tableusers, $tablecategories, $tableposts, $tablecomments, $querycount, $wpdb; $post = $wpdb->get_row("SELECT * FROM $tableposts WHERE ID = $postid"); ++$querycount; diff --git a/wp-admin/b2header.php b/wp-admin/b2header.php index 30ae01b9e1..177f2940e6 100644 --- a/wp-admin/b2header.php +++ b/wp-admin/b2header.php @@ -15,17 +15,12 @@ timer_start(); get_currentuserinfo(); -$request = "SELECT * FROM $tablesettings"; -$result = mysql_query($request); -$querycount++; -while($row = mysql_fetch_object($result)) { - $posts_per_page=$row->posts_per_page; - $what_to_show=$row->what_to_show; - $archive_mode=$row->archive_mode; - $time_difference=$row->time_difference; - $date_format=stripslashes($row->date_format); - $time_format=stripslashes($row->time_format); -} +$posts_per_page=get_settings('posts_per_page'); +$what_to_show=get_settings('what_to_show'); +$archive_mode=get_settings('archive_mode'); +$time_difference=get_settings('time_difference'); +$date_format=stripslashes(get_settings('date_format')); +$time_format=stripslashes(get_settings('time_format')); // let's deactivate quicktags on IE Mac and Lynx, because they don't work there. if (($is_macIE) || ($is_lynx)) diff --git a/wp-admin/b2sidebar.php b/wp-admin/b2sidebar.php index ebf99414f2..eee36a612a 100644 --- a/wp-admin/b2sidebar.php +++ b/wp-admin/b2sidebar.php @@ -20,11 +20,7 @@ $is_IE = (($is_macIE) || ($is_winIE)); if ($user_level == 0) die ("Cheatin' uh ?"); -$request = " SELECT * FROM $tablesettings "; -$result = mysql_query($request); -while($row = mysql_fetch_object($result)) { - $time_difference=$row->time_difference; -} +$time_difference=get_settings('time_difference'); if ($a=="b") {