- md5
- 408b8631ab97499b8390052f1d146e84
- sha1
- 934e17e9259afec65e8cf0838ddc12f2578fb880
- sha256
- 9eda5d6376489bb947d52406d5aa4fcc96b64d0df4362285ca858abf02fed447
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Controller for global configuration, Store Permissions in Database
*
* @since 3.5
*/
class ConfigControllerApplicationStore extends JControllerBase
{
/**
* Method to GET permission value and give it to the model for storing in the database.
*
* @return boolean true on success, false when failed
*
* @since 3.5
*/
public function execute()
{
// Check if the user is authorized to do this.
if (!JFactory::getUser()->authorise('core.admin'))
{
echo new JResponseJson(json_encode(false), JText::_('JERROR_ALERTNOAUTHOR'));
JFactory::getApplication()->close();
}
// Get Post DATA
$permissions = array(
'component' => $this->input->get->get('comp'),
'action' => $this->input->get->get('action'),
'rule' => $this->input->get->get('rule'),
'value' => $this->input->get->get('value'),
'title' => $this->input->get->get('title', '', 'RAW')
);
if (!(substr($permissions['component'], -6) === '.false'))
{
// Load Permissions from Session and send to Model
$model = new ConfigModelApplication;
$response = $model->storePermissions($permissions);
echo new JResponseJson(json_encode($response), $response['message']);
}
else
{
echo new JResponseJson(json_encode(false), 0);
}
JFactory::getApplication()->close();
}
}
No other release has this exact content. See every version of this file.