Changeset 28590
- Timestamp:
- 03/17/10 20:46:54 (3 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/swCombinePlugin/trunk/lib/task/swOptimizeCreateFilesTask.class.php
r28588 r28590 151 151 $this->combineAndOptimize('stylesheet', $assets); 152 152 } 153 153 154 154 // Generate js module files 155 155 $javascripts = $this->view_handler->exposeMergeConfigValue('javascripts', $view); … … 159 159 $this->combineAndOptimize('javascript', $assets); 160 160 } 161 162 161 } 163 162 } … … 204 203 if(count($combine->getFiles()) == 0) 205 204 { 206 $this->logSection('combine', ' ~ no files to add'); 205 $this->logSection('combine', ' ~ no files to add : '.$type); 206 207 207 return; 208 208 } … … 213 213 ); 214 214 215 215 216 if(is_file($path)) 216 217 { … … 218 219 return; 219 220 } 220 221 221 222 $content = $combine->getContentsFromFiles(); 222 223 … … 224 225 if(!$this->saveContents($path, $content)) 225 226 { 226 $this->logSection('combine', ' ~ content is empty ');227 $this->logSection('combine', ' ~ content is empty : '.$type); 227 228 return; 228 229 } 229 230 230 231 // optimize file with the provided driver 231 232 $driver = $this->getDriver($type); … … 234 235 $results = $driver->getResults(); 235 236 237 236 238 $this->logSection('file+', sprintf(' > %s', $force_name_to ? $force_name_to : $this->view_handler->getCombinedName($type, $combined))); 237 239 … … 249 251 * @param swDriveBase 250 252 */ 251 public function getDriver(string $type) 252 { 253 public function getDriver($type) 254 { 255 253 256 $driver = $this->view_parameters->get('configuration['.$type.'][driver]', false); 254 257 255 258 if(!class_exists($driver)) 256 259 { 260 257 261 throw new sfException('Invalid driver class : '.$driver); 258 262 }