function save_md5_for_all_files()
{
    //This code run once on self install. Keeps more time to run (about 2000 files prosessed)
    //ONLY WHEN INIT
    $catalog_files = get_all_files_in_tree(DIR_FS_CATALOG, array(), array(basename(DIR_FS_CIP)));
    foreach ($catalog_files as $file_path) {
        save_md5($file_path, 'original');
    }
}
Пример #2
0
 function restore_all()
 {
     if (!$this->is_all_right()) {
         return;
     }
     $catalog_files = get_all_files_in_tree(DIR_FS_ADMIN_BACKUP . $this->cip_name . '/', array(), array());
     foreach ($catalog_files as $id => $value) {
         $catalog_files[$id] = str_replace(DIR_FS_ADMIN_BACKUP . $this->cip_name . '/', '', $value);
     }
     $tag = $this->contrib_data[0];
     foreach ($catalog_files as $file_path) {
         if ($this->error = $tag->restore_file($file_path)) {
             break;
         }
     }
     ci_remove(DIR_FS_ADMIN_BACKUP . $this->cip_name);
 }