Source for file removeroot.php
Documentation is available at removeroot.php
* @package Joomla.Administrator
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* Remove Root Controller for global configuration
* @package Joomla.Administrator
* Application object - Redeclared for proper typehinting
* Method to remove root in global configuration.
* @return boolean True on success.
// Check for request forgeries.
$this->app->enqueueMessage(JText::_('JINVALID_TOKEN'));
$this->app->redirect('index.php');
// Check if the user is authorized to do this.
$this->app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'));
$this->app->redirect('index.php');
// Attempt to save the configuration and remove root.
catch
(RuntimeException $e)
// Save failed, go back to the screen and display a notice.
$this->app->enqueueMessage(JText::sprintf('JERROR_SAVE_FAILED', $e->getMessage()), 'error');
$this->app->redirect(JRoute::_('index.php', false));
// Set the redirect based on the task.
$this->app->enqueueMessage(JText::_('COM_CONFIG_SAVE_SUCCESS'));
$this->app->redirect(JRoute::_('index.php', false));
Documentation generated on Tue, 19 Nov 2013 15:11:48 +0100 by phpDocumentor 1.4.3