Changeset 6173
- Timestamp:
- 11/27/07 07:20:23 (1 year ago)
- Files:
-
- trunk/lib/action/sfAction.class.php (modified) (2 diffs)
- trunk/lib/filter/sfExecutionFilter.class.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/action/sfAction.class.php
r5813 r6173 278 278 public function getDefaultView() 279 279 { 280 if (!sfConfig::get('sf_compat_10')) 281 { 282 throw new sfConfigurationException('You must set "compat_10" to true if you want to use this method which is deprecated.'); 283 } 284 280 285 return sfView::INPUT; 281 286 } … … 297 302 public function getRequestMethods() 298 303 { 304 if (!sfConfig::get('sf_compat_10')) 305 { 306 throw new sfConfigurationException('You must set "compat_10" to true if you want to use this method which is deprecated.'); 307 } 308 299 309 return sfRequest::GET 300 310 | sfRequest::POST trunk/lib/filter/sfExecutionFilter.class.php
r5814 r6173 35 35 $actionInstance = $this->context->getController()->getActionStack()->getLastEntry()->getActionInstance(); 36 36 37 // execute the action 37 // execute the action, execute and render the view 38 38 if (sfConfig::get('sf_debug') && sfConfig::get('sf_logging_enabled')) 39 39 { 40 40 $timer = sfTimerManager::getTimer(sprintf('Action "%s/%s"', $actionInstance->getModuleName(), $actionInstance->getActionName())); 41 }42 41 43 $viewName = $this->handleAction($filterChain, $actionInstance);42 $viewName = $this->handleAction($filterChain, $actionInstance); 44 43 45 if (sfConfig::get('sf_debug') && sfConfig::get('sf_logging_enabled')) 46 { 44 $timer->addTime(); 45 $timer = sfTimerManager::getTimer(sprintf('View "%s" for "%s/%s"', $viewName, $actionInstance->getModuleName(), $actionInstance->getActionName())); 46 47 $this->handleView($filterChain, $actionInstance, $viewName); 48 47 49 $timer->addTime(); 48 50 } 49 50 // execute and render the view 51 if (sfConfig::get('sf_debug') && sfConfig::get('sf_logging_enabled')) 51 else 52 52 { 53 $timer = sfTimerManager::getTimer(sprintf('View "%s" for "%s/%s"', $viewName, $actionInstance->getModuleName(), $actionInstance->getActionName())); 54 } 55 56 $this->handleView($filterChain, $actionInstance, $viewName); 57 58 if (sfConfig::get('sf_debug') && sfConfig::get('sf_logging_enabled')) 59 { 60 $timer->addTime(); 53 $viewName = $this->handleAction($filterChain, $actionInstance); 54 $this->handleView($filterChain, $actionInstance, $viewName); 61 55 } 62 56 } … … 76 70 // action in cache, so go to the view 77 71 return sfView::SUCCESS; 78 }79 80 // get the request method81 $method = $this->context->getRequest()->getMethod();82 if (($actionInstance->getRequestMethods() & $method) != $method)83 {84 // this action will skip execution for this method85 // get the default view86 return $actionInstance->getDefaultView();87 72 } 88 73