Development

Changeset 10355

You must first sign up to be able to contribute.

Changeset 10355

Show
Ignore:
Timestamp:
07/18/08 19:54:50 (2 months ago)
Author:
KRavEN
Message:

added some checks for request and response type to make things more efficient

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfCombineFilterPlugin/branches/kraven/lib/sfCombineFilter.class.php

    r10354 r10355  
    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)) 
    33     { 
    34       $this->type = 'javascript'; 
    35       $this->files = array(); 
    36       $this->lastmodified = 0; 
    37       $this->getCombinedJavascripts(); 
    38     } 
    39  
    40     if (sfConfig::get('app_sf_combine_filter_plugin_stylesheets',true)) 
    41     { 
    42       $this->type = 'css'; 
    43       $this->files = array(); 
    44       $this->lastmodified = 0; 
    45       $this->getCombinedStylesheets(); 
    46  
     32    if($this->getContext()->getRequest()->isXmlHttpRequest() != true && strpos($this->getContext()->getResponse()->getContentType(),'text/html') === 0) 
     33    { 
     34      if (sfConfig::get('app_sf_combine_filter_plugin_javascripts',true)) 
     35      { 
     36        $this->type = 'javascript'; 
     37        $this->files = array(); 
     38        $this->lastmodified = 0; 
     39        $this->getCombinedJavascripts(); 
     40      } 
     41 
     42      if (sfConfig::get('app_sf_combine_filter_plugin_stylesheets',true)) 
     43      { 
     44        $this->type = 'css'; 
     45        $this->files = array(); 
     46        $this->lastmodified = 0; 
     47        $this->getCombinedStylesheets(); 
     48      } 
    4749    } 
    4850  }