Beispiel #1
0
 /**
  * Appropriated link base (absolute or relative, HTTP or HTTPS).
  */
 private static function doLinkBase($bUseSecureUrl, $bUseAbsoluteUrl)
 {
     // when we are in HTTPS, we want to stay in this mode...
     if (AnwComponent::globalCfgHttpsEnabled() && ($bUseSecureUrl || AnwAction::isActionSecure($sAction) || AnwEnv::isHttps())) {
         if (!AnwEnv::isHttps() || $bUseAbsoluteUrl) {
             // we switch to HTTPS (or force absolute url)
             $sLink = AnwComponent::globalCfgHttpsUrl();
         } else {
             // we are already in HTTPS (and we want to stay in this mode - even if action doesn't require it)
             $sLink = self::linkRelative();
         }
     } else {
         if ($bUseAbsoluteUrl) {
             // we force absolute url
             $sLink = AnwComponent::globalCfgUrlRoot();
         } else {
             // we are already in HTTP
             $sLink = self::linkRelative();
         }
     }
     return $sLink;
 }