Changeset 569
- Timestamp:
- 12/05/03 01:24:02 (5 years ago)
- Files:
-
- trunk/b2.php (modified) (1 diff)
- trunk/b2comments.php (modified) (1 diff)
- trunk/b2comments.post.php (modified) (3 diffs)
- trunk/b2commentspopup.php (modified) (1 diff)
- trunk/b2login.php (modified) (1 diff)
- trunk/b2mail.php (modified) (1 diff)
- trunk/b2register.php (modified) (1 diff)
- trunk/b2trackback.php (modified) (2 diffs)
- trunk/blog.header.php (modified) (1 diff)
- trunk/index.php (modified) (1 diff)
- trunk/wp-commentsrss2.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/b2.php
r144 r569 49 49 <?php 50 50 if ($debug=="1") { 51 echo "<p>$ querycount queries - ".number_format(timer_stop(),3)." seconds</p>";51 echo "<p>$wpdb->querycount queries - ".number_format(timer_stop(),3)." seconds</p>"; 52 52 } 53 53 ?> trunk/b2comments.php
r559 r569 16 16 17 17 $comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = $id AND comment_approved = '1' ORDER BY comment_date"); 18 ++$querycount;19 18 ?> 20 19 trunk/b2comments.post.php
r558 r569 40 40 41 41 $commentstatus = $wpdb->get_var("SELECT comment_status FROM $tableposts WHERE ID = $comment_post_ID"); 42 ++$querycount;43 42 if ('closed' == $commentstatus) 44 43 die('Sorry, comments are closed for this item.'); … … 69 68 /* Flood-protection */ 70 69 $lasttime = $wpdb->get_var("SELECT comment_date FROM $tablecomments WHERE comment_author_IP = '$user_ip' ORDER BY comment_date DESC LIMIT 1"); 71 ++$querycount;72 70 $ok = true; 73 71 if (!empty($lasttime)) { … … 102 100 103 101 $comment_ID = $wpdb->get_var('SELECT last_insert_id()'); 104 ++$querycount;105 102 106 103 if (($moderation_notify) && (!$approved)) { trunk/b2commentspopup.php
r558 r569 31 31 // this line is WordPress' motor, do not delete it. 32 32 $comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = $id AND comment_approved = '1' ORDER BY comment_date"); 33 ++$querycount;34 33 $commentstatus = $wpdb->get_row("SELECT comment_status, post_password FROM $tableposts WHERE ID = $id"); 35 ++$querycount;36 34 if (!empty($commentstatus->post_password) && $HTTP_COOKIE_VARS['wp-postpass_'.$cookiehash] != $commentstatus->post_password) { // and it doesn't match the cookie 37 35 echo(get_the_password_form()); trunk/b2login.php
r558 r569 87 87 $password = substr($password, 4, strlen($password)); 88 88 $query = "SELECT ID, user_login, user_pass FROM $tableusers WHERE user_login = '$user_login' AND MD5(user_pass) = '$password'"; 89 ++$querycount;90 89 } else { 91 90 $pass_is_md5 = 0; 92 91 $query = "SELECT ID, user_login, user_pass FROM $tableusers WHERE user_login = '$user_login' AND user_pass = '$password'"; 93 ++$querycount;94 92 } 95 93 $login = $wpdb->get_row($query); trunk/b2mail.php
r558 r569 205 205 $sql = "SELECT ID, user_level FROM $tableusers WHERE user_login='$user_login' AND user_pass='$user_pass' ORDER BY ID DESC LIMIT 1"; 206 206 $result = $wpdb->get_row($sql); 207 ++$querycount;208 207 209 208 if (!$result) { trunk/b2register.php
r558 r569 81 81 /* checking the login isn't already used by another user */ 82 82 $result = $wpdb->get_results("SELECT user_login FROM $tableusers WHERE user_login = '$user_login'"); 83 ++$querycount;84 83 if (count($result) >= 1) { 85 84 die ('<strong>ERROR</strong>: This login is already registered, please choose another one.'); trunk/b2trackback.php
r558 r569 32 32 33 33 $pingstatus = $wpdb->get_var("SELECT ping_status FROM $tableposts WHERE ID = $tb_id"); 34 ++$querycount;35 34 36 35 if ('closed' == $pingstatus) … … 88 87 } else { 89 88 $comment_ID = $wpdb->get_var('SELECT last_insert_id()'); 90 ++$querycount;91 89 if ($comments_notify) 92 90 wp_notify_postauthor($comment_ID, 'trackback'); trunk/blog.header.php
r559 r569 308 308 // echo $request; 309 309 $posts = $wpdb->get_results($request); 310 ++$querycount;311 310 if (1 == count($posts)) { 312 311 if ($p || $name) { trunk/index.php
r565 r569 115 115 </div> 116 116 117 <p class="credit"><?php timer_stop(1); ?> <cite>Powered by <a href="http://wordpress.org"><strong>WordPress</strong></a></cite></p>117 <p class="credit"><?php echo $wpdb->querycount; ?> queries. <?php timer_stop(1); ?> <cite>Powered by <a href="http://wordpress.org"><strong>WordPress</strong></a></cite></p> 118 118 </body> 119 119 </html> trunk/wp-commentsrss2.php
r558 r569 60 60 ORDER BY comment_date 61 61 LIMIT $posts_per_rss"); 62 ++$querycount;63 62 } 64 63 else { // if no post id passed in, we'll just ue the last 10 comments. … … 80 79 ORDER BY comment_date DESC 81 80 LIMIT $posts_per_rss"); 82 ++$querycount;83 81 } 84 82 // this line is WordPress' motor, do not delete it.
