/** * Реальное положение файла * * @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 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"); }