WordPress.org

Make WordPress Core

Changeset 5307


Ignore:
Timestamp:
04/24/07 23:58:51 (7 years ago)
Author:
rob1n
Message:

Housekeeping -- clean out debug calls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment.php

    r5119 r5307  
    673673 
    674674    // original code by Mort (http://mort.mine.nu:8080) 
    675     $log = debug_fopen(ABSPATH . '/pingback.log', 'a'); 
    676675    $post_links = array(); 
    677     debug_fwrite($log, 'BEGIN ' . date('YmdHis', time()) . "\n"); 
    678676 
    679677    $pung = get_pung($post_ID); 
     
    690688    // http://www.phpfreaks.com/quickcode/Extract_All_URLs_on_a_Page/15.php 
    691689    preg_match_all("{\b http : [$any] +? (?= [$punc] * [^$any] | $)}x", $content, $post_links_temp); 
    692  
    693     // Debug 
    694     debug_fwrite($log, 'Post contents:'); 
    695     debug_fwrite($log, $content."\n"); 
    696690 
    697691    // Step 2. 
     
    718712 
    719713    foreach ( (array) $post_links as $pagelinkedto ) { 
    720         debug_fwrite($log, "Processing -- $pagelinkedto\n"); 
    721714        $pingback_server_url = discover_pingback_server_uri($pagelinkedto, 2048); 
    722715 
     
    724717            @ set_time_limit( 60 ); 
    725718             // Now, the RPC call 
    726             debug_fwrite($log, "Page Linked To: $pagelinkedto \n"); 
    727             debug_fwrite($log, 'Page Linked From: '); 
    728719            $pagelinkedfrom = get_permalink($post_ID); 
    729             debug_fwrite($log, $pagelinkedfrom."\n"); 
    730720 
    731721            // using a timeout of 3 seconds should be enough to cover slow servers 
     
    739729            if ( $client->query('pingback.ping', $pagelinkedfrom, $pagelinkedto ) ) 
    740730                add_ping( $post_ID, $pagelinkedto ); 
    741             else 
    742                 debug_fwrite($log, "Error.\n Fault code: ".$client->getErrorCode()." : ".$client->getErrorMessage()."\n"); 
    743         } 
    744     } 
    745  
    746     debug_fwrite($log, "\nEND: ".time()."\n****************************\n"); 
    747     debug_fclose($log); 
     731        } 
     732    } 
    748733} 
    749734 
     
    781766    $fs = @fsockopen($trackback_url['host'], $trackback_url['port'], $errno, $errstr, 4); 
    782767    @fputs($fs, $http_request); 
    783 /* 
    784     $debug_file = 'trackback.log'; 
    785     $fp = fopen($debug_file, 'a'); 
    786     fwrite($fp, "\n*****\nRequest:\n\n$http_request\n\nResponse:\n\n"); 
    787     while(!@feof($fs)) { 
    788         fwrite($fp, @fgets($fs, 4096)); 
    789     } 
    790     fwrite($fp, "\n\n"); 
    791     fclose($fp); 
    792 */ 
    793768    @fclose($fs); 
    794769 
Note: See TracChangeset for help on using the changeset viewer.