From 4efb6bb23a03751e5151fe0cdfff6f343fa41d9d Mon Sep 17 00:00:00 2001 From: Mike Little Date: Tue, 25 Nov 2003 00:46:52 +0000 Subject: [PATCH] Missing querycount git-svn-id: https://develop.svn.wordpress.org/trunk@558 602fd350-edb4-49c9-b593-d223f7449a82 --- b2-include/b2functions.php | 28 +++++++++++++++++++--------- b2-include/b2template.functions.php | 22 +++++++++++++++------- b2comments.php | 1 + b2comments.post.php | 4 +++- b2commentspopup.php | 2 ++ b2login.php | 4 +++- b2mail.php | 1 + b2register.php | 3 ++- b2trackback.php | 2 ++ blog.header.php | 2 +- wp-admin/b2team.php | 2 ++ wp-admin/b2verifauth.php | 5 +++-- wp-admin/edit-comments.php | 1 + wp-admin/edit.php | 1 + wp-admin/import-b2.php | 3 +++ wp-admin/import-blogger.php | 3 +++ wp-admin/import-greymatter.php | 3 +++ wp-admin/import-textpattern.php | 5 +++++ wp-admin/linkcategories.php | 12 +++++++----- wp-admin/linkmanager.php | 9 ++++++++- wp-admin/links.import.php | 1 + wp-admin/optionhandler.php | 2 ++ wp-admin/wp-edit.showposts.php | 3 ++- wp-commentsrss2.php | 2 ++ wp-rdf.php | 2 +- wp-rss.php | 2 +- wp-rss2.php | 1 + 27 files changed, 95 insertions(+), 31 deletions(-) diff --git a/b2-include/b2functions.php b/b2-include/b2functions.php index fd568de5fc..f743e33a28 100644 --- a/b2-include/b2functions.php +++ b/b2-include/b2functions.php @@ -478,7 +478,7 @@ function get_usernumposts($userid) { // examine a url (supposedly from this blog) and try to // determine the post ID it represents. function url_to_postid($url = '') { - global $wpdb, $tableposts, $siteurl; + global $wpdb, $querycount, $tableposts, $siteurl; // Take a link like 'http://example.com/blog/something' // and extract just the '/something': @@ -536,7 +536,8 @@ function url_to_postid($url = '') { if ($postname) $where .= " AND post_name = '" . $wpdb->escape($postname) . "' "; // Run the query to get the post ID: - return intval($wpdb->get_var("SELECT ID FROM $tableposts WHERE 1 = 1 " . $where)); + ++$querycount; + return intval($wpdb->get_var("SELECT ID FROM $tableposts WHERE 1 = 1 " . $where)); } @@ -681,6 +682,7 @@ function dropdown_categories($blog_ID=1, $default=1) { if ($postdata["Category"] != '') { $default = $postdata["Category"]; } + ++$querycount; foreach($results as $post) { echo "