rendered paste bodyIndex: lib/config/sfApplicationConfiguration.class.php
===================================================================
--- lib/config/sfApplicationConfiguration.class.php (revision 7748)
+++ lib/config/sfApplicationConfiguration.class.php (working copy)
@@ -341,6 +341,37 @@
}
/**
+ * Gets the decorator directroies
+ *
+ * @param string The tempalte file
+ *
+ * @return array An array of the decorator directories
+ *
+ */
+ public function getDecoratorDirs()
+ {
+ return array(sfConfig::get('sf_app_template_dir'));
+ }
+
+ /**
+ * Gets the decorater directory for a given template
+ *
+ * @param string The template file
+ *
+ * @return string A template directory
+ */
+ public function getDecoratorDir($template)
+ {
+ foreach ($this->getDecoratorDirs() as $dir)
+ {
+ if (is_readable($dir.'/'.$template) || is_readable($dir.'/'.$template.'.php'))
+ {
+ return $dir;
+ }
+ }
+ }
+
+ /**
* Gets the i18n directories to use globally.
*
* @return array An array of i18n directories
@@ -361,7 +392,6 @@
{
$dirs[] = $pluginDirs[0];
}
-
return $dirs;
}
Index: lib/view/sfView.class.php
===================================================================
--- lib/view/sfView.class.php (revision 7748)
+++ lib/view/sfView.class.php (working copy)
@@ -378,6 +378,22 @@
}
else
{
+ //$this->decoratorDirectory = $this->context->getConfiguration()->getDecoratorDir($template);
+ $this->decoratorDirectory = sfConfig::get('sf_app_template_dir');
+ $ret = $this->context->getConfiguration()->getDecoratorDir($template);
+ $ret1 = sfConfig::get('sf_app_template_dir');
+ if ($ret != $ret1)
+ {
+ var_dump($template);
+ var_dump($ret);
+ var_dump($ret1);
+ die( "moo?!?");
+ }
+/*
+ var_dump(sfConfig::get('sf_app_template_dir'));
+ var_dump($ret);
+ die();
+ */
$this->decoratorTemplate = $template;
}