當前位置: 首頁>>代碼示例>>PHP>>正文


PHP kFileSyncUtils::undeleteSyncFile方法代碼示例

本文整理匯總了PHP中kFileSyncUtils::undeleteSyncFile方法的典型用法代碼示例。如果您正苦於以下問題:PHP kFileSyncUtils::undeleteSyncFile方法的具體用法?PHP kFileSyncUtils::undeleteSyncFile怎麽用?PHP kFileSyncUtils::undeleteSyncFile使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在kFileSyncUtils的用法示例。


在下文中一共展示了kFileSyncUtils::undeleteSyncFile方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: undeleteEntry

 public static function undeleteEntry(entry $entry, $partner_id = null)
 {
     if ($entry->getStatus() != entryStatus::DELETED) {
         return;
     }
     $data = $entry->getData();
     $original_play = "";
     $parts = explode("&", $data);
     if (count($parts) < 2) {
         $original_play = $data;
     } else {
         $original_play = $parts[0];
     }
     $deleted_file_path = $entry->getFromCustomData("deleted_file_path");
     //		echo $deleted_file_path . "\n";
     $deleted_paths = explode("|", $deleted_file_path);
     if ($deleted_paths) {
         $original_play = @$deleted_paths[0];
         $dataKey = $entry->getSyncKey(entry::FILE_SYNC_ENTRY_SUB_TYPE_DATA, @$deleted_paths[0]);
         kFileSyncUtils::undeleteSyncFile($dataKey);
         //$original = myContentStorage::moveFromDeleted ( @$deleted_paths[0] );
         $dataEditKey = $entry->getSyncKey(entry::FILE_SYNC_ENTRY_SUB_TYPE_DATA_EDIT, @$deleted_paths[1]);
         kFileSyncUtils::undeleteSyncFile($dataEditKey);
         //$original = myContentStorage::moveFromDeleted ( @$deleted_paths[1] );
         //figure out the thumb's path from the deleted path  and the property deleted_original_thumb
         $entry->setData(null);
         $entry->setData($entry->getFromCustomData("deleted_original_data"), true);
         // force the value that was set beforehand
         // the data is supposed to point to a delete template 100000.flv&deleted_video.flv
         $orig_thumb = $entry->getFromCustomData("deleted_original_thumb");
         if (myContentStorage::isTemplate($orig_thumb)) {
             $entry->setThumbnail($orig_thumb, true);
             //  the thumbnail wat a template- use it as it was
         } else {
             $entry->setThumbnail(null);
             // reset the thumb before setting - it won't increment the version count
             $entry->setThumbnail($entry->getFromCustomData("deleted_original_thumb"), true);
             // force the value that was set beforehand
             $thumbKey = $entry->getSyncKey(entry::FILE_SYNC_ENTRY_SUB_TYPE_THUMB, @$deleted_paths[2]);
             kFileSyncUtils::undeleteSyncFile($thumbKey);
             //$original = myContentStorage::moveFromDeleted ( @$deleted_paths[2] ); //
         }
     } else {
         // error
     }
     $entry->setStatusReady();
 }
開發者ID:richhl,項目名稱:kalturaCE,代碼行數:47,代碼來源:myEntryUtils.class.php


注:本文中的kFileSyncUtils::undeleteSyncFile方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。