From 04ee5fa7c185606330dbb93fec1e56381201ad1b Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 9 Apr 2008 12:02:00 +0000 Subject: [PATCH] Update PPD save path git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10298 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../goto/admin/systems/goto/class_printGeneric.inc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc b/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc index a3d5bb282..b3b55725a 100644 --- a/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc +++ b/gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc @@ -764,10 +764,19 @@ class printgeneric extends plugin }else{ $method="http://"; } + + /* Get servername */ + $server = $_SERVER['SERVER_NAME']; + $server = "buildserv"; + if(TESTS::is_ip($server)){ + $server_name = gethostbyaddr($server); + }else{ + $server_name = gethostbyaddr(gethostbyname($server)); + } /* If no ppd is selected, remove this attribute */ if(!empty($this->gotoPrinterPPD) && $this->initially_was_account) { - $this->gotoPrinterPPD = $method.str_replace("//","/",$_SERVER['SERVER_NAME']."/ppd/".$this->gotoPrinterPPD); + $this->gotoPrinterPPD = $method.str_replace("//","/",$server_name."/ppd/".$this->gotoPrinterPPD); }else{ $this->gotoPrinterPPD = array(); } -- 2.30.2