From 8ca2f22a21b33a22bb488574c7db65d41068a8ec Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Tue, 05 Apr 2011 09:40:38 -0400 Subject: [PATCH] Fixed bug in functions library. --- interface/lib/classes/functions.inc.php | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/interface/lib/classes/functions.inc.php b/interface/lib/classes/functions.inc.php index 7934efb..7de83e9 100644 --- a/interface/lib/classes/functions.inc.php +++ b/interface/lib/classes/functions.inc.php @@ -96,6 +96,14 @@ return number_format((double)$number, $number_format_decimals, $number_format_dec_point, $number_format_thousands_sep); } + public function get_ispconfig_url() { + $url = (stristr($_SERVER['SERVER_PROTOCOL'],'HTTPS'))?'https':'http'; + $url .= '://'.$_SERVER['SERVER_NAME']; + if($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443) { + $url .= ':'.$_SERVER['SERVER_PORT']; + } + return $url; + } } -- Gitblit v1.9.1