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

Diff for Metafox/subst.inc.php between version 1.16 and 1.17

version 1.16, 2006/07/09 09:26:05 version 1.17, 2006/08/14 10:15:17
Line 41  if (isset($ezin_sys['weblog']['dsn']) &&
Line 41  if (isset($ezin_sys['weblog']['dsn']) &&
 }  }
   
 /*  /*
    * Input parameters parsing
    */
   
   ezin_cgi_parse();
   
   /*
    * Mandatory HTTP host check
    */
   
   if (strlen($ezin_cfg['http_host_redirect']) > 0 && strcasecmp($_SERVER['REQUEST_METHOD'], 'POST')) { /* {{{ */
           $ezin_http_host    = strtolower($_SERVER['HTTP_HOST']);
           $ezin_redirect_ar  = preg_split('|\s+|', $ezin_cfg['http_host_redirect']);
           if (count($ezin_redirect_ar) > 1) {
                   $ezin_redirect_new = array();
                   foreach ($ezin_redirect_ar as $val) {
                           if (preg_match('|^(\w\w)\((.*)\)$|', $val, $matches)) {
                                   $ezin_redirect_new[strtolower($matches[1])] = $matches[2];
                   //              if ($ezin_cgi['lang_init'] >= 2 && ! strcasecmp($matches[2], $ezin_http_host)) {
                   //                      $ezin_cgi['lang'] = strtolower($matches[1]);
                   //              }
                           } else {
                                   $ezin_redirect_new[''] = $val;
                           }
                   }
                   if (isset($ezin_redirect_new[$ezin_cgi['lang']])) {
                           $ezin_redirect_url = $ezin_redirect_new[$ezin_cgi['lang']];
                   } else {
                           $ezin_redirect_url = @$ezin_redirect_new[$ezin_cgi['']];
                   }
           } else {
                   $ezin_redirect_url = $ezin_redirect_ar[0];
           }
           $ezin_redirect_ar = @parse_url($ezin_redirect_url);
           if (@strlen($ezin_redirect_ar['scheme']) <= 0) {
                   $ezin_redirect_ar = @parse_url(
                                   (strcasecmp($_SERVER['HTTPS'], 'on') ? 'http' : 'https')
                                   .'://'.$ezin_redirect_url);
           }
           if (strlen($ezin_redirect_ar['host']) > 0 && strlen($ezin_http_host) > 0
                           && strcasecmp($ezin_redirect_ar['host'], $ezin_http_host)) {
                   //die("here: ".$ezin_http_host.'-'.$ezin_redirect_ar['host']);
                   $ezin_http_host_allowed_ar   = preg_split('|\s+|', $ezin_cfg['http_host_allowed']);
                   $ezin_http_host_forbidden_ar = preg_split('|\s+|', $ezin_cfg['http_host_forbidden']);
                   if (count($ezin_http_host_forbidden_ar) <= 0
                                   || in_array($ezin_http_host, $ezin_http_host_forbidden_ar)) {
                           if (! in_array($ezin_http_host, $ezin_http_host_allowed_ar)) {
                                   if (! isset($ezin_redirect_ar['path'])) {
                                           $ezin_redirect_ar['path'] = '/';
                                   }
                                   $ezin_redirect_ar['path'] .= Platon::str_replace_prefix(
                                                   Platon::append_slash($ezin_cfg['url']), '', $_SERVER['REQUEST_URI']);
                                   Platon::redirect(Platon::glue_url($ezin_redirect_ar));
                           }
                   }
           }
   } /* }}} */
   
   if ($ezin_cgi['lang'] != @$_COOKIE['ezin_lang']) {
           $expire_time = time() + (3600 * 24 * 30 * 12 * 2); // two years
           setcookie('ezin_lang', $ezin_cgi['lang'], $expire_time, $ezin_cfg['url']);
   }
   
   /*
  * Check number of articles after SYSDATE   * Check number of articles after SYSDATE
  */   */
   
Line 53  if ($ezin_atodo_cached === false ||
Line 116  if ($ezin_atodo_cached === false ||
 }  }
   
 /*  /*
  * Input parameters parsing  
  */  
   
 ezin_cgi_parse();  
 //var_dump($ezin_cgi);  
   
 /*  
  * Write counts   * Write counts
  */   */
   

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

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