Skip to content

Instantly share code, notes, and snippets.

@realityking
Created September 1, 2012 12:06
Show Gist options
  • Save realityking/3571325 to your computer and use it in GitHub Desktop.
Save realityking/3571325 to your computer and use it in GitHub Desktop.
PHP fix for no admin template
$template = $db->loadObject();
if ($template !== null)
{
$template->template = JFilterInput::getInstance()->clean($template->template, 'cmd');
$template->params = new JRegistry($template->params);
}
else
{
$template = new stdClass;
$template->params = new JRegistry;
$template->template = 'isis';
}
if (!file_exists(JPATH_THEMES . '/' . $template->template . '/index.php'))
{
$template->params = new JRegistry;
$template->template = 'isis';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment