Changeset 7846
- Timestamp:
- 03/12/08 23:54:04 (7 months ago)
- Files:
-
- branches/1.1/lib/config/sfApplicationConfiguration.class.php (modified) (1 diff)
- branches/1.1/lib/view/sfView.class.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/config/sfApplicationConfiguration.class.php
r7828 r7846 342 342 343 343 /** 344 * Gets the decorator directories. 345 * 346 * @param string The template file 347 * 348 * @return array An array of the decorator directories 349 * 350 */ 351 public function getDecoratorDirs() 352 { 353 return array(sfConfig::get('sf_app_template_dir')); 354 } 355 356 /** 357 * Gets the decorator directory for a given template. 358 * 359 * @param string The template file 360 * 361 * @return string A template directory 362 */ 363 public function getDecoratorDir($template) 364 { 365 foreach ($this->getDecoratorDirs() as $dir) 366 { 367 if (is_readable($dir.'/'.$template)) 368 { 369 return $dir; 370 } 371 } 372 } 373 374 /** 344 375 * Gets the i18n directories to use globally. 345 376 * branches/1.1/lib/view/sfView.class.php
r7792 r7846 372 372 } 373 373 374 if (!strpos($template, '.')) 375 { 376 $template .= $this->getExtension(); 377 } 378 374 379 if (sfToolkit::isPathAbsolute($template)) 375 380 { … … 379 384 else 380 385 { 386 $this->decoratorDirectory = $this->context->getConfiguration()->getDecoratorDir($template); 381 387 $this->decoratorTemplate = $template; 382 }383 384 if (!strpos($this->decoratorTemplate, '.'))385 {386 $this->decoratorTemplate .= $this->getExtension();387 388 } 388 389