Changeset 2003 for trunk/index.php

Show
Ignore:
Timestamp:
02/08/2008 07:19:05 PM (10 months ago)
Author:
Shadowhand
Message:

Upgrading trunk to be PHP 5.2+ compatible:

  • index.php check upgraded to 5.2
  • All checks for PHP < 5.2 in libraries and helpers removed
  • Removed unnecessary examples
  • Re-organized Bootstrap pre-initialization setup
  • Updated module path handling to define MODPATH in index.php
  • Updated module paths in config.php to use MODPATH for default modules
  • Removed Loader and core.preload configuration setting
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/index.php

    r1631 r2003  
    22/** 
    33 * This file acts as the "front controller" to your application. You can 
    4  * configure your application and system directories here, as well as error 
    5  * reporting and error display. 
     4 * configure your application, modules, and system directories here. 
     5 * PHP error_reporting level may also be changed. 
    66 * 
    77 * @package    Core 
     
    1212 
    1313/** 
    14  * Kohana website application directory. This directory should contain your 
    15  * application configuration, controllers, models, views, and other resources. 
     14 * Website application directory. This directory should contain your application 
     15 * configuration, controllers, models, views, and other resources. 
    1616 * 
    1717 * This path can be absolute or relative to this file. 
     
    2020 
    2121/** 
    22  * Kohana package files. This directory should contain the core/ directory, and 
    23  * the resources you included in your download of Kohana. 
     22 * Kohana modules directory. This directory should contain all the modules used 
     23 * by your application. Modules are enabled and disabled by the application 
     24 * configuration file. 
     25 * 
     26 * This path can be absolute or relative to this file. 
     27 */ 
     28$kohana_modules = 'modules'; 
     29 
     30/** 
     31 * Kohana system directory. This directory should contain the core/ directory, 
     32 * and the resources you included in your download of Kohana. 
    2433 * 
    2534 * This path can be absolute or relative to this file. 
    2635 */ 
    2736$kohana_system = 'system'; 
     37 
    2838 
    2939/** 
     
    5060 * sure that your environment is compatible with Kohana, you can disable this. 
    5161 */ 
    52 version_compare(PHP_VERSION, '5.1.3', '<') and exit('Kohana requires PHP 5.1.3 or newer.'); 
     62version_compare(PHP_VERSION, '5.2', '<') and exit('Kohana requires PHP 5.2 or newer.'); 
    5363 
    5464// 
     
    6474// Define application and system paths 
    6575define('APPPATH', str_replace('\\', '/', realpath($kohana_application)).'/'); 
     76define('MODPATH', str_replace('\\', '/', realpath($kohana_modules)).'/'); 
    6677define('SYSPATH', str_replace('\\', '/', realpath($kohana_system)).'/'); 
    6778 
    6879// Clean up 
    69 unset($kohana_application, $kohana_system); 
     80unset($kohana_application, $kohana_modules, $kohana_system); 
    7081 
    7182(is_dir(APPPATH) AND is_dir(APPPATH.'/config')) or die