Development

Changeset 9473

You must first sign up to be able to contribute.

Changeset 9473

Show
Ignore:
Timestamp:
06/09/08 09:33:26 (2 years ago)
Author:
FabianLange
Message:

added support to read sublocale calendar files. fixes #3548

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/helper/FormHelper.php

    r9336 r9473  
    742742 
    743743  // register our javascripts and stylesheets 
    744   $langFile = sfConfig::get('sf_calendar_web_dir').'/lang/calendar-'.strtolower(substr($culture, 0, 2)); 
     744  $langFile = sfConfig::get('sf_calendar_web_dir').'/lang/calendar-'.$culture; 
     745  if((!is_readable(sfConfig::get('sf_symfony_data_dir').'/web/'.$langFile.'.js')) && 
     746     (!is_readable(sfConfig::get('sf_web_dir').'/'.$langFile.'.js'))) 
     747  { 
     748   $langFile = sfConfig::get('sf_calendar_web_dir').'/lang/calendar-'.substr($culture,0,2); 
     749   if((!is_readable(sfConfig::get('sf_symfony_data_dir').'/web/'.$langFile.'.js')) && 
     750      (!is_readable(sfConfig::get('sf_web_dir').'/'.$langFile.'.js'))) 
     751   { 
     752     $langFile = sfConfig::get('sf_calendar_web_dir').'/lang/calendar-en'; 
     753   } 
     754  } 
     755 
    745756  $jss = array( 
    746757    sfConfig::get('sf_calendar_web_dir').'/calendar', 
    747     is_readable(sfConfig::get('sf_symfony_data_dir').'/web/'.$langFile.'.js') || is_readable(sfConfig::get('sf_web_dir').'/'.$langFile.'.js') ? $langFile : sfConfig::get('sf_calendar_web_dir').'/lang/calendar-en', 
     758    $langFile 
    748759    sfConfig::get('sf_calendar_web_dir').'/calendar-setup', 
    749760  ); 

The Sensio Labs Network

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