Changeset 9245

Show
Ignore:
Timestamp:
08/13/08 22:31:12 (4 months ago)
Author:
afz
Message:

Update core classes with new changes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/jaws/html/include/Jaws/Gadget.php

    r9244 r9245  
    318318        // is an empty action? 
    319319        if (empty($this->_Action) || $this->_Action == 'DefaultAction') { 
    320             $this->_Action = $GLOBALS['app']->Registry->Get('default_action', $this->_Name, JAWS_REGISTRY_GADGET); 
     320            $this->_Action = $GLOBALS['app']->Registry->Get('default_action', $this->_Name); 
    321321            if (empty($this->_Action)) { 
    322322                $this->_Action = 'DefaultAction'; 
     
    407407                if (file_exists($file)) { 
    408408                    $GLOBALS['app']->Registry->LoadFile($plugin, 'plugins'); 
    409                     $use_in = $GLOBALS['app']->Registry->Get('use_in', $plugin, JAWS_REGISTRY_PLUGIN); 
     409                    $use_in = $GLOBALS['app']->Registry->Get('use_in', $plugin); 
    410410                    if (!Jaws_Error::isError($use_in) && ($use_in == '*' || in_array($gadget, explode(',', $use_in)))) { 
    411411                        if (!isset($GLOBALS['plugins'][$plugin]['obj'])) { 
     
    450450        // Check if gadget is enabled 
    451451        ///FIXME check for errors 
    452         if ($GLOBALS['app']->Registry->Get('enabled', $gadget, JAWS_REGISTRY_GADGET) != 'true') { 
     452        if ($GLOBALS['app']->Registry->Get('enabled', $gadget) != 'true') { 
    453453            Jaws_Error::Fatal('Gadget is not enabled', __FILE__, __LINE__); 
    454454        } 
     
    482482 
    483483        if ( 
    484             $GLOBALS['app']->Registry->Get('enabled', $gadget, JAWS_REGISTRY_GADGET) == 'true' && 
     484            $GLOBALS['app']->Registry->Get('enabled', $gadget) == 'true' && 
    485485            $GLOBALS['app']->Registry->Get('main_gadget') != $gadget 
    486486        ) { 
    487             $GLOBALS['app']->Registry->Set('enabled', 'false', $gadget, JAWS_REGISTRY_GADGET); 
     487            $GLOBALS['app']->Registry->Set('enabled', 'false', $gadget); 
    488488        } 
    489489        $GLOBALS['app']->Registry->Commit('core'); //Commit all changes to core 
     
    528528        $model->UninstallACLs(); 
    529529 
    530         $GLOBALS['app']->Registry->DeleteKey('enabled',  $gadget, JAWS_REGISTRY_GADGET); 
    531         $GLOBALS['app']->Registry->DeleteKey('version',  $gadget, JAWS_REGISTRY_GADGET); 
    532         $GLOBALS['app']->Registry->DeleteKey('requires', $gadget, JAWS_REGISTRY_GADGET); 
     530        $GLOBALS['app']->Registry->DeleteKey('enabled',  $gadget); 
     531        $GLOBALS['app']->Registry->DeleteKey('version',  $gadget); 
     532        $GLOBALS['app']->Registry->DeleteKey('requires', $gadget); 
    533533        $GLOBALS['app']->Registry->Commit($gadget); //Commit all changes 
    534534        $GLOBALS['app']->Registry->Commit('core'); //Commit all changes to core 
     
    647647        } 
    648648 
    649         $currentVersion = $GLOBALS['app']->Registry->Get('version', $gadget, JAWS_REGISTRY_GADGET); 
     649        $currentVersion = $GLOBALS['app']->Registry->Get('version', $gadget); 
    650650        $newVersion     = $info->GetVersion(); 
    651651 
     
    696696        if (is_string($instance)) { 
    697697            //Instance has the new version number 
    698             $GLOBALS['app']->Registry->Set('version', $instance, $gadget, JAWS_REGISTRY_GADGET); 
     698            $GLOBALS['app']->Registry->Set('version', $instance, $gadget); 
    699699        } else { 
    700700            //Use the latest (current) version 
    701             $GLOBALS['app']->Registry->Set('version', $newVersion, $gadget, JAWS_REGISTRY_GADGET); 
     701            $GLOBALS['app']->Registry->Set('version', $newVersion, $gadget); 
    702702        } 
    703703 
     
    742742        $core = $info->GetAttribute('core_gadget'); 
    743743 
    744         $status = $GLOBALS['app']->Registry->Get('enabled', $gadget, JAWS_REGISTRY_GADGET); 
     744        $status = $GLOBALS['app']->Registry->Get('enabled', $gadget); 
    745745        if ($status !== null) { 
    746             $GLOBALS['app']->Registry->Set('enabled', 'true', $gadget, JAWS_REGISTRY_GADGET); 
     746            $GLOBALS['app']->Registry->Set('enabled', 'true', $gadget); 
    747747        } else { 
    748748            //This can fail if user doesn't name the gadget model as: $gadgetAdminModel 
     
    763763            // Applying the keys that every gadget gets 
    764764            $requires = implode($req, ', '); 
    765             $GLOBALS['app']->Registry->NewKeyEx(array('enabled', 'true', $gadget, JAWS_REGISTRY_GADGET), 
    766                                                 array('version', $info->GetVersion(), $gadget, JAWS_REGISTRY_GADGET), 
    767                                                 array('requires', $requires, $gadget, JAWS_REGISTRY_GADGET)); 
     765            $GLOBALS['app']->Registry->NewKeyEx(array('enabled', 'true', $gadget), 
     766                                                array('version', $info->GetVersion(), $gadget), 
     767                                                array('requires', $requires, $gadget)); 
    768768            // ACL keys 
    769769            $model->InstallACLs(); 
     
    829829        $items.= $GLOBALS['app']->Registry->Get('enabled_core_gadgets'); 
    830830        if (is_dir(JAWS_PATH . 'gadgets/' . $gadget) && 
    831             $GLOBALS['app']->Registry->Get('enabled', $gadget, JAWS_REGISTRY_GADGET) == 'true' && 
     831            $GLOBALS['app']->Registry->Get('enabled', $gadget) == 'true' && 
    832832            in_array($gadget, explode(',', $items))) 
    833833        { 
     
    854854                } 
    855855 
    856                 $current_version = $GLOBALS['app']->Registry->Get('version', $gadget, JAWS_REGISTRY_GADGET); 
     856                $current_version = $GLOBALS['app']->Registry->Get('version', $gadget); 
    857857                $gadget_version  = $info->GetVersion();; 
    858858 
  • trunk/jaws/html/include/Jaws/Layout.php

    r9235 r9245  
    488488    function PutGadget($gadget, $action, $section, $requested = false) 
    489489    { 
    490         $enabled = $GLOBALS['app']->Registry->Get('enabled', $gadget, JAWS_REGISTRY_GADGET); 
     490        $enabled = $GLOBALS['app']->Registry->Get('enabled', $gadget); 
    491491        if (Jaws_Error::isError($enabled)) { 
    492492            $enabled = 'false'; 
  • trunk/jaws/html/include/Jaws/Plugin.php

    r9244 r9245  
    184184        } 
    185185 
    186         if (!$GLOBALS['app']->Registry->NewKey('enabled', 'true', $plugin, JAWS_REGISTRY_PLUGIN) || 
    187             !$GLOBALS['app']->Registry->NewKey('use_in', '*',  $plugin, JAWS_REGISTRY_PLUGIN)) 
     186        if (!$GLOBALS['app']->Registry->NewKey('enabled', 'true', $plugin) || 
     187            !$GLOBALS['app']->Registry->NewKey('use_in', '*',  $plugin)) 
    188188        { 
    189189            return new Jaws_Error(_t('JMS_PLUGINS_ENABLED_FAILURE', $plugin), $plugin); 
     
    267267 
    268268        $GLOBALS['app']->Registry->Set('enabled_plugins', $new); 
    269         $GLOBALS['app']->Registry->DeleteKey('enabled', $plugin, JAWS_REGISTRY_PLUGIN); 
    270         $GLOBALS['app']->Registry->DeleteKey('use_in',  $plugin, JAWS_REGISTRY_PLUGIN); 
     269        $GLOBALS['app']->Registry->DeleteKey('enabled', $plugin); 
     270        $GLOBALS['app']->Registry->DeleteKey('use_in',  $plugin); 
    271271 
    272272        require_once $file; 
  • trunk/jaws/html/include/Jaws/Widgets/TextArea.php

    r9235 r9245  
    200200            $file   = JAWS_PATH . 'plugins/' . $plugin . '/' . $plugin . '.php'; 
    201201            $GLOBALS['app']->Registry->LoadFile($plugin, 'plugins'); 
    202             $use_in = $GLOBALS['app']->Registry->Get('use_in', $plugin, JAWS_REGISTRY_PLUGIN); 
     202            $use_in = $GLOBALS['app']->Registry->Get('use_in', $plugin); 
    203203            if (file_exists($file) && (in_array($this->_Gadget, explode(',', $use_in)) || $use_in == '*')) { 
    204204                require_once $file; 
  • trunk/jaws/html/include/Jaws/Widgets/TinyMCE.php

    r9235 r9245  
    158158            $file   = JAWS_PATH . 'plugins/' . $plugin . '/' . $plugin . '.php'; 
    159159            $GLOBALS['app']->Registry->LoadFile($plugin, 'plugins'); 
    160             $use_in = $GLOBALS['app']->Registry->Get('use_in', $plugin, JAWS_REGISTRY_PLUGIN); 
     160            $use_in = $GLOBALS['app']->Registry->Get('use_in', $plugin); 
    161161            if (file_exists($file) && (in_array($this->_Gadget, explode(',', $use_in)) || $use_in == '*')) { 
    162162                require_once $file;