From: hickert Date: Wed, 23 Jan 2008 10:47:21 +0000 (+0000) Subject: Updated glpi X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b9d184afec9f7b29fcb470f595527e8d9e59cae6;p=gosa.git Updated glpi - 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 --- diff --git a/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiAccount.inc b/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiAccount.inc index e6411087a..4225e9fce 100644 --- a/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiAccount.inc +++ b/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiAccount.inc @@ -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 = "%s"; + $downlink = "%s"; $del_link = ""; 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); } diff --git a/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiAttachmentPool.inc b/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiAttachmentPool.inc index df2bae08d..8004bf6ac 100644 --- a/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiAttachmentPool.inc +++ b/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiAttachmentPool.inc @@ -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); } diff --git a/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiDeviceManagement.inc b/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiDeviceManagement.inc index fbb710f2d..b4581f123 100644 --- a/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiDeviceManagement.inc +++ b/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiDeviceManagement.inc @@ -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: diff --git a/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiManufacturer.inc b/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiManufacturer.inc index 8e676d8ee..839f745af 100644 --- a/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiManufacturer.inc +++ b/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiManufacturer.inc @@ -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); } diff --git a/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiPrinterAccount.inc b/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiPrinterAccount.inc index 049249cd5..9eee7eb16 100644 --- a/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiPrinterAccount.inc +++ b/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiPrinterAccount.inc @@ -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); } diff --git a/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiPrinterCartridges.inc b/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiPrinterCartridges.inc index cd011125b..9b38a4c5b 100644 --- a/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiPrinterCartridges.inc +++ b/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiPrinterCartridges.inc @@ -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); } diff --git a/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiPrinterCartridgesEdit.inc b/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiPrinterCartridgesEdit.inc index e1d86fcb6..3b3a6f9e2 100644 --- a/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiPrinterCartridgesEdit.inc +++ b/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiPrinterCartridgesEdit.inc @@ -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); } diff --git a/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiSelectUser.inc b/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiSelectUser.inc index 53857b8dd..eec0546e4 100644 --- a/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiSelectUser.inc +++ b/gosa-plugins/glpi/admin/systems/services/glpi/class_glpiSelectUser.inc @@ -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); }