tbrehm
2013-07-31 615a0a96618fa99e7e452523145d6c0f238d4473
interface/lib/classes/functions.inc.php
@@ -130,11 +130,22 @@
   }
   
   public function get_ispconfig_url() {
      global $app;
      $url = (stristr($_SERVER['SERVER_PROTOCOL'],'HTTPS') || stristr($_SERVER['HTTPS'],'on'))?'https':'http';
      if($_SERVER['SERVER_NAME'] != '_') {
      $url .= '://'.$_SERVER['SERVER_NAME'];
      if($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443) {
         $url .= ':'.$_SERVER['SERVER_PORT'];
      }
      } else {
         $app->uses("getconf");
         $server_config = $app->getconf->get_server_config(1,'server');
         $url .= '://'.$server_config['hostname'];
         if($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443) {
            $url .= ':'.$_SERVER['SERVER_PORT'];
         }
      }
      return $url;
   }