Ticket #2634: sfLoader.class.php.patch
| File sfLoader.class.php.patch, 1.5 kB (added by Alon.Noy, 1 year ago) |
|---|
-
/home/alon/workspace/symfony1_1/lib/config/sfLoader.class.php
old new 14 14 * @package symfony 15 15 * @subpackage util 16 16 * @author Fabien Potencier <fabien.potencier@symfony-project.com> 17 * @author Alon Noy 17 18 * @version SVN: $Id$ 18 19 */ 19 20 class sfLoader … … 131 132 } 132 133 133 134 /** 135 * check if the source class is instance of sfMessageSource_File 136 * 137 * @return boolean 138 * 139 */ 140 static private function sourceInstanceOfFileSource() 141 { 142 $source = sfMessageSource::factory(sfConfig::get('sf_i18n_source')); 143 return ($source instanceof sfMessageSource_File); 144 } 145 146 /** 134 147 * Gets the i18n directories to use globally. 135 148 * 136 149 * Returns null if the current i18n source is not a file based i18n backend (XLIFF or gettext). … … 139 152 */ 140 153 static public function getI18NGlobalDirs() 141 154 { 142 if (!in_array(sfConfig::get('sf_i18n_source'), array('XLIFF', 'gettext')))155 if(!self::sourceInstanceOfFileSource()) 143 156 { 144 157 return null; 145 158 } … … 173 186 */ 174 187 static public function getI18NDirs($moduleName) 175 188 { 176 if (!in_array(sfConfig::get('sf_i18n_source'), array('XLIFF', 'gettext')))189 if(!self::sourceInstanceOfFileSource()) 177 190 { 178 191 return null; 179 192 }