/** * Render the application * * @return void */ public function render() { $document =& JFactory::getDocument(); $config =& JFactory::getConfig(); $user =& JFactory::getUser(); switch ($document->getType()) { case 'html': // Set metadata $document->setTitle(JText::_('PAGE_TITLE')); break; default: break; } // Define component path define('JPATH_COMPONENT', JPATH_BASE); define('JPATH_COMPONENT_SITE', JPATH_SITE); define('JPATH_COMPONENT_ADMINISTRATOR', JPATH_ADMINISTRATOR); // Start the output buffer. ob_start(); // Import the controller. require_once JPATH_COMPONENT . '/controller.php'; // Execute the task. $controller =& JInstallationController::getInstance(); $controller->execute(JRequest::getVar('task')); $controller->redirect(); // Get output from the buffer and clean it. $contents = ob_get_contents(); ob_end_clean(); $params = array('template' => 'template', 'file' => 'index.php', 'directory' => JPATH_THEMES, 'params' => '{}'); $document->setBuffer($contents, 'installation'); $document->setTitle(JText::_('PAGE_TITLE')); $data = $document->render(false, $params); JResponse::setBody($data); }
* @subpackage Installation * @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. * @license GNU/GPL, see LICENSE.php * Joomla! is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * See COPYRIGHT.php for copyright notices and details. */ defined('_JEXEC') or die('Restricted access'); $here = dirname(__FILE__); require_once $here . DS . 'controller.php'; require_once $here . DS . 'helper.php'; // Get the controller $config = array(); // check on proper task: // lang for installation // removedir for remove directory message if (file_exists(JPATH_CONFIGURATION . DS . 'configuration.php') && filesize(JPATH_CONFIGURATION . DS . 'configuration.php') > 10 && file_exists(JPATH_INSTALLATION . DS . 'index.php')) { $config['default_task'] = 'removedir'; } else { $config['default_task'] = 'lang'; } $controller = new JInstallationController($config); $controller->initialize(); // Set some paths $controller->addViewPath($here . DS . 'views'); $controller->addModelPath($here . DS . 'models'); // Process the request $task = JRequest::getCmd('task'); $controller->execute($task);