Author: fabien
Date: 2010-03-23 16:08:22 +0100 (Tue, 23 Mar 2010)
New Revision: 28713
Modified:
branches/1.3/lib/view/sfPHPView.class.php
branches/1.3/lib/view/sfView.class.php
branches/1.4/lib/view/sfPHPView.class.php
branches/1.4/lib/view/sfView.class.php
Log:
[1.3, 1.4] fixed layout.php is required even if you use decorate_with() to use
another layout (closes #8441)
Modified: branches/1.3/lib/view/sfPHPView.class.php
===================================================================
--- branches/1.3/lib/view/sfPHPView.class.php 2010-03-23 14:54:43 UTC (rev
28712)
+++ branches/1.3/lib/view/sfPHPView.class.php 2010-03-23 15:08:22 UTC (rev
28713)
@@ -142,6 +142,12 @@
$this->attributeHolder =
$this->initializeAttributeHolder(array('sf_content' => new
sfOutputEscaperSafe($content)));
$this->attributeHolder->set('sf_type', 'layout');
+ // check to see if the decorator template exists
+ if
(!is_readable($this->getDecoratorDirectory().'/'.$this->getDecoratorTemplate()))
+ {
+ throw new sfRenderException(sprintf('The decorator template "%s" does
not exist or is unreadable in "%s".', $this->decoratorTemplate,
$this->decoratorDirectory));
+ }
+
// render the decorator template and return the result
$ret =
$this->renderFile($this->getDecoratorDirectory().'/'.$this->getDecoratorTemplate());
Modified: branches/1.3/lib/view/sfView.class.php
===================================================================
--- branches/1.3/lib/view/sfView.class.php 2010-03-23 14:54:43 UTC (rev
28712)
+++ branches/1.3/lib/view/sfView.class.php 2010-03-23 15:08:22 UTC (rev
28713)
@@ -375,12 +375,6 @@
throw new sfRenderException(sprintf('The template "%s" does not exist
or is unreadable in "%s".', $this->template, $this->directory));
}
}
-
- // check to see if this is a decorator template
- if ($this->decorator &&
!is_readable($this->decoratorDirectory.'/'.$this->decoratorTemplate))
- {
- throw new sfRenderException(sprintf('The decorator template "%s" does
not exist or is unreadable in "%s".', $this->decoratorTemplate,
$this->decoratorDirectory));
- }
}
/**
Modified: branches/1.4/lib/view/sfPHPView.class.php
===================================================================
--- branches/1.4/lib/view/sfPHPView.class.php 2010-03-23 14:54:43 UTC (rev
28712)
+++ branches/1.4/lib/view/sfPHPView.class.php 2010-03-23 15:08:22 UTC (rev
28713)
@@ -136,6 +136,12 @@
$this->attributeHolder =
$this->initializeAttributeHolder(array('sf_content' => new
sfOutputEscaperSafe($content)));
$this->attributeHolder->set('sf_type', 'layout');
+ // check to see if the decorator template exists
+ if
(!is_readable($this->getDecoratorDirectory().'/'.$this->getDecoratorTemplate()))
+ {
+ throw new sfRenderException(sprintf('The decorator template "%s" does
not exist or is unreadable in "%s".', $this->decoratorTemplate,
$this->decoratorDirectory));
+ }
+
// render the decorator template and return the result
$ret =
$this->renderFile($this->getDecoratorDirectory().'/'.$this->getDecoratorTemplate());
Modified: branches/1.4/lib/view/sfView.class.php
===================================================================
--- branches/1.4/lib/view/sfView.class.php 2010-03-23 14:54:43 UTC (rev
28712)
+++ branches/1.4/lib/view/sfView.class.php 2010-03-23 15:08:22 UTC (rev
28713)
@@ -364,12 +364,6 @@
throw new sfRenderException(sprintf('The template "%s" does not exist
or is unreadable in "%s".', $this->template, $this->directory));
}
}
-
- // check to see if this is a decorator template
- if ($this->decorator &&
!is_readable($this->decoratorDirectory.'/'.$this->decoratorTemplate))
- {
- throw new sfRenderException(sprintf('The decorator template "%s" does
not exist or is unreadable in "%s".', $this->decoratorTemplate,
$this->decoratorDirectory));
- }
}
/**
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.