Development

#2634: sfLoader.class.php.patch

You must first sign up to be able to contribute.

Ticket #2634: sfLoader.class.php.patch

File sfLoader.class.php.patch, 1.5 kB (added by Alon.Noy, 1 year ago)

patch

  • /home/alon/workspace/symfony1_1/lib/config/sfLoader.class.php

    old new  
    1414 * @package    symfony 
    1515 * @subpackage util 
    1616 * @author     Fabien Potencier <fabien.potencier@symfony-project.com> 
     17 * @author     Alon Noy 
    1718 * @version    SVN: $Id$ 
    1819 */ 
    1920class sfLoader 
     
    131132  } 
    132133 
    133134  /** 
     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  /** 
    134147   * Gets the i18n directories to use globally. 
    135148   * 
    136149   * Returns null if the current i18n source is not a file based i18n backend (XLIFF or gettext). 
     
    139152   */ 
    140153  static public function getI18NGlobalDirs() 
    141154  { 
    142     if (!in_array(sfConfig::get('sf_i18n_source'), array('XLIFF', 'gettext'))) 
     155    if(!self::sourceInstanceOfFileSource()) 
    143156    { 
    144157      return null; 
    145158    } 
     
    173186   */ 
    174187  static public function getI18NDirs($moduleName) 
    175188  { 
    176     if (!in_array(sfConfig::get('sf_i18n_source'), array('XLIFF', 'gettext'))) 
     189    if(!self::sourceInstanceOfFileSource()) 
    177190    { 
    178191      return null; 
    179192    }