Changeset 9958

Show
Ignore:
Timestamp:
11/17/08 09:03:21 (2 months ago)
Author:
afz
Message:

revert Blocks gadget changes to before starting cache stuffs

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/0.8/jaws/html/gadgets/Blocks/AdminModel.php

    r9929 r9958  
    6464    function UpdateGadget($old, $new) 
    6565    { 
    66         if (version_compare($old, '0.3.0', '<')) { 
    67             $result = $this->installSchema('schema.xml', '', "$old.xml"); 
    68             if (Jaws_Error::IsError($result)) { 
    69                 return $result; 
    70             } 
    71  
    72             // Registry keys. 
    73             $GLOBALS['app']->Registry->DeleteKey('/gadgets/Blocks/searchable'); 
    74         } 
    75  
    76         //rename layout action 
    77         $layoutModel = $GLOBALS['app']->LoadGadget('Layout', 'AdminModel'); 
    78         $result = $layoutModel->ChangeGadgetActionName('Blocks', 'Display', 'ViewBlock'); 
     66        $result = $this->installSchema('schema.xml', '', "$old.xml"); 
    7967        if (Jaws_Error::IsError($result)) { 
    8068            return $result; 
    8169        } 
     70 
     71        // Registry keys. 
     72        $GLOBALS['app']->Registry->DeleteKey('/gadgets/Blocks/searchable'); 
    8273 
    8374        return true; 
     
    179170        } 
    180171 
    181         //remove cached file 
    182         $GLOBALS['app']->Cache->delete('Blocks', 'ViewBlock', $id); 
    183  
    184172        $GLOBALS['app']->Session->PushLastResponse(_t('BLOCKS_UPDATED', $title), RESPONSE_NOTICE); 
    185173        return true; 
     
    209197        $result = $GLOBALS['db']->query($sql, $params); 
    210198 
    211         //remove cached file 
    212         $GLOBALS['app']->Cache->delete('Blocks', 'ViewBlock', $id); 
    213  
    214199        $GLOBALS['app']->Session->PushLastResponse(_t('BLOCKS_DELETED', $b['title']), RESPONSE_NOTICE); 
    215200        return true; 
  • branches/0.8/jaws/html/gadgets/Blocks/HTML.php

    r9929 r9958  
    4545 
    4646        $layout = $GLOBALS['app']->LoadGadget('Blocks', 'LayoutHTML'); 
    47         return $layout->ViewBlock($id); 
     47        return $layout->Display($id); 
    4848    } 
    4949} 
  • branches/0.8/jaws/html/gadgets/Blocks/Info.php

    r9929 r9958  
    1717        $this->GadgetName(_t('BLOCKS_NAME')); 
    1818        $this->GadgetDescription(_t('BLOCKS_DESC')); 
    19         $this->GadgetVersion('0.3.1'); 
     19        $this->GadgetVersion('0.3.0'); 
    2020        $this->Doc('gadget/Blocks'); 
    2121 
  • branches/0.8/jaws/html/gadgets/Blocks/LayoutHTML.php

    r9929 r9958  
    2424        if (!Jaws_Error::isError($blocks)) { 
    2525            foreach ($blocks as $b) { 
    26                 $actions['ViewBlock(' . $b['id'] . ')'] = array( 
     26                $actions['Display(' . $b['id'] . ')'] = array( 
    2727                    'mode' => 'LayoutAction', 
    2828                    'name' => $b['title'], 
     
    4141     * @return  string  Template content 
    4242     */ 
    43     function ViewBlock($id) 
     43    function Display($id) 
    4444    { 
    45         //cache output of this action 
    46         $GLOBALS['app']->Layout->SetCurrentActionCacheable(); 
    47  
    4845        $tpl = new Jaws_Template('gadgets/Blocks/templates/'); 
    4946        $tpl->Load('Blocks.html');