Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Piatok, 23. október 2026

Rozdiely pre phpPlatonLib/Platon/Platon.php medzi verziami 1.26 a 1.27

verzia 1.26, 2004/12/12 21:50:18 verzia 1.27, 2004/12/13 10:23:54
Riadok 24 
Riadok 24 
  * @access      public   * @access      public
  */   */
   
 /* $Platon: phpPlatonLib/Platon/Platon.php,v 1.25 2004/12/12 21:44:55 nepto Exp $ */  /* $Platon: phpPlatonLib/Platon/Platon.php,v 1.26 2004/12/12 21:50:18 nepto Exp $ */
   
 class Platon  class Platon
 {  {
Riadok 183  class Platon
Riadok 183  class Platon
         }          }
         exit;          exit;
     } /* }}} */      } /* }}} */
   
       /**
        * Changes a HTTP host using permanent redirect
        *
        * @param   string  $new_http_host  destination HTTP host
        * @param   string  $old_http_host  source HTTP host (string or array)
        *                                  empty string means any host
        */
       function redirect_change_host($new_http_host, $old_http_host = '') /* {{{ */
       {
           if (strlen($_SERVER['HTTP_HOST']) <= 0) {
               return;
           }
           if (! strcasecmp($new_http_host, $_SERVER['HTTP_HOST'])) {
               return;
           }
           if (is_array($old_http_host)) {
               foreach ($old_http_host as $http_host) {
                   Platon::redirect_change_host($new_http_host, $old_http_host);
               }
               return;
           }
           if (strlen($old_http_host) > 0) {
               if (strcasecmp($old_http_host, $_SERVER['HTTP_HOST'])) {
                   return;
               }
           }
           $schema = strcasecmp($_SERVER['HTTPS'], 'on') ? 'http' : 'https';
           $request_uri = $_SERVER['REQUEST_URI'];
           return Platon::redirect("$schema://$new_http_host$request_uri");
       } /* }}} */
   
     /**      /**
      * Redirects if it is neccessary for particular file.       * Redirects if it is neccessary for particular file.

Legend:
Odstranené z verzie1.26  
zmenené riadky
  Pridané vo verzii1.27

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok