Code

Added possibility to do notifications. Not used currently.
[gosa.git] / html / get_attachment.php
index eb36008b1029891a6aa1093a21f6c9a06ceeb336..58bab226ba7b70656e4075a2cfe669b5eb7e9733 100644 (file)
@@ -27,7 +27,7 @@ session_start ();
 /* Logged in? Simple security check */
 if (!isset($_SESSION['ui'])){
   gosa_log ("Error: get_attachment.php called without session");
-  header ("Location: ../index.php");
+  header ("Location: index.php");
   exit;
 }
 $ui= $_SESSION["ui"];
@@ -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");