Changeset 9929
- Timestamp:
- 11/14/08 14:26:12 (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
r9921 r9929 64 64 function UpdateGadget($old, $new) 65 65 { 66 $result = $this->installSchema('schema.xml', '', "$old.xml"); 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'); 67 79 if (Jaws_Error::IsError($result)) { 68 80 return $result; 69 81 } 70 71 // Registry keys.72 $GLOBALS['app']->Registry->DeleteKey('/gadgets/Blocks/searchable');73 82 74 83 return true; … … 171 180 172 181 //remove cached file 173 $GLOBALS['app']->Cache->delete('Blocks' );182 $GLOBALS['app']->Cache->delete('Blocks', 'ViewBlock', $id); 174 183 175 184 $GLOBALS['app']->Session->PushLastResponse(_t('BLOCKS_UPDATED', $title), RESPONSE_NOTICE); … … 201 210 202 211 //remove cached file 203 $GLOBALS['app']->Cache->delete('Blocks' );212 $GLOBALS['app']->Cache->delete('Blocks', 'ViewBlock', $id); 204 213 205 214 $GLOBALS['app']->Session->PushLastResponse(_t('BLOCKS_DELETED', $b['title']), RESPONSE_NOTICE); branches/0.8/jaws/html/gadgets/Blocks/HTML.php
r7926 r9929 45 45 46 46 $layout = $GLOBALS['app']->LoadGadget('Blocks', 'LayoutHTML'); 47 return $layout-> Display($id);47 return $layout->ViewBlock($id); 48 48 } 49 49 } branches/0.8/jaws/html/gadgets/Blocks/Info.php
r8755 r9929 17 17 $this->GadgetName(_t('BLOCKS_NAME')); 18 18 $this->GadgetDescription(_t('BLOCKS_DESC')); 19 $this->GadgetVersion('0.3. 0');19 $this->GadgetVersion('0.3.1'); 20 20 $this->Doc('gadget/Blocks'); 21 21 branches/0.8/jaws/html/gadgets/Blocks/LayoutHTML.php
r9911 r9929 24 24 if (!Jaws_Error::isError($blocks)) { 25 25 foreach ($blocks as $b) { 26 $actions[' Display(' . $b['id'] . ')'] = array(26 $actions['ViewBlock(' . $b['id'] . ')'] = array( 27 27 'mode' => 'LayoutAction', 28 28 'name' => $b['title'], … … 41 41 * @return string Template content 42 42 */ 43 function Display($id)43 function ViewBlock($id) 44 44 { 45 45 //cache output of this action
