Changeset 9958
- Timestamp:
- 11/17/08 09:03:21 (2 months ago)
- Files:
-
- branches/0.8/jaws/html/gadgets/Blocks/AdminModel.php (modified) (3 diffs)
- branches/0.8/jaws/html/gadgets/Blocks/HTML.php (modified) (1 diff)
- branches/0.8/jaws/html/gadgets/Blocks/Info.php (modified) (1 diff)
- branches/0.8/jaws/html/gadgets/Blocks/LayoutHTML.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/0.8/jaws/html/gadgets/Blocks/AdminModel.php
r9929 r9958 64 64 function UpdateGadget($old, $new) 65 65 { 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"); 79 67 if (Jaws_Error::IsError($result)) { 80 68 return $result; 81 69 } 70 71 // Registry keys. 72 $GLOBALS['app']->Registry->DeleteKey('/gadgets/Blocks/searchable'); 82 73 83 74 return true; … … 179 170 } 180 171 181 //remove cached file182 $GLOBALS['app']->Cache->delete('Blocks', 'ViewBlock', $id);183 184 172 $GLOBALS['app']->Session->PushLastResponse(_t('BLOCKS_UPDATED', $title), RESPONSE_NOTICE); 185 173 return true; … … 209 197 $result = $GLOBALS['db']->query($sql, $params); 210 198 211 //remove cached file212 $GLOBALS['app']->Cache->delete('Blocks', 'ViewBlock', $id);213 214 199 $GLOBALS['app']->Session->PushLastResponse(_t('BLOCKS_DELETED', $b['title']), RESPONSE_NOTICE); 215 200 return true; branches/0.8/jaws/html/gadgets/Blocks/HTML.php
r9929 r9958 45 45 46 46 $layout = $GLOBALS['app']->LoadGadget('Blocks', 'LayoutHTML'); 47 return $layout-> ViewBlock($id);47 return $layout->Display($id); 48 48 } 49 49 } branches/0.8/jaws/html/gadgets/Blocks/Info.php
r9929 r9958 17 17 $this->GadgetName(_t('BLOCKS_NAME')); 18 18 $this->GadgetDescription(_t('BLOCKS_DESC')); 19 $this->GadgetVersion('0.3. 1');19 $this->GadgetVersion('0.3.0'); 20 20 $this->Doc('gadget/Blocks'); 21 21 branches/0.8/jaws/html/gadgets/Blocks/LayoutHTML.php
r9929 r9958 24 24 if (!Jaws_Error::isError($blocks)) { 25 25 foreach ($blocks as $b) { 26 $actions[' ViewBlock(' . $b['id'] . ')'] = array(26 $actions['Display(' . $b['id'] . ')'] = array( 27 27 'mode' => 'LayoutAction', 28 28 'name' => $b['title'], … … 41 41 * @return string Template content 42 42 */ 43 function ViewBlock($id)43 function Display($id) 44 44 { 45 //cache output of this action46 $GLOBALS['app']->Layout->SetCurrentActionCacheable();47 48 45 $tpl = new Jaws_Template('gadgets/Blocks/templates/'); 49 46 $tpl->Load('Blocks.html');
