Development

Changeset 5024

You must first sign up to be able to contribute.

Changeset 5024

Show
Ignore:
Timestamp:
09/09/07 21:36:33 (2 years ago)
Author:
fabien
Message:

changed view class management in sfController

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/controller/sfController.class.php

    r4957 r5024  
    381381    { 
    382382      // view class (as configured in module.yml or defined in action) 
    383       $viewClassName = $this->context->getRequest()->getAttribute($moduleName.'_'.$actionName.'_view_name', sfConfig::get('mod_'.strtolower($moduleName).'_view_class'), 'symfony/action/view'); 
    384       $class    = sfAutoload::getClassPath($viewClassName.'View') ? $viewClassName.'View' : 'sfPHPView'; 
     383      $viewClassName = sfConfig::get('mod_'.strtolower($moduleName).'_view_class'); 
     384      $class = sfAutoload::getClassPath($viewClassName.'View') ? $viewClassName.'View' : 'sfPHPView'; 
    385385    } 
    386386 
     
    436436    if ($viewName) 
    437437    { 
    438       $this->context->getRequest()->setAttribute($module.'_'.$action.'_view_name', $viewName, 'symfony/action/view'); 
     438      $currentViewName = sfConfig::get('mod_'.strtolower($moduleName).'_view_class'); 
     439      sfConfig::set('mod_'.strtolower($moduleName).'_view_class', $viewName); 
    439440    } 
    440441 
     
    470471    if ($viewName) 
    471472    { 
    472       $this->context->getRequest()->getAttributeHolder()->remove($module.'_'.$action.'_view_name', 'symfony/action/view'); 
     473      sfConfig::set('mod_'.strtolower($moduleName).'_view_class', $currentViewName); 
    473474    } 
    474475 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.