Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Saturday, November 14, 2026

Diff for Metafox/subst.inc.php between version 1.65 and 1.66

version 1.65, 2015/10/27 11:14:14 version 1.66, 2026/11/06 14:16:37
Line 17 
Line 17 
  * http://platon.sk/projects/Metafox/   * http://platon.sk/projects/Metafox/
  */   */
   
 /* $Platon: Metafox/subst.inc.php,v 1.64 2015/08/20 06:12:02 nepto Exp $ */  /* $Platon: Metafox/subst.inc.php,v 1.65 2015/10/27 11:14:14 igor Exp $ */
   
 require_once 'cfgldr.inc.php';  require_once 'cfgldr.inc.php';
 require_once 'error.inc.php';  require_once 'error.inc.php';
Line 54  ezin_cgi_parse();
Line 54  ezin_cgi_parse();
  * Mandatory HTTP host check   * Mandatory HTTP host check
  */   */
   
   $ezin_https = ezin_get_schema() == 'https';
   
 switch ($ezin_cfg['https_admin']) {  switch ($ezin_cfg['https_admin']) {
         case 0: // Always OFF          case 0: // Always OFF
                 $https_admin_redirect = false;                  $https_admin_redirect = false;
                 break;                  break;
         case 1: // Auto-detect          case 1: // Auto-detect
                 $https_admin_redirect = strcasecmp($_SERVER['HTTPS'], 'on')                  $https_admin_redirect = ! $ezin_https
                         && strlen($_SERVER['HTTP_HOST']) > 0;                          && strlen($_SERVER['HTTP_HOST']) > 0;
                 break;                  break;
         case 2: // Always ON          case 2: // Always ON
Line 69  switch ($ezin_cfg['https_admin']) {
Line 71  switch ($ezin_cfg['https_admin']) {
   
 if ($ezin_cgi['output'] == 'admin'  if ($ezin_cgi['output'] == 'admin'
                 && $https_admin_redirect                  && $https_admin_redirect
                 && $_SERVER['SERVER_PORT'] != 443)                  && ! $ezin_https)
 {  {
         $socket = @fsockopen('ssl://'.$_SERVER['HTTP_HOST'], 443);          $socket = @fsockopen('ssl://'.$_SERVER['HTTP_HOST'], 443);
         if (is_resource($socket)) {          if (is_resource($socket)) {
Line 125  if (strlen($ezin_cfg['http_host_redirect
Line 127  if (strlen($ezin_cfg['http_host_redirect
         $ezin_redirect_ar = @parse_url($ezin_redirect_url);          $ezin_redirect_ar = @parse_url($ezin_redirect_url);
         if (@strlen($ezin_redirect_ar['scheme']) <= 0) {          if (@strlen($ezin_redirect_ar['scheme']) <= 0) {
                 $ezin_redirect_ar = @parse_url(                  $ezin_redirect_ar = @parse_url(
                                 (strcasecmp($_SERVER['HTTPS'], 'on') ? 'http' : 'https')                                  ($ezin_https ? 'https' : 'http')
                                 .'://'.$ezin_redirect_url);                                  .'://'.$ezin_redirect_url);
         }          }
         if (strlen($ezin_redirect_ar['host']) > 0 && strlen($ezin_http_host) > 0          if (strlen($ezin_redirect_ar['host']) > 0 && strlen($ezin_http_host) > 0

Legend:
Removed from v.1.65  
changed lines
  Added in v.1.66

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top