Changeset 35824

Show
Ignore:
Timestamp:
03/22/08 08:45:34 (4 months ago)
Author:
ear1grey
Message:

Removed debug statements that were causing "headers already sent" errors in akismet.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • worst-offenders/trunk/classes/litmus.php

    r35682 r35824  
    2121      public static function runCachedMatchesQuery($name, $q) { 
    2222            global $wpdb, $wo3_title; 
    23  
    24             echo("\n<!-- Query is: $q -->\n"); 
    25  
    2623            $result = wp_cache_get($name, $wo3_title); 
    2724            if($result == false) { 
    2825                  $result= $wpdb->get_results($q); 
    29                   echo("<!-- cache miss $name -->\n"); 
    30                   echo("<!-- query gave ".sizeof($result)." results -->\n"); 
    3126                  wp_cache_add($name, $result, $wo3_title); 
    32             } else { 
    33                   echo("<!-- cache hit $name -->\n"); 
    34             } 
    35  
     27            }  
    3628            self::updateCount($name, $result); 
    37  
    3829            return $result; 
    3930      } 
     
    4233      private static function updateCount($name, $results) { 
    4334            global $wo3_title; 
    44             echo("<!-- updating count from ".sizeof($results)." results -->\n"); 
    4535            $ids = array(); 
    4636            foreach($results as $result) { 
    4737                  if (isset($result->comment_id_list)) { 
    4838                        $ids = array_merge($ids, explode(",",$result->comment_id_list)); 
    49                         echo("<!-- its a list of ".sizeof($ids)." -->\n"); 
    5039                  } 
    5140                  if (isset($result->comment_id)) { 
    52                         echo("<!-- its an id -->\n"); 
    5341                        $ids[] = $result->comment_id; 
    5442                  } 
     
    5644            $ids = array_unique($ids); 
    5745            wp_cache_set($name."_count", sizeof($ids), $wo3_title); 
    58             echo("<!-- ".sizeof($results)." results gave ".sizeof($ids)." distinct ids -->\n"); 
    5946 
    6047            $current_ids = wp_cache_get("current_ids", $wo3_title); 
     
    6451            wp_cache_set("current_ids", $current_ids, $wo3_title); 
    6552            wp_cache_set("current_count", sizeof($current_ids), $wo3_title); 
    66             echo("<!-- current_count is now ".sizeof($current_ids)." -->\n"); 
    6753 
    6854      }