Changeset 581

Show
Ignore:
Timestamp:
09/27/2007 07:29:43 PM (14 months ago)
Author:
Shadowhand
Message:

Started porting the date helper

Location:
trunk/system
Files:
1 added
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/core/Kohana.php

    r577 r581  
    258258                // Re-start the buffer 
    259259                ob_start(array('Kohana', 'output')); 
     260 
     261                // Send the 500 header 
     262                header('HTTP/1.1 500 Internal Server Error'); 
    260263 
    261264                // Load the error page 
     
    542545                } 
    543546        } 
    544          
     547 
    545548        public static function show_404() 
    546549        { 
    547                 $message = Kohana::lang('core.page_not_found', array('/'.URI::string().Config::item('core.url_suffix'))); 
    548                  
     550                $message = Kohana::lang('core.page_not_found', '/'.Router::$current_uri); 
     551 
    549552                // Log the error 
    550553                Log::add('file_not_found', $message); 
     
    555558                // Re-start the buffer 
    556559                ob_start(array('Kohana', 'output')); 
     560 
     561                // Send the 404 header 
     562                header('HTTP/1.1 404 File Not Found'); 
    557563 
    558564                // Load the error page 
  • trunk/system/libraries/URI.php

    r569 r581  
    4646                array_unshift($segment_array, 0); 
    4747                $segment_array = array_slice($segment_array, $offset + 1, $this->total_segments(), TRUE); 
    48                  
     48 
    4949                if ( ! $associative) 
    5050                        return $segment_array; 
    51                  
     51 
    5252                $segment_array_assoc = array(); 
    53                  
     53 
    5454                foreach (array_chunk($segment_array, 2) as $pair) 
    5555                { 
    5656                        $segment_array_assoc[$pair[0]] = isset($pair[1]) ? $pair[1] : ''; 
    5757                } 
    58                  
     58 
    5959                return $segment_array_assoc; 
    6060        } 
     
    7070                return self::$current_uri; 
    7171        } 
    72          
     72 
    7373        /** 
    7474         * Returns the total number of URI segments 
     
    8181                return count(self::$segments); 
    8282        } 
    83          
     83 
    8484        /** 
    8585         * Returns the last URI segment 
  • trunk/system/views/kohana_404.php

    r577 r581  
    1 <?php header('HTTP/1.1 404 File Not Found'); ?> 
    21<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
    32<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 
     
    1615strong {color:#700;} 
    1716#wrap {width:600px;margin:2em auto;padding:0.5em 1em;background:#fff;border:solid 1px #ddd;border-bottom:solid 2px #aaa;} 
    18 #stats {margin:0;padding-top: 0.5em;border-top:solid 1px #ccc;font-size:0.8em;text-align:center;color:#555;} 
     17#stats {margin:0;padding-top:0.5em;border-top:solid 1px #ccc;font-size:0.8em;text-align:center;color:#555;} 
    1918.message {margin:1em;padding:0.5em;background:#dfdfdf;border:solid 1px #999;} 
    2019.detail {text-align:center;} 
     
    3029<body> 
    3130<div id="wrap"> 
    32 <h1>404 Not Found!</h1> 
    33 <p>An error was detected which prevented the loading of this page. If this problem persists, please contact the website administrator.</p> 
     31<h1>Page Not Found</h1> 
     32<p>The page your are looking for does not exist or has been permanently moved.</p> 
    3433<p class="message"><?php echo $message ?></p> 
    3534<p id="stats">Loaded in {execution_time} seconds, using {memory_usage} MB of memory. Generated by Kohana v{kohana_version}.</p> 
  • trunk/system/views/kohana_php_error.php

    r577 r581  
    1 <?php header('HTTP/1.1 500 Internal Server Error'); ?> 
    21<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
    32<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">