Changeset 581
- Timestamp:
- 09/27/2007 07:29:43 PM (14 months ago)
- Location:
- trunk/system
- Files:
-
- 1 added
- 4 modified
-
core/Kohana.php (modified) (3 diffs)
-
helpers/date.php (added)
-
libraries/URI.php (modified) (3 diffs)
-
views/kohana_404.php (modified) (3 diffs)
-
views/kohana_php_error.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/core/Kohana.php
r577 r581 258 258 // Re-start the buffer 259 259 ob_start(array('Kohana', 'output')); 260 261 // Send the 500 header 262 header('HTTP/1.1 500 Internal Server Error'); 260 263 261 264 // Load the error page … … 542 545 } 543 546 } 544 547 545 548 public static function show_404() 546 549 { 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 549 552 // Log the error 550 553 Log::add('file_not_found', $message); … … 555 558 // Re-start the buffer 556 559 ob_start(array('Kohana', 'output')); 560 561 // Send the 404 header 562 header('HTTP/1.1 404 File Not Found'); 557 563 558 564 // Load the error page -
trunk/system/libraries/URI.php
r569 r581 46 46 array_unshift($segment_array, 0); 47 47 $segment_array = array_slice($segment_array, $offset + 1, $this->total_segments(), TRUE); 48 48 49 49 if ( ! $associative) 50 50 return $segment_array; 51 51 52 52 $segment_array_assoc = array(); 53 53 54 54 foreach (array_chunk($segment_array, 2) as $pair) 55 55 { 56 56 $segment_array_assoc[$pair[0]] = isset($pair[1]) ? $pair[1] : ''; 57 57 } 58 58 59 59 return $segment_array_assoc; 60 60 } … … 70 70 return self::$current_uri; 71 71 } 72 72 73 73 /** 74 74 * Returns the total number of URI segments … … 81 81 return count(self::$segments); 82 82 } 83 83 84 84 /** 85 85 * Returns the last URI segment -
trunk/system/views/kohana_404.php
r577 r581 1 <?php header('HTTP/1.1 404 File Not Found'); ?>2 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 3 2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> … … 16 15 strong {color:#700;} 17 16 #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;} 19 18 .message {margin:1em;padding:0.5em;background:#dfdfdf;border:solid 1px #999;} 20 19 .detail {text-align:center;} … … 30 29 <body> 31 30 <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> 34 33 <p class="message"><?php echo $message ?></p> 35 34 <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'); ?>2 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 3 2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
