From f6cb05cfd9f54559e40ab342b9561785b31cef57 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 9 Nov 2005 10:09:12 +0000 Subject: [PATCH] added https support for ppd path git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1889 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_printGeneric.inc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index 6d495c736..39a869fd2 100644 --- a/plugins/admin/systems/class_printGeneric.inc +++ b/plugins/admin/systems/class_printGeneric.inc @@ -514,8 +514,13 @@ class printgeneric extends plugin $this->attrs= $attrs; } - print_a($_SERVER); - $str = preg_replace("/".$_SERVER['SERVER_NAME'].".*$/i",$_SERVER['SERVER_NAME']."/ppd/",$_SERVER['HTTP_REFERER']); + if(preg_match("/https/i",$_SERVER['HTTP_REFERER'])){ + $method="https://"; + }else{ + $method="http://"; + } + + $str = $method.$_SERVER['SERVER_NAME']."/ppd/"; $this->attrs['gotoPrinterPPD'] = $str.$this->attrs['gotoPrinterPPD']; /* Append printer user -- 2.30.2