Changeset 9926
- Timestamp:
- 11/14/08 09:08:02 (2 months ago)
- Files:
-
- branches/0.8/jaws/html/gadgets/Poll/AdminModel.php (modified) (6 diffs)
- branches/0.8/jaws/html/gadgets/Poll/HTML.php (modified) (3 diffs)
- branches/0.8/jaws/html/gadgets/Poll/LayoutHTML.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/0.8/jaws/html/gadgets/Poll/AdminModel.php
r9920 r9926 136 136 137 137 //remove cached files 138 $GLOBALS['app']->Cache->delete('Poll'); 138 $GLOBALS['app']->Cache->delete('Poll', 'LastPoll'); 139 $GLOBALS['app']->Cache->delete('Poll', 'ListOfPolls'); 139 140 140 141 $GLOBALS['app']->Session->PushLastResponse(_t('POLL_POLLS_ADDED'), RESPONSE_NOTICE); … … 186 187 187 188 //remove cached files 188 $GLOBALS['app']->Cache->delete('Poll'); 189 $GLOBALS['app']->Cache->delete('Poll', 'LastPoll'); 190 $GLOBALS['app']->Cache->delete('Poll', 'ListOfPolls'); 191 $GLOBALS['app']->Cache->delete('Poll', 'ViewPoll', $pid); 192 $GLOBALS['app']->Cache->delete('Poll', 'ViewResult', $pid); 189 193 190 194 $GLOBALS['app']->Session->PushLastResponse(_t('POLL_POLLS_UPDATED'), RESPONSE_NOTICE); … … 209 213 210 214 //remove cached files 211 $GLOBALS['app']->Cache->delete('Poll'); 215 $GLOBALS['app']->Cache->delete('Poll', 'LastPoll'); 216 $GLOBALS['app']->Cache->delete('Poll', 'ListOfPolls'); 217 $GLOBALS['app']->Cache->delete('Poll', 'ViewPoll', $pid); 218 $GLOBALS['app']->Cache->delete('Poll', 'ViewResult', $pid); 212 219 213 220 $sql = 'DELETE FROM [[poll_answers]] WHERE [pid] = {pid}'; … … 305 312 306 313 //remove cached files 307 $GLOBALS['app']->Cache->delete('Poll'); 314 $GLOBALS['app']->Cache->delete('Poll', 'LastPoll'); 315 $GLOBALS['app']->Cache->delete('Poll', 'ViewPoll', $pid); 316 $GLOBALS['app']->Cache->delete('Poll', 'ViewResult', $pid); 308 317 309 318 return true; … … 338 347 339 348 //remove cached files 340 $GLOBALS['app']->Cache->delete('Poll'); 349 $GLOBALS['app']->Cache->delete('Poll', 'LastPoll'); 350 $GLOBALS['app']->Cache->delete('Poll', 'ViewPoll', $pid); 351 $GLOBALS['app']->Cache->delete('Poll', 'ViewResult', $pid); 341 352 342 353 return true; … … 360 371 361 372 //remove cached files 362 $GLOBALS['app']->Cache->delete('Poll'); 373 $GLOBALS['app']->Cache->delete('Poll', 'LastPoll'); 374 $GLOBALS['app']->Cache->delete('Poll', 'ViewPoll', $pid); 375 $GLOBALS['app']->Cache->delete('Poll', 'ViewResult', $pid); 363 376 364 377 return true; branches/0.8/jaws/html/gadgets/Poll/HTML.php
r9920 r9926 56 56 $model->AddAnswerVote($post['pid'], $aid); 57 57 } 58 59 //remove cached files 60 $GLOBALS['app']->Cache->delete('Poll', 'ViewResult', $post['pid']); 58 61 } 59 62 } … … 104 107 $request =& Jaws_Request::getInstance(); 105 108 $pid = $request->get('id', 'get'); 106 return $layoutGadget-> Display($pid);109 return $layoutGadget->ViewPoll($pid); 107 110 } 108 111 … … 115 118 function ViewResult() 116 119 { 120 //cache output of this action 121 $GLOBALS['app']->Layout->SetCurrentActionCacheable(); 122 117 123 $request =& Jaws_Request::getInstance(); 118 124 $pid = $request->get('id', 'get'); branches/0.8/jaws/html/gadgets/Poll/LayoutHTML.php
r9920 r9926 36 36 if (!Jaws_Error::isError($polls)) { 37 37 foreach ($polls as $poll) { 38 $actions[' Display(' . $poll['id'] . ')'] = array(38 $actions['ViewPoll(' . $poll['id'] . ')'] = array( 39 39 'mode' => 'LayoutAction', 40 40 'name' => $poll['question'], … … 56 56 function LastPoll() 57 57 { 58 return $this-> Display(0);58 return $this->ViewPoll(0); 59 59 } 60 60 … … 96 96 * @access public 97 97 */ 98 function Display($pid = 0)98 function ViewPoll($pid = 0) 99 99 { 100 100 //cache output of this action
