Changeset 647 for trunk/index.php

Show
Ignore:
Timestamp:
10/04/2007 01:57:26 PM (14 months ago)
Author:
Shadowhand
Message:

Overhauled User_Agent almost completely.

Spit shine on the rest of it.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/index.php

    r644 r647  
    88| User Guide for more information. 
    99| ----------------------------------------------------------------------------- 
    10 | User Guide: http://kohanaphp.com/user_guide/kohana/installation.html 
     10| User Guide: http://kohanaphp.com/user_guide/en/kohana/installation.html 
     11| ----------------------------------------------------------------------------- 
     12| License:    http://kohanaphp.com/user_guide/en/license.html 
    1113| ----------------------------------------------------------------------------- 
    1214*/ 
    1315 
    14 // Set the error reporting level 
    15 @error_reporting(E_ALL); 
     16/** 
     17 * Set the error reporting level. E_ALL is a good default. 
     18 * NOTE: Kohana will always ignore E_NOTICE errors 
     19 */ 
     20error_reporting(E_ALL); 
    1621 
    17 // Enable or disable error reporting 
    18 @ini_set('display_errors', TRUE); 
     22/** 
     23 * Enable or disable error reporting. You should always disable this in production. 
     24 */ 
     25ini_set('display_errors', TRUE); 
    1926 
    20 // Kohana application directory 
     27/** 
     28 * Kohana application directory. This directory must contain a config/ directory. 
     29 */ 
    2130$kohana_application = 'application'; 
    2231 
    23 // Kohana system directory 
     32/** 
     33 * Kohana system directory. This directory must contain the core/ directory. 
     34 */ 
    2435$kohana_system = 'system'; 
     36 
     37/** 
     38 * If you have to rename all of the .php files distributed with Kohana to a 
     39 * different filename, you set the new extension here. Most people will never 
     40 * use this option. 
     41 */ 
     42define('EXT', '.php'); 
    2543 
    2644/* 
     
    2846| PLEASE DO NOT EDIT BELOW THIS LINE, unless you understand the repercussions! 
    2947| ----------------------------------------------------------------------------- 
    30 | User Guide: http://kohanaphp.com/user_guide/general/bootstrapping.html 
     48| User Guide: http://kohanaphp.com/user_guide/en/general/bootstrapping.html 
    3149| ----------------------------------------------------------------------------- 
    3250| $Id$ 
    3351*/ 
    34 // Absolute path names for include purposes 
    35 define('APPPATH', str_replace('\\', '/', realpath($kohana_application)).'/'); unset($kohana_application); 
    36 define('SYSPATH', str_replace('\\', '/', realpath($kohana_system)).'/'); unset($kohana_system); 
    37 // Information about the front controller 
    38 $docroot = str_replace('\\', '/', realpath(__FILE__)); 
    39 define('KOHANA',  pathinfo($docroot, PATHINFO_BASENAME)); 
    40 define('DOCROOT', pathinfo($docroot, PATHINFO_DIRNAME).'/'); 
    41 define('EXT', '.'.pathinfo($docroot, PATHINFO_EXTENSION)); 
    42 unset($docroot); 
    43 // Validate APPPATH 
     52$docroot = pathinfo(str_replace('\\', '/', realpath(__FILE__))); 
     53 
     54define('KOHANA',  $docroot['basename']); 
     55define('DOCROOT', $docroot['dirname'].'/'); 
     56 
     57define('APPPATH', str_replace('\\', '/', realpath($kohana_application)).'/'); 
     58define('SYSPATH', str_replace('\\', '/', realpath($kohana_system)).'/'); 
     59 
     60unset($docroot, $kohana_application, $kohana_system); 
     61 
    4462(is_dir(APPPATH) AND is_dir(APPPATH.'/config')) or die 
    4563( 
     
    4765        'Set a valid <code>$application_path</code> in <kbd>index.php</kbd> and refresh the page.' 
    4866); 
    49 // Validate SYSPATH 
     67 
    5068(is_dir(SYSPATH) AND file_exists(SYSPATH.'/core/'.'Bootstrap'.EXT)) or die 
    5169( 
     
    5371        'Set a valid <code>$kohana_system</code> in <kbd>index.php</kbd> and refresh the page.' 
    5472); 
    55 // Buckle those bootstraps! 
     73 
    5674require_once SYSPATH.'core/Bootstrap'.EXT;