Show
Ignore:
Timestamp:
05/25/06 02:58:10 (6 years ago)
Author:
john
Message:

Major changes to environment added boot.php and Trax class to hold framwork config

Location:
trunk/trax/vendor/trax/action_view
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/trax/vendor/trax/action_view/helpers.php

    r199 r201  
    5757     *  Current controller object 
    5858     * 
    59      *  Local copy of $GLOBALS['current_controller_object']<br /> 
     59     *  Local copy of Trax::$current_controller_object<br /> 
    6060     *  <b>NB:</b> {@link object()} faults if this does not contain a 
    6161     *  valid instance of ActionController. 
     
    6767     *  Current controller name 
    6868     * 
    69      *  Local copy of $GLOBALS['current_controller_name'] 
     69     *  Local copy of Trax::$current_controller_name 
    7070     *  @var string 
    7171     */ 
     
    7575     *  Current controller path 
    7676     * 
    77      *  Local copy of $GLOBALS['current_controller_path'] 
     77     *  Local copy of Trax::$current_controller_path 
    7878     *  @var string 
    7979     */ 
     
    105105        //  Copy controller information from $GLOBALS 
    106106        $this->controller_name = 
    107             (array_key_exists('current_controller_name',$GLOBALS) 
    108              && $GLOBALS['current_controller_name']) 
    109             ? $GLOBALS['current_controller_name'] : null; 
     107            !is_null(Trax::$current_controller_name)            
     108            ? Trax::$current_controller_name : null; 
    110109        $this->controller_path = 
    111             (array_key_exists('current_controller_path', $GLOBALS) 
    112              && $GLOBALS['current_controller_path']) 
    113             ? $GLOBALS['current_controller_path'] : null; 
     110            !is_null(Trax::$current_controller_path) 
     111            ? Trax::$current_controller_path : null; 
    114112        $this->controller_object = 
    115             (array_key_exists('current_controller_object', $GLOBALS) 
    116              && $GLOBALS['current_controller_object']) 
    117             ? $GLOBALS['current_controller_object'] : null; 
     113            (!is_null(Trax::$current_controller_object)  
     114            && is_object(Trax::$current_controller_object)) 
     115            ? Trax::$current_controller_object : null; 
    118116        if($auto_index) { 
    119117            $object = $this->object(); 
  • trunk/trax/vendor/trax/action_view/helpers/asset_tag_helper.php

    r199 r201  
    8282 
    8383            //  If TRAX_URL_PREFIX non-null, prefix it to path 
    84             if(!is_null(TRAX_URL_PREFIX)) { 
    85                 $prefix = TRAX_URL_PREFIX; 
     84            if(!is_null(Trax::$url_prefix)) { 
     85                $prefix = Trax::$url_prefix; 
    8686                if($prefix{0} != "/") { 
    8787                    $prefix = "/$prefix"; 
     
    150150                                           $sources);     
    151151                }                   
    152                 if(file_exists(TRAX_PUBLIC. "/javascripts/application.js")) { 
     152                if(file_exists(Trax::$public_path. "/javascripts/application.js")) { 
    153153                    $sources[] = 'application'; 
    154154                } 
     
    331331    $asset_helper = new AssetTagHelper(); 
    332332    $args = func_get_args(); 
    333     return call_user_func_array(array($asset_helper, 
    334                                       'auto_discovery_link_tag'), $args); 
     333    return call_user_func_array(array($asset_helper, 'auto_discovery_link_tag'), $args); 
    335334} 
    336335 
     
    352351    $asset_helper = new AssetTagHelper(); 
    353352    $args = func_get_args(); 
    354     return call_user_func_array(array($asset_helper, 
    355                                       'stylesheet_link_tag'), $args); 
     353    return call_user_func_array(array($asset_helper, 'stylesheet_link_tag'), $args); 
    356354} 
    357355 
     
    363361    $asset_helper = new AssetTagHelper(); 
    364362    $args = func_get_args(); 
    365     return call_user_func_array(array($asset_helper, 
    366                                       'javascript_include_tag'), $args); 
     363    return call_user_func_array(array($asset_helper, 'javascript_include_tag'), $args); 
    367364} 
    368365