Development

#388: patch-custom-view-class.diff

You must first sign up to be able to contribute.

Ticket #388: patch-custom-view-class.diff

File patch-custom-view-class.diff, 0.8 kB (added by juan.cataldo@gmail.com, 3 years ago)

Removes validation of the existence of the view class on %SF_SYMFONY_LIB_DIR%/view

  • sfController.class.php

    old new  
    471471 
    472472    // view class (as configured in module.yml or defined in action) 
    473473    $viewName = $this->getContext()->getRequest()->getAttribute($moduleName.'_'.$actionName.'_view_name', '', 'symfony/action/view') ? $this->getContext()->getRequest()->getAttribute($moduleName.'_'.$actionName.'_view_name', '', 'symfony/action/view') : sfConfig::get('mod_'.strtolower($moduleName).'_view_class'); 
    474     $file     = sfConfig::get('sf_symfony_lib_dir').'/view/'.$viewName.'View.class.php'; 
    475     if (is_readable($file)) 
    476     { 
    477       $class = $viewName.'View'; 
    478474 
    479       return new $class(); 
    480     } 
     475    $class = $viewName.'View'; 
     476 
     477    return new $class(); 
    481478  } 
    482479 
    483480  /**