Ticket #1617: sfExecutionFilter.class.php.patch
| File sfExecutionFilter.class.php.patch, 2.0 kB (added by Carl.Vondrick, 2 years ago) |
|---|
-
lib/filter/sfExecutionFilter.class.php
old new 71 71 // set default validated status 72 72 $validated = true; 73 73 74 // the case of the first letter of the action is insignificant 75 $actionNameLower = strtolower(substr($actionName, 0, 1)).substr($actionName, 1); 76 $actionNameUpper = ucfirst($actionName); 77 74 78 // get the current action validation configuration 75 $validationConfig = $moduleName.'/'.sfConfig::get('sf_app_module_validate_dir_name').'/'.$actionName.'.yml'; 79 $validationConfigLower = $moduleName.'/'.sfConfig::get('sf_app_module_validate_dir_name').'/'.$actionNameLower.'.yml'; 80 $validationConfigUpper = $moduleName.'/'.sfConfig::get('sf_app_module_validate_dir_name').'/'.$actionNameUpper.'.yml'; 76 81 82 // determine $validateFile by testing both the uppercase and lowercase 83 // types of validation configurations. 84 if (null !== $testValidateFile = sfConfigCache::getInstance()->checkConfig(sfConfig::get('sf_app_module_dir_name').'/'.$validationConfigLower, true)) 85 { 86 $validateFile = $testValidateFile; 87 } 88 elseif (null !== $testVaidateFile = sfConfigCache::getInstance()->checkConfig(sfConfig::get('sf_app_module_dir_name').'/'.$validationConfigUpper, true)) 89 { 90 $validateFile = $testValidateFile; 91 } 92 else 93 { 94 $validateFile = null; 95 } 96 77 97 // load validation configuration 78 98 // do NOT use require_once 79 if (null !== $validateFile = sfConfigCache::getInstance()->checkConfig(sfConfig::get('sf_app_module_dir_name').'/'.$validationConfig, true))99 if (null !== $validateFile) 80 100 { 81 101 // create validator manager 82 102 $validatorManager = new sfValidatorManager();

