Plugin Directory

Changeset 350833


Ignore:
Timestamp:
02/25/2011 08:03:17 AM (15 years ago)
Author:
Backie
Message:

Added if true to debug check

Location:
cdn-sync-tool/trunk/lib/Cst
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cdn-sync-tool/trunk/lib/Cst/Debug.php

    r335001 r350833  
    2525     */
    2626    public static function addLog($log){
    27         if ( defined("WP_DEBUG") ){
     27        if ( defined("WP_DEBUG") && WP_DEBUG == true ){
    2828            error_log(microtime(true)." ".$log);
    2929            self::$debugLog[] = microtime(true)." ".$log;
  • cdn-sync-tool/trunk/lib/Cst/Plugin/Admin.php

    r341847 r350833  
    101101        $total = sizeof($fileArrays, COUNT_RECURSIVE) - sizeof($fileArrays);
    102102        Cst_Debug::addLog("Files have been retrived, total count is ".$total);
    103        
     103        //
    104104        $forceOverwrite = ( isset($_GET["force"]) && $_GET["force"] == "yes") ? true : false;
    105105        Cst_Debug::addLog("The force mode for this sync is ".var_export($forceOverwrite,true));
     
    109109       
    110110                $file = str_replace(ABSPATH,"",$file); 
    111                 $count = $wpdb->get_var(
     111                $count = (int)$wpdb->get_var(
    112112                                $wpdb->prepare("SELECT COUNT(*) FROM ".CST_TABLE_FILES." WHERE filename = %s AND transferred = 'yes'",
    113113                                            array($file))                       
    114                                 );
    115                                
     114                                );     
    116115                print "Syncing [".++$i."/".$total."] ".$file;       
    117116                ob_flush();
    118117                flush();               
    119118               
    120                 if ( $count && !$forceOverwrite  ){
     119                if ( $count > 0 && !$forceOverwrite  ){
    121120                    print " skipped, already synced".PHP_EOL."<br />";
    122121                    Cst_Debug::addLog("File '".$file."' has already been synced so has been skipped");
Note: See TracChangeset for help on using the changeset viewer.