Changeset 350833
- Timestamp:
- 02/25/2011 08:03:17 AM (15 years ago)
- Location:
- cdn-sync-tool/trunk/lib/Cst
- Files:
-
- 2 edited
-
Debug.php (modified) (1 diff)
-
Plugin/Admin.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cdn-sync-tool/trunk/lib/Cst/Debug.php
r335001 r350833 25 25 */ 26 26 public static function addLog($log){ 27 if ( defined("WP_DEBUG") ){27 if ( defined("WP_DEBUG") && WP_DEBUG == true ){ 28 28 error_log(microtime(true)." ".$log); 29 29 self::$debugLog[] = microtime(true)." ".$log; -
cdn-sync-tool/trunk/lib/Cst/Plugin/Admin.php
r341847 r350833 101 101 $total = sizeof($fileArrays, COUNT_RECURSIVE) - sizeof($fileArrays); 102 102 Cst_Debug::addLog("Files have been retrived, total count is ".$total); 103 103 // 104 104 $forceOverwrite = ( isset($_GET["force"]) && $_GET["force"] == "yes") ? true : false; 105 105 Cst_Debug::addLog("The force mode for this sync is ".var_export($forceOverwrite,true)); … … 109 109 110 110 $file = str_replace(ABSPATH,"",$file); 111 $count = $wpdb->get_var(111 $count = (int)$wpdb->get_var( 112 112 $wpdb->prepare("SELECT COUNT(*) FROM ".CST_TABLE_FILES." WHERE filename = %s AND transferred = 'yes'", 113 113 array($file)) 114 ); 115 114 ); 116 115 print "Syncing [".++$i."/".$total."] ".$file; 117 116 ob_flush(); 118 117 flush(); 119 118 120 if ( $count && !$forceOverwrite ){119 if ( $count > 0 && !$forceOverwrite ){ 121 120 print " skipped, already synced".PHP_EOL."<br />"; 122 121 Cst_Debug::addLog("File '".$file."' has already been synced so has been skipped");
Note: See TracChangeset
for help on using the changeset viewer.