supporto per estensione diversa da .pdf per i pdf
This commit is contained in:
+2
-2
@@ -10,9 +10,9 @@ if (array_key_exists("id",$_GET)) {
|
||||
$pdfModel = GlobalVariables::get("dao")->getFirst("MediaModel",array("id"=>$_GET['id']));
|
||||
$id = $_GET["id"];
|
||||
if (!is_null($pdfModel)){
|
||||
$localFilePath = GlobalVariables::get("config")->paths->media."/".$id.".pdf";
|
||||
$localFilePath = GlobalVariables::get("config")->paths->media."/".$id.".".$pdfModel->extension;
|
||||
if (SFSManager::fileExists($localFilePath)){
|
||||
$exposedFilePath = GlobalVariables::get("config")->paths->xsendfile."/".$id.".pdf";
|
||||
$exposedFilePath = GlobalVariables::get("config")->paths->xsendfile."/".$id.".".$pdfModel->extension;
|
||||
if (!SFSManager::fileExists($exposedFilePath)){
|
||||
SystemController::shellExec("ln",'-s "'.$localFilePath.'" "'.$exposedFilePath.'"');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user