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

Diff for Metafox/functions.inc.php between version 1.145 and 1.146

version 1.145, 2026/11/06 11:25:59 version 1.146, 2026/11/06 14:16:37
Line 17 
Line 17 
  * http://platon.sk/projects/Metafox/   * http://platon.sk/projects/Metafox/
  */   */
   
 /* $Platon: Metafox/functions.inc.php,v 1.144 2024/11/20 15:48:03 igor Exp $ */  /* $Platon: Metafox/functions.inc.php,v 1.145 2026/11/06 11:25:59 nepto Exp $ */
   
 function ezin_eval($evalcode) /* {{{ */  function ezin_eval($evalcode) /* {{{ */
 {  {
Line 695  function ezin_get_weblog_count($count_ty
Line 695  function ezin_get_weblog_count($count_ty
  * Link changing   * Link changing
  */   */
   
   function ezin_get_schema() /* {{{ */
   {
           if (! empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'off') {
                   return 'https';
           }
           return @$_SERVER['SERVER_PORT'] == 443 ? 'https' : 'http';
   } /* }}} */
   
 function ezin_get_link($type = 'S', $id = 0, $full_url = 0, $lang = '', $force_lang = 0) /* {{{ */  function ezin_get_link($type = 'S', $id = 0, $full_url = 0, $lang = '', $force_lang = 0) /* {{{ */
 {  {
         global $ezin_cfg;          global $ezin_cfg;
Line 2073  function ezin_cgi_parse() /* {{{ */
Line 2081  function ezin_cgi_parse() /* {{{ */
   
         if ($do_redirect) {          if ($do_redirect) {
                 $request_uri = $_SERVER['REQUEST_URI'];                  $request_uri = $_SERVER['REQUEST_URI'];
                 $location    = 'http://'.$_SERVER['HTTP_HOST'].$request_uri;                  $location    = ezin_get_schema().'://'.$_SERVER['HTTP_HOST'].$request_uri;
                 if (strpos($request_uri, '?') === false) {                  if (strpos($request_uri, '?') === false) {
                         if (intval($ezin_cgi['article_id']) > 0) {                          if (intval($ezin_cgi['article_id']) > 0) {
                                 $location = ezin_get_link('A', $ezin_cgi['article_id'], 1, @$ezin_cgi['lang']);                                  $location = ezin_get_link('A', $ezin_cgi['article_id'], 1, @$ezin_cgi['lang']);
Line 2258  $ret =<<<END
Line 2266  $ret =<<<END
         \$ezin_tmpl_subdir = dirname(Platon::str_replace_prefix(\$ezin_cfg['url'].$url_part,          \$ezin_tmpl_subdir = dirname(Platon::str_replace_prefix(\$ezin_cfg['url'].$url_part,
                                 '', \$_SERVER['SCRIPT_NAME']));                                  '', \$_SERVER['SCRIPT_NAME']));
         if (@chdir(\$ezin_sys['dir']['root']."/lib2/$lib2_dir/".\$ezin_tmpl_subdir) == false) {          if (@chdir(\$ezin_sys['dir']['root']."/lib2/$lib2_dir/".\$ezin_tmpl_subdir) == false) {
                 header('Location: http://'.\$_SERVER['HTTP_HOST'].\$ezin_cfg['url']);                  header('Location: '.ezin_get_schema().'://'.\$_SERVER['HTTP_HOST'].\$ezin_cfg['url']);
                 exit;                  exit;
         }          }
         if (@file_exists(basename(\$_SERVER['SCRIPT_NAME']))) {          if (@file_exists(basename(\$_SERVER['SCRIPT_NAME']))) {
Line 2289  function ezin_dir_app_include($url_part,
Line 2297  function ezin_dir_app_include($url_part,
                                 '', $_SERVER['SCRIPT_NAME']));                                  '', $_SERVER['SCRIPT_NAME']));
   
         if (@chdir($ezin_sys['dir']['root']."/lib2/$lib2_dir/$ezin_tmpl_subdir") == false) {          if (@chdir($ezin_sys['dir']['root']."/lib2/$lib2_dir/$ezin_tmpl_subdir") == false) {
                 header('Location: http://'.$_SERVER['HTTP_HOST'].$ezin_cfg['url']);                  header('Location: '.ezin_get_schema().'://'.$_SERVER['HTTP_HOST'].$ezin_cfg['url']);
                 exit;                  exit;
         }          }
   

Legend:
Removed from v.1.145  
changed lines
  Added in v.1.146

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