Ammendment for SF Feature #2837687, dont render the only template if it is invalid

This commit is contained in:
Deon George 2009-08-17 16:30:05 +10:00
parent ba553353b0
commit 5706ad1b4a

View File

@ -310,7 +310,12 @@ class PageRender extends Visitor {
$template = $templates->getTemplates($this->getMode(),$this->getModeContainer(),true);
$template = array_shift($template);
# Dont render the only available template if it is invalid.
if (! $template->isInvalid())
return $template->getID();
else
$this->drawTemplateChoice();
} else {
if (DEBUGTMP) printf('<font size=-2>%s:<u>%s</u></font><br />',__METHOD__,'SELECT a template to use.');