diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index 9cccd381a2afd013918ff2dcada07f989a971ad6..3738b4f4ac4b377b78588a0cbe85d81e43da65ba 100644 (file)
$this->PPDdialogToSave->save_ppd();
}
+ if(preg_match("/https/i",$_SERVER['HTTP_REFERER'])){
+ $method="https://";
+ }else{
+ $method="http://";
+ }
+
+ /* If no ppd is selected, remove this attribute */
+ if(!empty($this->gotoPrinterPPD)) {
+ $this->gotoPrinterPPD = $method.str_replace("//","/",$_SERVER['SERVER_NAME']."/ppd/".$this->gotoPrinterPPD);
+ }else{
+ $this->gotoPrinterPPD = array();
+ }
+
$dn= $this->dn;
plugin::save();
$ldap= $this->config->get_ldap_link();
$this->attrs= $attrs;
}
- if(preg_match("/https/i",$_SERVER['HTTP_REFERER'])){
- $method="https://";
- }else{
- $method="http://";
- }
-
- /* Only save ppd path, if the path is not empty (no ppd selected )*/
- if(count($this->gotoPrinterPPD)) {
- $this->attrs['gotoPrinterPPD'] = $method.str_replace("//","/",$_SERVER['SERVER_NAME']."/ppd/".$this->gotoPrinterPPD);
- }else{
- $this->attrs['gotoPrinterPPD'] = array();
- }
-
/* Append printer user
*/
$this->attrs['gotoUserPrinter']=array();