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

Diff for Metafox/lib/Platon.php between version 1.8 and 1.9

version 1.8, 2011/06/17 13:56:38 version 1.9, 2012/05/15 17:47:56
Line 16 
Line 16 
  *   <?php   *   <?php
  *       require_once 'Platon.php';   *       require_once 'Platon.php';
  *       Platon::function_name();   *       Platon::function_name();
  *   ?>   *   ? >
  *   *
  * @author      Ondrej Jombik <nepto@platon.sk>   * @author      Ondrej Jombik <nepto@platon.sk>
  * @package     Platon   * @package     Platon
Line 24 
Line 24 
  * @access      public   * @access      public
  */   */
   
 /* $Platon: Metafox/lib/Platon.php,v 1.7 2011-05-31 13:04:30 igor Exp $ */  /* $Platon: Metafox/lib/Platon.php,v 1.8 2011-06-17 13:56:38 igor Exp $ */
   
 class Platon  class Platon
 {  {
Line 157  class Platon
Line 157  class Platon
      * @param   boolean $temporary  if such redirect is only temporary one       * @param   boolean $temporary  if such redirect is only temporary one
      * @todo    implement HTML page redirecting if output was aleady sent       * @todo    implement HTML page redirecting if output was aleady sent
      */       */
     function redirect($where, $temporary = false) /* {{{ */      function redirect($where, $temporary = false, $status_code = 301) /* {{{ */
     {      {
         $url = '';          $url = '';
         if (! strncmp($where, "ftp://", 6)          if (! strncmp($where, "ftp://", 6)
Line 182  class Platon
Line 182  class Platon
   
         header('Location: '.$url);          header('Location: '.$url);
         if (! $temporary) {          if (! $temporary) {
             header('HTTP/1.1 301 Moved Permanently');                          switch($status_code) {
                                   case 303:
                                           header('HTTP/1.1 303 See Other');
                                           break;
                                   case 302:
                                           header('HTTP/1.1 302 Found');
                                           break;
                                   case 301:
                                   default:
                                           header('HTTP/1.1 301 Moved Permanently');
                                           break;
                           }
         }          }
         exit;          exit;
     } /* }}} */      } /* }}} */

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

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