예제 #1
0
 /**
  * Реальное положение файла
  *
  * @return string
  */
 public function getFileDownloadLink()
 {
     $file = CLibraryManager::getFile($this->getId());
     $file->entry = $file->entry + 1;
     $file->save();
     return WEB_ROOT . "library/" . $this->nameFolder . "/" . $this->nameFile;
 }
 /**
  * @return CArrayList|null
  */
 private static function getCacheFiles()
 {
     if (is_null(self::$_cacheFiles)) {
         self::$_cacheFiles = new CArrayList();
     }
     return self::$_cacheFiles;
 }
예제 #3
0
 /**
  * Реальное положение файла
  *
  * @return string
  */
 public function getFileDownloadLink()
 {
     // условие для внешней базы данных с закрытым доступом на обновление
     if (CSettingsManager::getSettingValue("hide_personal_data") == false) {
         $file = CLibraryManager::getFile($this->getId());
         $file->entry = $file->entry + 1;
         $file->save();
     }
     return WEB_ROOT . "library/" . $this->nameFolder . "/" . $this->nameFile;
 }
 public function actionEditFile()
 {
     $file = CLibraryManager::getFile(CRequest::getInt("id_file"));
     if (!is_null(CRequest::getFilter("author"))) {
         $author = CRequest::getFilter("author");
     } else {
         $author = CSession::getCurrentUser()->getId();
     }
     $this->addActionsMenuItem(array(array("title" => "Назад", "link" => WEB_ROOT . "_modules/_library/index.php?action=viewFiles&id=" . $file->nameFolder . "&filter=author:" . $author, "icon" => "actions/edit-undo.png")));
     $this->setData("file", $file);
     $this->renderView("_library/editFile.tpl");
 }