Example #1
0
 /**
  * 
  * @param type $file
  * @return type
  */
 protected static function getBackupFilename($file)
 {
     $root = JchPlatformPaths::rootPath();
     $backup_parent_folder = JchPlatformPaths::backupImagesParentFolder();
     $backup_file = $root . $backup_parent_folder . 'jch_optimize_backup_images/' . str_replace(array($root, '_', '/'), array('', '', '_'), $file);
     if (file_exists($backup_file)) {
         $backup_file = self::incrementBackupFileName($backup_file);
     }
     return $backup_file;
 }