Source for file save.php
Documentation is available at save.php
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
defined('_JEXEC') or die('Restricted access');
* Save Controller for global configuration
* Method to save global configuration.
* @return boolean True on success.
// Check for request forgeries.
// Check if the user is authorized to do this.
// Set FTP credentials, if given.
// Access back-end com_templates
// Set back-end required params
$document->setType('json');
$this->input->set('id', $app->getTemplate('template')->id);
// Execute back-end controller
$return =
$controllerClass->save();
// Reset params back after requesting from service
$document->setType('html');
// Check the return value.
// Save the data in the session.
$app->setUserState('com_config.config.global.data', $data);
// Save failed, go back to the screen and display a notice.
$app->redirect(JRoute::_('index.php?option=com_config&controller=config.display.templates', false), $message, 'error');
// Set the success message.
$message =
JText::_('COM_CONFIG_SAVE_SUCCESS');
// Redirect back to com_config display
$app->redirect(JRoute::_('index.php?option=com_config&controller=config.display.templates', false), $message);
Documentation generated on Tue, 19 Nov 2013 15:12:36 +0100 by phpDocumentor 1.4.3