Code

Updated glpi
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 23 Jan 2008 10:47:21 +0000 (10:47 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 23 Jan 2008 10:47:21 +0000 (10:47 +0000)
- Templates wasn't found, added __FILE__ to get_template path

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8562 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/glpi/admin/systems/services/glpi/class_glpiAccount.inc
gosa-plugins/glpi/admin/systems/services/glpi/class_glpiAttachmentPool.inc
gosa-plugins/glpi/admin/systems/services/glpi/class_glpiDeviceManagement.inc
gosa-plugins/glpi/admin/systems/services/glpi/class_glpiManufacturer.inc
gosa-plugins/glpi/admin/systems/services/glpi/class_glpiPrinterAccount.inc
gosa-plugins/glpi/admin/systems/services/glpi/class_glpiPrinterCartridges.inc
gosa-plugins/glpi/admin/systems/services/glpi/class_glpiPrinterCartridgesEdit.inc
gosa-plugins/glpi/admin/systems/services/glpi/class_glpiSelectUser.inc

index e6411087ae7ba6c1587268f66b9b3ae6bea158a6..4225e9fce9f844dc6514248774ea9ee228f7ed0c 100644 (file)
@@ -149,7 +149,7 @@ class glpiAccount extends plugin
       */
     if(!isset($this->config->data['SERVERS']['GLPI'])){
       print_red(_("There is no server with valid glpi database service."));
-      return($smarty->fetch(get_template_path('glpi.tpl', TRUE)));
+      return($smarty->fetch(get_template_path('glpi.tpl',TRUE,dirname(__FILE__))));
     }
 
     $this->data = $this->config->data['SERVERS']['GLPI'];
@@ -159,7 +159,7 @@ class glpiAccount extends plugin
      */
     if(!is_callable("mysql_connect")){
       print_red(_("Can't connect to glpi database, the php-mysql extension is missing."));
-      return($smarty->fetch(get_template_path('glpi.tpl', TRUE)));
+      return($smarty->fetch(get_template_path('glpi.tpl',TRUE,dirname(__FILE__))));
     }
 
     $this->handle = new glpiDB($this->data['SERVER'],$this->data['LOGIN'],$this->data['PASSWORD'],$this->data['DB']);
@@ -169,7 +169,7 @@ class glpiAccount extends plugin
      */
     if(!$this->handle->is_connected){
       print_red(_("Can't connect to glpi database, check configuration twice."));
-      return($smarty->fetch(get_template_path('glpi.tpl', TRUE)));
+      return($smarty->fetch(get_template_path('glpi.tpl',TRUE,dirname(__FILE__))));
     } 
 
     /*  All checks are ok
@@ -347,7 +347,7 @@ class glpiAccount extends plugin
         $smarty->assign("string",$_POST['string']);
       }
       $smarty->assign("Method","rename");
-      $display= $smarty->fetch(get_template_path('glpi_edit_type.tpl', TRUE));
+      $display= $smarty->fetch(get_template_path('glpi_edit_type.tpl',TRUE,dirname(__FILE__)));
       return($display);
     }
 
@@ -360,7 +360,7 @@ class glpiAccount extends plugin
       $smarty->assign("Method","edit");
       $smarty->assign("SystemTypes",            $this->handle->getSystemTypes());
       $smarty->assign("SystemTypeKeys",         array_flip($this->handle->getSystemTypes()));
-      $display= $smarty->fetch(get_template_path('glpi_edit_type.tpl', TRUE));
+      $display= $smarty->fetch(get_template_path('glpi_edit_type.tpl',TRUE,dirname(__FILE__)));
       return($display);
     }
 
@@ -435,7 +435,7 @@ class glpiAccount extends plugin
         $smarty->assign("string",$_POST['string']);
       }
       $smarty->assign("Method","rename");
-      $display= $smarty->fetch(get_template_path('glpi_edit_os.tpl', TRUE));
+      $display= $smarty->fetch(get_template_path('glpi_edit_os.tpl',TRUE,dirname(__FILE__)));
       return($display);
     }
 
@@ -445,7 +445,7 @@ class glpiAccount extends plugin
       $smarty->assign("Method","edit");
       $smarty->assign("OSs",            $this->handle->getOSTypes());
       $smarty->assign("OSKeys",         array_flip($this->handle->getOSTypes()));
-      $display= $smarty->fetch(get_template_path('glpi_edit_os.tpl', TRUE));
+      $display= $smarty->fetch(get_template_path('glpi_edit_os.tpl',TRUE,dirname(__FILE__)));
       return($display);
     }
 
@@ -613,7 +613,7 @@ class glpiAccount extends plugin
     $divlist = new divSelectBox("glpiAttachmentsList");
     $divlist-> SetHeight(130); 
     $atts = $this->getUsedAttachments(true);
-    $downlink = "<a href='get_attachment.php?id=%s' target='_blank'>%s</a>";
+    $downlink = "<a href='?".$_GET['plug']."&get_attachment.php?id=%s' target='_blank'>%s</a>";
     $del_link = "<input type='image' src='images/edittrash.png' name='delAttachment_%s'>";
     foreach($atts as $id => $attachment){
       $divlist->AddEntry
@@ -659,7 +659,7 @@ class glpiAccount extends plugin
     }
     $smarty->assign("comments",               $this->comments);
 
-    $display.= $smarty->fetch(get_template_path('glpi.tpl', TRUE));
+    $display.= $smarty->fetch(get_template_path('glpi.tpl',TRUE,dirname(__FILE__)));
     return($display);
   }
 
index df2bae08db7c2e49f0057688ceb8288bdbf4a90e..8004bf6aca9cdb14f48e1c3f18c6340dc7ba0ee2 100644 (file)
@@ -71,7 +71,7 @@ class glpiAttachmentPool extends plugin
         /* remove attach from db */
         $this->delAttach = $str;
         $smarty->assign("warning", sprintf(_("You're about to delete the glpi attachment component '%s'."), $attach[$str]['name']));
-        return($smarty->fetch(get_template_path('remove_glpi.tpl', TRUE)));
+        return($smarty->fetch(get_template_path('remove_glpi.tpl',TRUE,dirname(__FILE__))));
       }
  
       /* Start editing entry */ 
@@ -191,7 +191,7 @@ class glpiAttachmentPool extends plugin
         $status = _("Currently no file uploaded.");
       }
       $smarty->assign("status",$status); 
-      return($smarty->fetch(get_template_path('glpiAttachmentEdit.tpl', TRUE)));
+      return($smarty->fetch(get_template_path('glpiAttachmentEdit.tpl',TRUE,dirname(__FILE__))));
     }
 
     /* Create list with checkboxes to select / deselect some attachents */
@@ -274,7 +274,7 @@ class glpiAttachmentPool extends plugin
     $smarty->assign("alphabet",         generate_alphabet());
     $smarty->assign("attachment_regex", $GlpiAttachmentFilter['filter']);
 
-    $display.= $smarty->fetch(get_template_path('glpiAttachmentPool.tpl', TRUE));
+    $display.= $smarty->fetch(get_template_path('glpiAttachmentPool.tpl',TRUE,dirname(__FILE__)));
     return($display);
   }
 
index fbb710f2d13779a041e47a5c87b40ae47185e249..b4581f123841ffcc72dffb074d085cb96433f9b7 100644 (file)
@@ -117,7 +117,7 @@ class glpiDeviceManagement extends plugin
         print_red(_("Can't detect object name."));
       }
       
-      return($smarty->fetch(get_template_path('remove_glpi.tpl', TRUE)));
+      return($smarty->fetch(get_template_path('remove_glpi.tpl',TRUE,dirname(__FILE__))));
     }
 
     /* Delete entry, but check if this device is in currently in use */
@@ -262,7 +262,7 @@ class glpiDeviceManagement extends plugin
     $smarty->assign("alphabet", generate_alphabet());
     $smarty->assign("device_regex", $filter['device_regex']);
 
-    $display.= $smarty->fetch(get_template_path('glpiDeviceManagement.tpl', TRUE));
+    $display.= $smarty->fetch(get_template_path('glpiDeviceManagement.tpl',TRUE,dirname(__FILE__)));
     return($display);
   }
 
@@ -420,7 +420,7 @@ class glpiDeviceManagement extends plugin
 
     $smarty->assign("formats",array("Large","Medium","Micro"));
     $smarty->assign("formatKeys",array('Grand','Moyen','Micro'));
-    return($smarty->fetch(get_template_path('glpi_devices.tpl', TRUE)));
+    return($smarty->fetch(get_template_path('glpi_devices.tpl',TRUE,dirname(__FILE__))));
   }
 }
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
index 8e676d8eeeae19cb97c300b714d9ec1228103a29..839f745af5c8484676a4c877beb30633d6caaebd 100644 (file)
@@ -139,14 +139,14 @@ class glpiManufacturer extends plugin
         $smarty->assign($attrs,$this->$attrs);
       }
 
-      $display.= $smarty->fetch(get_template_path('glpiManufacturerAdd.tpl', TRUE));
+      $display.= $smarty->fetch(get_template_path('glpiManufacturerAdd.tpl',TRUE,dirname(__FILE__)));
       return($display);
     }
 
 
     $smarty->assign("Manus",    $this->parent->handle->getEnterprises());
     $smarty->assign("ManuKeys", array_flip($this->parent->handle->getEnterprises()));
-    $display.= $smarty->fetch(get_template_path('glpiManufacturer.tpl', TRUE));
+    $display.= $smarty->fetch(get_template_path('glpiManufacturer.tpl',TRUE,dirname(__FILE__)));
     return($display);
   }
 
index 049249cd5aaba106cd2b8d8abc872c3e44967888..9eee7eb168da38082825959bb6e7be275915cdbc 100644 (file)
@@ -166,7 +166,7 @@ class glpiPrinterAccount extends plugin
       */
     if(!isset($this->config->data['SERVERS']['GLPI'])){
       print_red(_("There is no server with valid glpi database service."));
-      return($smarty->fetch(get_template_path('glpiPrinter.tpl', TRUE)));
+      return($smarty->fetch(get_template_path('glpiPrinter.tpl',TRUE,dirname(__FILE__))));
     }
 
     $this->data = $this->config->data['SERVERS']['GLPI'];
@@ -176,7 +176,7 @@ class glpiPrinterAccount extends plugin
      */
     if(!is_callable("mysql_connect")){
       print_red(_("Can't connect to glpi database, the php-mysql extension is missing."));
-      return($smarty->fetch(get_template_path('glpiPrinter.tpl', TRUE)));
+      return($smarty->fetch(get_template_path('glpiPrinter.tpl',TRUE,dirname(__FILE__))));
     }
 
     $this->handle = new glpiDB($this->data['SERVER'],$this->data['LOGIN'],$this->data['PASSWORD'],$this->data['DB']);
@@ -186,7 +186,7 @@ class glpiPrinterAccount extends plugin
      */
     if(!$this->handle->is_connected){
       print_red(_("Can't connect to glpi database, check configuration twice."));
-      return($smarty->fetch(get_template_path('glpiPrinter.tpl', TRUE)));
+      return($smarty->fetch(get_template_path('glpiPrinter.tpl',TRUE,dirname(__FILE__))));
     } 
 
     /*  All checks are ok
@@ -314,7 +314,7 @@ class glpiPrinterAccount extends plugin
         $smarty->assign("string",$_POST['string']);
       }
 
-      $display= $smarty->fetch(get_template_path('glpi_edit_printer_type.tpl', TRUE));
+      $display= $smarty->fetch(get_template_path('glpi_edit_printer_type.tpl',TRUE,dirname(__FILE__)));
       return($display);
     }  
 
@@ -325,7 +325,7 @@ class glpiPrinterAccount extends plugin
       $smarty->assign("Method","edit");
       $smarty->assign("PrinterTypes",            $this->handle->getPrinterTypes());
       $smarty->assign("PrinterTypeKeys",         array_flip($this->handle->getPrinterTypes()));
-      $display= $smarty->fetch(get_template_path('glpi_edit_printer_type.tpl', TRUE));
+      $display= $smarty->fetch(get_template_path('glpi_edit_printer_type.tpl',TRUE,dirname(__FILE__)));
       return($display);
     }
 
@@ -647,7 +647,7 @@ class glpiPrinterAccount extends plugin
       $smarty->assign("typeACL", $this->getacl("type",true));
     }
 
-    $display.= $smarty->fetch(get_template_path('glpiPrinter.tpl', TRUE));
+    $display.= $smarty->fetch(get_template_path('glpiPrinter.tpl',TRUE,dirname(__FILE__)));
     return($display);
   }
 
index cd011125b28283624cb4f2cdec9d0abd664c15e1..9b38a4c5bb1dfc03231467d6f58df7dbf8032da2 100644 (file)
@@ -95,7 +95,7 @@ class glpiPrinterCartridges extends plugin
         $this->del = $_GET['id'];
         $val = ($this->parent->handle->getCartridgeTypeInformations($_GET['id']));
         $smarty->assign("warning", sprintf(_("You're about to delete the glpi cartridge type '%s'."), $val[$this->del]['name']));
-        return($smarty->fetch(get_template_path('remove_glpi.tpl', TRUE)));
+        return($smarty->fetch(get_template_path('remove_glpi.tpl',TRUE,dirname(__FILE__))));
     }
 
     if(isset($_POST['delete_cancel'])){
@@ -224,7 +224,7 @@ class glpiPrinterCartridges extends plugin
     $smarty->assign("alphabet", generate_alphabet());
     $smarty->assign("cartridge_regex", $filter);
 
-    $display.= $smarty->fetch(get_template_path('glpiPrinterCartridges.tpl', TRUE));
+    $display.= $smarty->fetch(get_template_path('glpiPrinterCartridges.tpl',TRUE,dirname(__FILE__)));
     return($display);
   }
 
index e1d86fcb61219743b22ce0126367c13fbd4b9306..3b3a6f9e27acc299ddd251dd6a23ede4212368b2 100644 (file)
@@ -123,7 +123,7 @@ class glpiPrinterCartridgesEdit extends plugin
     if($this->edit_type){
       $smarty->assign("PrinterTypes",            $this->parent->handle->getCartridgeTypes());
       $smarty->assign("PrinterTypeKeys",         array_flip($this->parent->handle->getCartridgeTypes()));
-      $display= $smarty->fetch(get_template_path('glpi_edit_cartridge_type.tpl', TRUE));
+      $display= $smarty->fetch(get_template_path('glpi_edit_cartridge_type.tpl',TRUE,dirname(__FILE__)));
       return($display);
     }
 
index 53857b8ddbc1a85c3e564dd04fbf403ba02f230b..eec0546e4ffe1428e7c1051672422326150caf68 100644 (file)
@@ -200,7 +200,7 @@ class glpiSelectUser extends plugin
     $smarty->assign("users_regex", $filter['users_regex']);
 
 
-    $display.= $smarty->fetch(get_template_path('glpiSelectUser.tpl', TRUE));
+    $display.= $smarty->fetch(get_template_path('glpiSelectUser.tpl',TRUE,dirname(__FILE__)));
     return($display);
   }