Development

Changeset 10174

You must first sign up to be able to contribute.

Changeset 10174

Show
Ignore:
Timestamp:
07/07/08 18:55:10 (2 months ago)
Author:
KRavEN
Message:

Fixed some bugs when moving all config from filter.yml into app.yml

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfCombineFilterPlugin/branches/kraven/config/app.yml

    r10169 r10174  
    11all: # these are the defaults, you should override them in your application/config/app.yml file 
    22  sf_combine_filter_plugin: 
    3     css_filtered_paths:          [sfConfig::get('sf_root_dir'), plugins/, web/]  # you probably want to end your paths (comma seperated) with a / 
     3    css_filtered_paths:          [%SF_ROOT_DIR%, plugins/, web/]  # you probably want to end your paths (comma seperated) with a / 
    44    js_exclude_files:            [tiny_mce]   # you probably want E.G. tiny_mce in here, so I did this for you ;-) 
    5     javascripts:    true 
    6     stylesheets:    true 
    7     compress_js:    true 
    8     compress_css:   true 
    9     root_js_only:   false 
    10     root_css_only:  false 
     5 
     6    #defaults 
     7    #javascripts:    true 
     8    #stylesheets:    true 
     9    #compress_js:    false 
     10    #compress_css:   true 
     11    #root_js_only:   false 
     12    #root_css_only:  false 
  • plugins/sfCombineFilterPlugin/branches/kraven/lib/sfCombineFilter.class.php

    r10169 r10174  
    3030    $this->sf_relative_url_root = $this->getContext()->getRequest()->getRelativeUrlRoot(). $this->getContext()->getRequest()->getScriptName(); 
    3131 
    32     if (sfConfig::get('app_sf_combine_filter_plugin_javascripts', true)) 
     32    if (sfConfig::get('app_sf_combine_filter_plugin_javascripts',true)) 
    3333    { 
    3434      $this->type = 'javascript'; 
     
    3838    } 
    3939 
    40     if (sfConfig::get('app_sf_combine_filter_plugin_stylesheets', true)) 
     40    if (sfConfig::get('app_sf_combine_filter_plugin_stylesheets',true)) 
    4141    { 
    4242      $this->type = 'css'; 
     
    4949  protected function getCombinedJavascripts() 
    5050  { 
    51     $root_js_only = sfConfig::get('app_sf_combine_filter_plugin_root_js_only', true); 
     51    $root_js_only = sfConfig::get('app_sf_combine_filter_plugin_root_js_only', false); 
    5252 
    5353    $already_seen = array(); 
     
    130130        if($this->type=='css') 
    131131        { 
    132           //TODO: may need more replacements in the path but this covers everything I've come across so far 
    133           //$filtered_paths = array(sfConfig::get('sf_root_dir'), 'plugins/', 'web/'); 
    134           //$filtered_paths = array_merge($filtered_paths, sfConfig::get('app_sf_combine_filter_plugin_css_filtered_paths', array())); 
    135132          $cssPath = str_replace(sfConfig::get('app_sf_combine_filter_plugin_css_filtered_paths', array()),'',$path); 
    136133          $con = $this->fixCssPaths(file_get_contents($path),$cssPath); 
     
    145142      } 
    146143 
    147       if ($this->type=='javascript'&& sfConfig::get('app_sf_combine_filter_plugin_compress_js')) 
     144      if ($this->type=='javascript'&& sfConfig::get('app_sf_combine_filter_plugin_compress_js', false)) 
    148145      { 
    149146        $contents = JSMin::minify($contents); 
    150147      } 
    151       elseif($this->type=='css'&& sfConfig::get('app_sf_combine_filter_plugin_compress_css')) 
     148      elseif($this->type=='css'&& sfConfig::get('app_sf_combine_filter_plugin_compress_css', true)) 
    152149      { 
    153150        $contents = $this->compressCss($contents); 
     
    244241  protected function getCombinedStylesheets() 
    245242  { 
    246     $root_css_only = sfConfig::get('app_sf_combine_filter_plugin_root_css_only', true); 
     243    $root_css_only = sfConfig::get('app_sf_combine_filter_plugin_root_css_only', false); 
    247244    $already_seen = array(); 
    248245    $combined_sources = array();