/** * Rendering is the process of pushing the document buffers into the template * placeholders, retrieving data from the document and pushing it into * the application response buffer. * * @return void * * @since 3.2 */ protected function render() { switch ($this->document->getType()) { case 'feed': // No special processing for feeds break; case 'html': default: $template = $this->getTemplate(true); $file = $this->input->get('tmpl', 'index'); if (!$this->get('offline') && $file == 'offline') { $this->set('themeFile', 'index.php'); } if ($this->get('offline') && !JFactory::getUser()->authorise('core.login.offline')) { $this->setUserState('users.login.form.data', array('return' => JUri::getInstance()->toString())); $this->set('themeFile', 'offline.php'); $this->setHeader('Status', '503 Service Temporarily Unavailable', 'true'); } if (!is_dir(JPATH_THEMES . '/' . $template->template) && !$this->get('offline')) { $this->set('themeFile', 'component.php'); } // Ensure themeFile is set by now if ($this->get('themeFile') == '') { $this->set('themeFile', $file . '.php'); } break; } parent::render(); }
/** * Rendering is the process of pushing the document buffers into the template * placeholders, retrieving data from the document and pushing it into * the application response buffer. * * @return void * * @since 3.2 */ protected function render() { // Get the JInput object $input = $this->input; $component = $input->getCmd('option', 'com_users'); $view = $input->getCmd('view', 'login'); $file = $input->getCmd('tmpl', 'index'); if ($component == 'com_users' && $view == 'login') { $file = 'login'; } $this->set('themeFile', $file . '.php'); parent::render(); }
/** * Rendering is the process of pushing the document buffers into the template * placeholders, retrieving data from the document and pushing it into * the application response buffer. * * @return void * * @since 3.2 */ protected function render() { // Get the JInput object $input = $this->input; $component = $input->getCmd('option', 'com_login'); $file = $input->getCmd('tmpl', 'index'); if ($component == 'com_login') { $file = 'login'; } $this->set('themeFile', $file . '.php'); // Safety check for when configuration.php root_user is in use. $config = JFactory::getConfig(); $rootUser = $config->get('root_user'); if (property_exists('JConfig', 'root_user') && (JFactory::getUser()->get('username') == $rootUser || JFactory::getUser()->id === (string) $rootUser)) { $this->enqueueMessage(JText::sprintf('JWARNING_REMOVE_ROOT_USER', 'index.php?option=com_config&task=application.removeroot&' . JSession::getFormToken() . '=1'), 'notice'); } parent::render(); }
/** * Rendering is the process of pushing the document buffers into the template * placeholders, retrieving data from the document and pushing it into * the application response buffer. * * @return void * * @since 3.2 */ protected function render() { switch ($this->document->getType()) { case 'feed': // No special processing for feeds break; case 'html': default: $template = $this->getTemplate(true); $file = $this->input->get('tmpl', 'index'); if (!is_dir(JPATH_THEMES . '/' . $template->template)) { $this->set('themeFile', 'component.php'); } // Ensure themeFile is set by now if ($this->get('themeFile') == '') { $this->set('themeFile', $file . '.php'); } break; } parent::render(); }