Code

Fixed IE problem
[gosa.git] / html / get_attachment.php
index b95caec39a81764110311b0e45756aa93b3a1eb8..d853e5b9f49ec20e414be00da8c451add981f589 100644 (file)
@@ -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");