Development

Changeset 10169

You must first sign up to be able to contribute.

Changeset 10169

Show
Ignore:
Timestamp:
07/07/08 17:33:14 (2 months ago)
Author:
KRavEN
Message:

Moved all config from filter.yml into app.yml

Files:

Legend:

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

    r10113 r10169  
    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:          []           # you probably want to end your paths (comma seperated) with a / 
     3    css_filtered_paths:          [sfConfig::get('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 
  • plugins/sfCombineFilterPlugin/branches/kraven/lib/sfCombineFilter.class.php

    r10113 r10169  
    3030    $this->sf_relative_url_root = $this->getContext()->getRequest()->getRelativeUrlRoot(). $this->getContext()->getRequest()->getScriptName(); 
    3131 
    32     if ($this->getParameter('javascripts', true)) 
     32    if (sfConfig::get('app_sf_combine_filter_plugin_javascripts', true)) 
    3333    { 
    3434      $this->type = 'javascript'; 
     
    3838    } 
    3939 
    40     if ($this->getParameter('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 = $this->getParameter('root_js_only', true); 
     51    $root_js_only = sfConfig::get('app_sf_combine_filter_plugin_root_js_only', true); 
    5252 
    5353    $already_seen = array(); 
     
    131131        { 
    132132          //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())); 
    135           $cssPath = str_replace($filtered_paths,'',$path); 
     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())); 
     135          $cssPath = str_replace(sfConfig::get('app_sf_combine_filter_plugin_css_filtered_paths', array()),'',$path); 
    136136          $con = $this->fixCssPaths(file_get_contents($path),$cssPath); 
    137137        } 
     
    145145      } 
    146146 
    147       if ($this->type=='javascript'&& $this->getParameter('compress_js')) 
     147      if ($this->type=='javascript'&& sfConfig::get('app_sf_combine_filter_plugin_compress_js')) 
    148148      { 
    149149        $contents = JSMin::minify($contents); 
    150150      } 
    151       elseif($this->type=='css'&& $this->getParameter('compress_css')) 
     151      elseif($this->type=='css'&& sfConfig::get('app_sf_combine_filter_plugin_compress_css')) 
    152152      { 
    153153        $contents = $this->compressCss($contents); 
     
    244244  protected function getCombinedStylesheets() 
    245245  { 
    246     $root_css_only = $this->getParameter('root_css_only', true); 
     246    $root_css_only = sfConfig::get('app_sf_combine_filter_plugin_root_css_only', true); 
    247247    $already_seen = array(); 
    248248    $combined_sources = array();