X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=html%2Fget_attachment.php;h=d853e5b9f49ec20e414be00da8c451add981f589;hb=631835d21ce03287d25d8578ccf3a14bbcb74acc;hp=b95caec39a81764110311b0e45756aa93b3a1eb8;hpb=aa26fd47b6cffd3a40d6cfb8e780d813395600a0;p=gosa.git diff --git a/html/get_attachment.php b/html/get_attachment.php index b95caec39..d853e5b9f 100644 --- a/html/get_attachment.php +++ b/html/get_attachment.php @@ -26,7 +26,7 @@ session_start (); /* Logged in? Simple security check */ if (!isset($_SESSION['ui'])){ - gosa_log ("Error: get_attachment.php called without session"); + new log("security","glpi/all","",array(),"Error: get_attachment.php called without session") ; header ("Location: index.php"); exit; } @@ -65,10 +65,10 @@ if(count($att)== 0){ return; } -if(!is_readable("/etc/gosa/glpi/".$att['filename'])){ - print sprintf(_("Can't open file '%s'."),"/etc/gosa/glpi/".$att['filename']); +if(!is_readable(CONFIG_DIR."/glpi/".$att['filename'])){ + print sprintf(_("Can't open file '%s'."),CONFIG_DIR."/glpi/".$att['filename']); } -$data = file_get_contents("/etc/gosa/glpi/".$att['filename']); +$data = file_get_contents(CONFIG_DIR."/glpi/".$att['filename']); /* force download dialog */ header("Content-type: ".$att['mime']."\n");