SF Feature #3298820 - Only custom templates
This commit is contained in:
parent
43ae011c0e
commit
7649b9b826
@ -331,6 +331,16 @@ class PageRender extends Visitor {
|
|||||||
if (DEBUGTMP) printf('<font size=-2>%s:<u>%s</u></font><br />',__METHOD__,'Choosing the DEFAULT template, no other template applicable');
|
if (DEBUGTMP) printf('<font size=-2>%s:<u>%s</u></font><br />',__METHOD__,'Choosing the DEFAULT template, no other template applicable');
|
||||||
|
|
||||||
# Since getTemplate() returns a default template if the one we want doesnt exist, we can return $templates->getID(), it should be the default.
|
# Since getTemplate() returns a default template if the one we want doesnt exist, we can return $templates->getID(), it should be the default.
|
||||||
|
if ($_SESSION[APPCONFIG]->getValue('appearance','disable_default_template') AND $this->getMode() == 'creation') {
|
||||||
|
|
||||||
|
system_message(array(
|
||||||
|
'title'=>_('No available templates'),
|
||||||
|
'body'=>_('There are no available active templates for this container.'),
|
||||||
|
'type'=>'warn'));
|
||||||
|
|
||||||
|
return 'invalid';
|
||||||
|
|
||||||
|
} else
|
||||||
return $template->getID();
|
return $template->getID();
|
||||||
|
|
||||||
# If there is only 1 defined template, and no default available, then that is our template.
|
# If there is only 1 defined template, and no default available, then that is our template.
|
||||||
|
@ -48,7 +48,7 @@ class TemplateRender extends PageRender {
|
|||||||
|
|
||||||
$this->page = get_request('page','REQUEST',false,1);
|
$this->page = get_request('page','REQUEST',false,1);
|
||||||
|
|
||||||
if ($this->template_id) {
|
if ($this->template_id AND $this->template_id != 'invalid') {
|
||||||
if (! $this->template)
|
if (! $this->template)
|
||||||
parent::accept();
|
parent::accept();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user