From: cajus Date: Wed, 9 Apr 2008 12:02:00 +0000 (+0000) Subject: Update PPD save path X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=04ee5fa7c185606330dbb93fec1e56381201ad1b;p=gosa.git Update PPD save path git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10298 594d385d-05f5-0310-b6e9-bd551577e9d8 --- 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(); }