Changeset 11860

Show
Ignore:
Timestamp:
08/30/07 12:44:09 (1 year ago)
Author:
bergie
Message:

Die, GLOBALS, Die! refs #102

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/midcom.core/midcom/baseclasses/components/interface.php

    r11359 r11860  
    361361    function initialize() 
    362362    { 
    363         global $midcom; 
    364  
    365363        // Preparation 
    366         $loader =& $midcom->get_component_loader(); 
     364        $loader =& $_MIDCOM->get_component_loader(); 
    367365        $this->_component_path = MIDCOM_ROOT . $loader->path_to_snippetpath($this->_component); 
    368366        $this->_manifest = $_MIDCOM->componentloader->manifests[$this->_component]; 
     
    371369        foreach ($this->_autoload_libraries as $library) 
    372370        { 
    373             if (! $midcom->load_library($library)) 
     371            if (! $_MIDCOM->load_library($library)) 
    374372            { 
    375                 $midcom->generate_error(MIDCOM_ERRCRIT, "Failed to load library {$library} while initializing {$this->_component}"); 
     373                $_MIDCOM->generate_error(MIDCOM_ERRCRIT, "Failed to load library {$library} while initializing {$this->_component}"); 
    376374                // This will exit. 
    377375            } 
     
    586584    { 
    587585        $data =& $this->_context_data[$contextid]; 
    588         $loader =& $GLOBALS['midcom']->get_component_loader(); 
     586        $loader =& $_MIDCOM->get_component_loader(); 
    589587        $class = $loader->path_to_prefix($this->_component) . '_'; 
    590588        $class .= ($data['adminmode'] ? $this->_ais_class_suffix : $this->_site_class_suffix); 
     
    667665        if (is_null($this->_nap_instance)) 
    668666        { 
    669             $loader =& $GLOBALS['midcom']->get_component_loader(); 
     667            $loader =& $_MIDCOM->get_component_loader(); 
    670668            $class = $loader->path_to_prefix($this->_component) . "_{$this->_nap_class_suffix}"; 
    671669            $this->_nap_instance = new $class(); 
  • trunk/midcom/midcom.core/midcom/baseclasses/components/navigation.php

    r5856 r11860  
    101101        $this->_component_data =& $GLOBALS['midcom_component_data'][$this->_component]; 
    102102 
    103         $this->_i18n =& $GLOBALS['midcom']->get_service('i18n'); 
     103        $this->_i18n =& $_MIDCOM->get_service('i18n'); 
    104104        $this->_l10n =& $this->_i18n->get_l10n($this->_component); 
    105105        $this->_l10n_midcom =& $this->_i18n->get_l10n('midcom'); 
  • trunk/midcom/midcom.core/midcom/baseclasses/components/purecode.php

    r3766 r11860  
    8888    { 
    8989        $this->_component_data =& $GLOBALS['midcom_component_data'][$this->_component]; 
    90         $this->_i18n =& $GLOBALS['midcom']->get_service('i18n'); 
     90        $this->_i18n =& $_MIDCOM->get_service('i18n'); 
    9191        $this->_l10n =& $this->_i18n->get_l10n($this->_component); 
    9292        $this->_l10n_midcom =& $this->_i18n->get_l10n('midcom');