Changeset 11907

Show
Ignore:
Timestamp:
08/30/07 19:32:15 (1 year ago)
Author:
netblade
Message:

$_GLOBALSmidcom? and $GLOBALSmidcom? --> $_MIDCOM, refs #102

Files:

Legend:

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

    r3766 r11907  
    164164    { 
    165165        // Load the datamanager, then create an instance. 
    166         $GLOBALS['midcom']->load_library('midcom.helper.datamanager'); 
     166        $_MIDCOM->load_library('midcom.helper.datamanager'); 
    167167        $data['datamanager'] = new midcom_helper_datamanager($this->_handler['schemadb']); 
    168168 
    169169        if ($data['datamanager'] == false) 
    170170        { 
    171             $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 'Failed to instantinate configuration datamanager.'); 
     171            $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 'Failed to instantinate configuration datamanager.'); 
    172172            // This will exit. 
    173173        } 
     
    180180            debug_add('Failed to initialize the datamanager.', MIDCOM_LOG_CRIT); 
    181181            debug_print_r('Topic object we tried was:', $this->_config_topic); 
    182             $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 'Failed to initialize configuration datamanager.'); 
     182            $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 'Failed to initialize configuration datamanager.'); 
    183183            // This will exit. 
    184184        } 
  • trunk/midcom/midcom.core/midcom/exec/config-test.php

    r6121 r11907  
    147147 
    148148// Some helpers 
    149 $i18n =& $GLOBALS['midcom']->get_service('i18n'); 
     149$i18n =& $_MIDCOM->get_service('i18n'); 
    150150 
    151151$version = phpversion(); 
  • trunk/midcom/midcom.core/midcom/exec/convert_legacy_metadata.php

    r3766 r11907  
    2323if (! $midgard->admin) 
    2424{ 
    25     $GLOBALS['midcom']->generate_error(MIDCOM_ERRAUTH, "This script requires admin privileges to run."); 
     25    $_MIDCOM->generate_error(MIDCOM_ERRAUTH, "This script requires admin privileges to run."); 
    2626    // This will exit. 
    2727} 
     
    342342    { 
    343343        echo "</pre>\n"; 
    344         $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, "Failed to list the child nodes of {$nodeid}. Aborting."); 
     344        $_MIDCOM->generate_error(MIDCOM_ERRCRIT, "Failed to list the child nodes of {$nodeid}. Aborting."); 
    345345    }  
    346346    $nodes = array_merge($nodes, $childs); 
     
    352352echo "\n\nData Conversion complete.\n\n"; 
    353353echo "\n\nInvalidating the Content Cache...\n\n"; 
    354 $GLOBALS['midcom']->cache->invalidate_all(); 
     354$_MIDCOM->cache->invalidate_all(); 
    355355echo '</pre>'; 
    356356 
  • trunk/midcom/midcom.core/midcom/exec/index-legacy-attachments.php

    r11359 r11907  
    3333if (! $midgard->admin) 
    3434{ 
    35     $GLOBALS['midcom']->generate_error(MIDCOM_ERRAUTH, 'This script requires admin privileges to run.'); 
     35    $_MIDCOM->generate_error(MIDCOM_ERRAUTH, 'This script requires admin privileges to run.'); 
    3636    // This will exit. 
    3737} 
     
    3939if ($GLOBALS['midcom_config']['indexer_backend'] === false) 
    4040{ 
    41     $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 'No indexer backend has been defined. Aborting.'); 
     41    $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 'No indexer backend has been defined. Aborting.'); 
    4242} 
    4343 
     
    8989$nodes = Array(); 
    9090$nodeid = $nap->get_root_node(); 
    91 $indexer =& $GLOBALS['midcom']->get_service('indexer'); 
     91$indexer =& $_MIDCOM->get_service('indexer'); 
    9292 
    9393while (! is_null($nodeid)) 
     
    112112            { 
    113113                debug_pop(); 
    114                 $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, "Failed to list the leaves of {$nodeid}. Aborting."); 
     114                $_MIDCOM->generate_error(MIDCOM_ERRCRIT, "Failed to list the leaves of {$nodeid}. Aborting."); 
    115115            } 
    116116            foreach($leaves as $leafid) 
     
    136136    { 
    137137        debug_pop(); 
    138         $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, "Failed to list the child nodes of {$nodeid}. Aborting."); 
     138        $_MIDCOM->generate_error(MIDCOM_ERRCRIT, "Failed to list the child nodes of {$nodeid}. Aborting."); 
    139139    } 
    140140    $nodes = array_merge($nodes, $childs); 
  • trunk/midcom/midcom.core/midcom/helper/configuration.php

    r11900 r11907  
    104104        else 
    105105        { 
    106             $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 'midcom_helper_configuration: Default constructor not allowed.'); 
     106            $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 'midcom_helper_configuration: Default constructor not allowed.'); 
    107107        } 
    108108    } 
  • trunk/midcom/midcom.core/midcom/helper/itemlist.php

    r3789 r11907  
    127127      $sortclass->_init($_basicnav, $parent_topic); 
    128128     } else { 
    129       $GLOBALS['midcom']->generate_error("Tried to load sorting helper class for order {$sorting}, but the class was undefined.", MIDCOM_LOG_WARN);       
     129      $_MIDCOM->generate_error("Tried to load sorting helper class for order {$sorting}, but the class was undefined.", MIDCOM_LOG_WARN);       
    130130     }  
    131131   
  • trunk/midcom/midcom.core/midcom/helper/itemlist/articlesfirst.php

    r3766 r11907  
    2323        if ($nodes_list === false) 
    2424        { 
    25             $GLOBALS['midcom']->generate_error(MIDCOM_LOG_ERROR, 
     25            $_MIDCOM->generate_error(MIDCOM_LOG_ERROR, 
    2626                "Could not retrieve the subnode listing, this is fatal."); 
    2727            // This will exit. 
     
    3131        if ($leaves_list === false) 
    3232        { 
    33             $GLOBALS['midcom']->generate_error(MIDCOM_LOG_ERROR, 
     33            $_MIDCOM->generate_error(MIDCOM_LOG_ERROR, 
    3434                "Could not retrieve the leaf listing, this is fatal."); 
    3535            // This will exit. 
  • trunk/midcom/midcom.core/midcom/helper/itemlist/score.php

    r1068 r11907  
    4444        if (! usort($result, array ("midcom_helper_itemlist_score", "sort_cmp") ) ) 
    4545        { 
    46             $GLOBALS['midcom']->generate_error("ARG");  
     46            $_MIDCOM->generate_error("ARG");  
    4747        } 
    4848        return $result; 
  • trunk/midcom/midcom.core/midcom/helper/itemlist/topicsfirst.php

    r3766 r11907  
    2323        if ($nodes_list === false) 
    2424        { 
    25             $GLOBALS['midcom']->generate_error(MIDCOM_LOG_ERROR, 
     25            $_MIDCOM->generate_error(MIDCOM_LOG_ERROR, 
    2626                "Could not retrieve the subnode listing, this is fatal."); 
    2727            // This will exit. 
     
    3131        if ($leaves_list === false) 
    3232        { 
    33             $GLOBALS['midcom']->generate_error(MIDCOM_LOG_ERROR, 
     33            $_MIDCOM->generate_error(MIDCOM_LOG_ERROR, 
    3434                "Could not retrieve the leaf listing, this is fatal."); 
    3535            // This will exit. 
  • trunk/midcom/midcom.core/midcom/helper/mailtemplate.php

    r11359 r11907  
    247247        $this->_body = ""; 
    248248        $this->_parsed = false; 
    249         $this->_i18n =& $GLOBALS['midcom']->get_service('i18n'); 
     249        $this->_i18n =& $_MIDCOM->get_service('i18n'); 
    250250 
    251251        $this->_mail_mime = new Mail_mime("\n"); 
  • trunk/midcom/midcom.core/midcom/helper/toolbar.php

    r11370 r11907  
    452452        if ($index == 0) 
    453453        { 
    454             $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 
     454            $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 
    455455                'Cannot move the top element upwards.'); 
    456456            // This will exit() 
     
    473473        if ($index == (count($this->items) - 1)) 
    474474        { 
    475             $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 
     475            $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 
    476476                'Cannot move the bottom element downwards.'); 
    477477            // This will exit() 
     
    564564            debug_add("toolbar:update_item_url: We have an relative URL, transformig it..."); 
    565565            $this->items[$index][MIDCOM_TOOLBAR_URL] = 
    566                   $GLOBALS['midcom']->get_context_data(MIDCOM_CONTEXT_ANCHORPREFIX) 
     566                  $_MIDCOM->get_context_data(MIDCOM_CONTEXT_ANCHORPREFIX) 
    567567                . $url; 
    568568        } 
  • trunk/midcom/midcom.core/midcom/services/_i18n_l10n.php

    r11197 r11907  
    205205            if (! $file) 
    206206            { 
    207                 $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 
     207                $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 
    208208                    "Failed to open the file '{$this->_library_filename}.{$lang}.txt' for writing."); 
    209209                // This will exit() 
     
    275275                    { 
    276276                        $line++; // Array is 0-indexed 
    277                         $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 
     277                        $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 
    278278                            "L10n DB SYNTAX ERROR: An incorrect command was detected at {$filename}:{$line}"); 
    279279                        // This will exit 
     
    300300                            { 
    301301                                $line++; // Array is 0-indexed 
    302                                 $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 
     302                                $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 
    303303                                    "L10n DB SYNTAX ERROR: A second VERSION tag has been detected at {$filename}:{$line}"); 
    304304                                // This will exit 
     
    311311                            { 
    312312                                $line++; // Array is 0-indexed 
    313                                 $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 
     313                                $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 
    314314                                    "L10n DB SYNTAX ERROR: A second LANGUAGE tag has been detected at {$filename}:{$line}"); 
    315315                                // This will exit 
     
    326326                        default: 
    327327                            $line++; // Array is 0-indexed 
    328                             $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 
     328                            $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 
    329329                                "L10n DB SYNTAX ERROR: Unknown command '{$command}' at {$filename}:{$line}"); 
    330330                            // This will exit 
     
    334334                { 
    335335                    $line++; // Array is 0-indexed 
    336                     $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 
     336                    $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 
    337337                        "L10n DB SYNTAX ERROR: Invalid line at {$filename}:{$line}"); 
    338338                    // This will exit 
     
    363363        if ($instring) 
    364364        { 
    365             $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 
     365            $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 
    366366                "L10n DB SYNTAX ERROR: String constant exceeds end of file."); 
    367367            // This will exit 
     
    369369        if (version_compare($version, $this->_version, "<")) 
    370370        { 
    371             $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 
     371            $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 
    372372                "L10n DB ERROR: File format version of $filename is too old, no update available at the moment."); 
    373373            // This will exit 
     
    375375        if ($lang != $language) 
    376376        { 
    377             $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 
     377            $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 
    378378                "L10n DB ERROR: The DB language version {$language} did not match the requested {$lang}."); 
    379379            // This will exit 
  • trunk/midcom/midcom.core/midcom/services/cache/backend/dba.php

    r4575 r11907  
    111111            if ($handle === false) 
    112112            { 
    113                 $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 
     113                $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 
    114114                    "dba cache handler: Failed to open the database {$this->_filename} for creation."); 
    115115                // This will exit. 
     
    143143        if ($handle === false) 
    144144        { 
    145             $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 
     145            $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 
    146146                "dba cache handler: Failed to open the database {$this->_filename} (Write-mode: {$write}): {$php_errormsg}"); 
    147147            // This will exit. 
     
    166166        if (! $this->_exists($key)) 
    167167        { 
    168             $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 
     168            $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 
    169169                "dba cache handler: Failed to read key {$key} from the database {$this->_filename}: The key does not exist."); 
    170170            // This will exit. 
     
    174174        { 
    175175            // Note: Appearantly not php error here, so no php_errormsg as well. 
    176             $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 
     176            $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 
    177177                "dba cache handler: Failed to read key {$key} from the database {$this->_filename}: {$php_errormsg}"); 
    178178            // This will exit. 
     
    185185        if (! @dba_replace($key, $data, $this->_handle)) 
    186186        { 
    187             $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 
     187            $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 
    188188                "dba cache handler: Failed to write key {$key} to the database {$this->_filename}: {$php_errormsg}"); 
    189189            // This will exit. 
     
    200200        if (! @dba_delete($key, $this->_handle)) 
    201201        { 
    202             $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 
     202            $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 
    203203                "dba cache handler: Failed to remove key {$key} from the database {$this->_filename}: {$php_errormsg}"); 
    204204            // This will exit. 
     
    212212        if ($handle === false) 
    213213        { 
    214             $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 
     214            $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 
    215215                "dba cache handler: Failed to truncate the database {$this->_filename}: {$php_errormsg}"); 
    216216            // This will exit. 
  • trunk/midcom/midcom.core/midcom/services/cache/backend/flatfile.php

    r6136 r11907  
    6161        if (! $this->exists($key)) 
    6262        { 
    63             $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 
     63            $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 
    6464                "flatfile cache handler: Failed to read key {$key} from the database {$this->_dirname}: File does not exist."); 
    6565            // This will exit. 
     
    7878        if ($handle === false) 
    7979        { 
    80             $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 
     80            $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 
    8181                "flatfile cache handler: Failed to create key {$key} in the database {$this->_dirname}: File does already exist."); 
    8282            // This will exit. 
  • trunk/midcom/midcom.core/midcom/services/cache/module.php

    r3766 r11907  
    102102        if (array_key_exists($name, $this->_backends)) 
    103103        { 
    104             $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 
     104            $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 
    105105                "Cannot create backend driver instance {$name}: A backend with this name does already exist."); 
    106106            // This will exit. 
     
    109109        if (! array_key_exists('driver', $config)) 
    110110        { 
    111             $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 
     111            $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 
    112112                "Cannot create backend driver instance {$name}: The driver class is not specified in the configuration."); 
    113113            // This will exit. 
     
    119119        if (! class_exists($classname)) 
    120120        { 
    121             $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 
     121            $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 
    122122                "Cannot create backend driver instance {$name}: The class {$classname} was not found in the file {$filename}."); 
    123123            // This will exit. 
  • trunk/midcom/midcom.core/midcom/services/indexer/backend/XMLCommClient.php

    r3766 r11907  
    489489        { 
    490490            $msg = "The MidCOM Indexer failed critically:\n{$this->_current_data}"; 
    491             // $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, $msg); 
     491            // $_MIDCOM->generate_error(MIDCOM_ERRCRIT, $msg); 
    492492            // This will exit. 
    493493            debug_add($msg, MIDCOM_LOG_ERROR); 
     
    511511        { 
    512512            $msg = "The XML Parser failed crticially:\n" . $result->toString(); 
    513             // $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, $msg); 
     513            // $_MIDCOM->generate_error(MIDCOM_ERRCRIT, $msg); 
    514514            // This will exit. 
    515515            debug_add($msg, MIDCOM_LOG_ERROR); 
  • trunk/midcom/midcom.core/midcom/services/indexer/backend/xmlshell.php

    r3766 r11907  
    156156            debug_print_r('Global config was:', $GLOBALS['midcom_config']); 
    157157            debug_pop(); 
    158             $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 'Failed to execute the indexer process.'); 
     158            $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 'Failed to execute the indexer process.'); 
    159159            // This will exit. 
    160160        } 
     
    257257        { 
    258258            debug_pop(); 
    259             $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT,  
     259            $_MIDCOM->generate_error(MIDCOM_ERRCRIT,  
    260260                "The xmlshell indexer executable returned {$return}, this is critical. Check the Debug Log.");  
    261261            // This will exit. 
  • trunk/midcom/midcom.core/midcom/services/indexer/document.php

    r11359 r11907  
    267267    function midcom_services_indexer_document() 
    268268    { 
    269         $this->_i18n =& $GLOBALS['midcom']->get_service('i18n'); 
     269        $this->_i18n =& $_MIDCOM->get_service('i18n'); 
    270270    } 
    271271 
  • trunk/midcom/midcom.core/midcom/services/indexer/document/datamanager.php

    r3766 r11907  
    225225                default: 
    226226                    debug_pop(); 
    227                     $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT,  
     227                    $_MIDCOM->generate_error(MIDCOM_ERRCRIT,  
    228228                        "Datamanager Indexer Document: Unknown indexing method {$field['index_method']} for field {$name} discovered, aborting."); 
    229229                    // This will exit. 
  • trunk/midcom/midcom.core/midcom/services/indexer/filter/date.php

    r3766 r11907  
    5555        if ($start == 0 && $end == 0) 
    5656        { 
    57             $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 'Both start and end of a datefilter must not be 0.'); 
     57            $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 'Both start and end of a datefilter must not be 0.'); 
    5858            // This will exit. 
    5959        } 
  • trunk/midcom/midcom.core/midcom/services/rcs/tests/test_backend_rcs.php

    r5528 r11907  
    3737    { 
    3838        $_MIDCOM = new MockMidCOM();         
    39         $GLOBALS['midcom'] = &$_MIDCOM; 
     39        $_MIDCOM = &$_MIDCOM; 
    4040        $this->midcom = &$_MIDCOM; 
    4141         
  • trunk/midcom/midcom.core/midcom/services/rcs/tests/test_rcs.php

    r3887 r11907  
    3131    { 
    3232        $_MIDCOM = new MockMidCOM();         
    33         $GLOBALS['midcom'] = &$_MIDCOM; 
     33        $_MIDCOM = &$_MIDCOM; 
    3434        $this->midcom = &$_MIDCOM; 
    3535         
     
    7272        $this->basicSetUp(); 
    7373        $_MIDCOM = new MockMidCOM();         
    74         $GLOBALS['midcom'] = &$_MIDCOM; 
     74        $_MIDCOM = &$_MIDCOM; 
    7575         
    7676    } 
  • trunk/midcom/midcom.helper.datamanager/datamanager.php

    r11370 r11907  
    561561        $this->_ourlock = null; 
    562562 
    563         $i18n =& $GLOBALS["midcom"]->get_service("i18n"); 
     563        $i18n =& $_MIDCOM->get_service("i18n"); 
    564564        $this->_l10n = $i18n->get_l10n("midcom.helper.datamanager"); 
    565565        $this->_l10n_midcom = $i18n->get_l10n("midcom"); 
     
    721721        else 
    722722        { 
    723             $comp = $GLOBALS['midcom']->get_context_data(MIDCOM_CONTEXT_COMPONENT); 
    724         } 
    725  
    726         $i18n =& $GLOBALS['midcom']->get_service('i18n'); 
     723            $comp = $_MIDCOM->get_context_data(MIDCOM_CONTEXT_COMPONENT); 
     724        } 
     725 
     726        $i18n =& $_MIDCOM->get_service('i18n'); 
    727727        $this->_l10n_schema = $i18n->get_l10n($comp); 
    728728 
     
    10311031                $nav = new midcom_helper_nav(); 
    10321032                $node = $nav->get_node($nav->get_current_node()); 
    1033                 $GLOBALS['midcom']->cache->invalidate($node[MIDCOM_NAV_GUID]); 
     1033                $_MIDCOM->cache->invalidate($node[MIDCOM_NAV_GUID]); 
    10341034 
    10351035                /* Ok, we do now have a storage object to work with. Note, that 
     
    11321132            { 
    11331133                $this->_update_nemein_rcs(); 
    1134                 $GLOBALS["midcom"]->cache->invalidate($this->_storage->guid()); 
     1134                $_MIDCOM->cache->invalidate($this->_storage->guid()); 
    11351135                debug_add("Invalidated Midcom Cache."); 
    11361136            } 
     
    12771277        debug_push ("midcom_helper_datamanager::display_form"); 
    12781278 
    1279         $i18n =& $GLOBALS["midcom"]->get_service("i18n"); 
     1279        $i18n =& $_MIDCOM->get_service("i18n"); 
    12801280        $l10n_midcom = $i18n->get_l10n("midcom"); 
    12811281 
     
    13171317            $can_break = false; 
    13181318 
    1319             $midgard = $GLOBALS["midcom"]->get_midgard(); 
     1319            $midgard = $_MIDCOM->get_midgard(); 
    13201320            $user = mgd_get_person($midgard->user); 
    13211321 
     
    17651765        { 
    17661766            debug_print_type("Got this type as layout database:", $source); 
    1767             $GLOBALS['midcom']->generate_error(MIDCOM_ERRCRIT, 'Layout database was not found, aborting.'); 
     1767            $_MIDCOM->generate_error(MIDCOM_ERRCRIT, 'Layout database was not found, aborting.'); 
    17681768            // this will exit() 
    17691769        } 
     
    19731973        } 
    19741974 
    1975         $midgard = $GLOBALS["midcom"]->get_midgard(); 
     1975        $midgard = $_MIDCOM->get_midgard(); 
    19761976        $user = mgd_get_person($midgard->user); 
    19771977 
     
    19881988            $locker = mgd_get_person($lock["user"]); 
    19891989            if (! $locker) 
    1990                 $GLOBALS["MIDCOM"]->generate_error("CRITICAL FAILURE: Locker person record does not exist: " 
     1990                $_MIDCOM->generate_error("CRITICAL FAILURE: Locker person record does not exist: " 
    19911991                                                   . mgd_errstr(), MIDCOM_ERRCRIT); 
    19921992            $this->_lock["user_name"] = $locker->name; 
     
    21212121        } 
    21222122 
    2123         $midgard = $GLOBALS["midcom"]->get_midgard(); 
     2123        $midgard = $_MIDCOM->get_midgard(); 
    21242124        $user = mgd_get_person($midgard->user); 
    21252125        if ($midgard->admin) { 
  • trunk/midcom/midcom.helper.datamanager/datatype_blob.php

    r1866 r11907  
    2323        if (!array_key_exists("datatype_blob_anchorprefix", $field))  
    2424        { 
    25             $midgard = $GLOBALS["midcom"]->get_midgard(); 
     25            $midgard = $_MIDCOM->get_midgard(); 
    2626            $field["datatype_blob_anchorprefix"] = $midgard->self; 
    2727        } 
     
    292292        if ($this->_field['datatype_blob_autoindex']) 
    293293        { 
    294             $indexer =& $GLOBALS['midcom']->get_service('indexer'); 
     294            $indexer =& $_MIDCOM->get_service('indexer'); 
    295295            $indexer->delete($guid); 
    296296        } 
     
    453453        { 
    454454            $document = new midcom_services_indexer_document_attachment($this->_value["object"], $this->_storage); 
    455             $indexer =& $GLOBALS['midcom']->get_service('indexer'); 
     455            $indexer =& $_MIDCOM->get_service('indexer'); 
    456456            $indexer->index($document); 
    457457        } 
  • trunk/midcom/midcom.helper.datamanager/datatype_communityhtml.php

    r2467 r11907  
    5656        $result = strip_tags(trim($this->_value)); 
    5757 
    58         $midgard = $GLOBALS["midcom"]->get_midgard(); 
     58        $midgard = $_MIDCOM->get_midgard(); 
    5959 
    6060        foreach ($this->_smileys as $tag => $url) 
  • trunk/midcom/midcom.helper.datamanager/datatype_mailtemplate.php

    r1080 r11907  
    1919        $field["widget"] = "mailtemplate"; 
    2020        $this->_data = $this->get_empty_value(); 
    21         $this->_i18n =& $GLOBALS['midcom']->get_service('i18n'); 
     21        $this->_i18n =& $_MIDCOM->get_service('i18n'); 
    2222                 
    2323        parent::_constructor ($datamanager, $storage, $field);         
     
    7171    function get_empty_value()  
    7272    { 
    73         $i18n =& $GLOBALS['midcom']->get_service('i18n'); 
     73        $i18n =& $_MIDCOM->get_service('i18n'); 
    7474        return Array( 
    7575            "from" => "", 
     
    122122    function _convert_to_site_charset($data)  
    123123    { 
    124         $i18n =& $GLOBALS["midcom"]->get_service("i18n"); 
     124        $i18n =& $_MIDCOM->get_service("i18n"); 
    125125        $dest = $i18n->get_current_charset(); 
    126126        $source = $this->_data["charset"]; 
     
    131131    function _convert_to_data_charset($data)  
    132132    { 
    133         $i18n =& $GLOBALS["midcom"]->get_service("i18n"); 
     133        $i18n =& $_MIDCOM->get_service("i18n"); 
    134134        $source = $i18n->get_current_charset(); 
    135135        $dest = $this->_data["charset"]; 
  • trunk/midcom/midcom.helper.datamanager/helpers_select_lists.php

    r3038 r11907  
    8484function midcom_helper_datamanager_selectlist_allgroups()  
    8585{ 
    86     $midgard = $GLOBALS["midcom"]->get_midgard(); 
    87     $i18n =& $GLOBALS["midcom"]->get_service("i18n"); 
     86