Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

Commit

Permalink
Merge pull request #316 from joomlatools/feature/315-joomla-3.6.5-upg…
Browse files Browse the repository at this point in the history
…rade

Upgrade to Joomla 3.6.5
  • Loading branch information
johanjanssens authored Apr 20, 2017
2 parents 40b54b3 + cdc67e1 commit 781341e
Show file tree
Hide file tree
Showing 1,415 changed files with 67,965 additions and 37,487 deletions.
2 changes: 1 addition & 1 deletion app/administrator/components/com_config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

Expand Down
2 changes: 1 addition & 1 deletion app/administrator/components/com_config/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<name>com_config</name>
<author>Joomla! Project</author>
<creationDate>April 2006</creationDate>
<copyright>(C) 2005 - 2014 Open Source Matters. All rights reserved.</copyright>
<copyright>(C) 2005 - 2016 Open Source Matters. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
Expand Down
11 changes: 7 additions & 4 deletions app/administrator/components/com_config/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

Expand All @@ -12,9 +12,8 @@
/**
* Config Component Controller
*
* @package Joomla.Administrator
* @subpackage com_config
* @since 1.5
* @deprecated 4.0
*/
class ConfigController extends JControllerLegacy
{
Expand All @@ -41,7 +40,11 @@ public function display($cachable = false, $urlparams = array())
// Set the default view name and format from the Request.
$vName = $this->input->get('view', 'application');

JLog::add('ConfigController is deprecated. Use ConfigControllerApplicationDisplay or ConfigControllerComponentDisplay instead.', JLog::WARNING, 'deprecated');
JLog::add(
'ConfigController is deprecated. Use ConfigControllerApplicationDisplay or ConfigControllerComponentDisplay instead.',
JLog::WARNING,
'deprecated'
);

if (ucfirst($vName) == 'Application')
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

Expand All @@ -12,9 +12,7 @@
/**
* Cancel Controller for global configuration
*
* @package Joomla.Administrator
* @subpackage com_config
* @since 3.2
* @since 3.2
*/
class ConfigControllerApplicationCancel extends ConfigControllerCanceladmin
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage Joomla.Config
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

Expand All @@ -12,10 +12,8 @@
/**
* Base Display Controller
*
* @package Joomla.Administrator
* @subpackage com_config
* @since 3.2
* @note Needed for front end view
* @since 3.2
* @note Needed for front end view
*/
class ConfigControllerApplicationDisplay extends ConfigControllerDisplay
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
* @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;

/**
* Save Controller for global configuration
*
* @package Joomla.Administrator
* @subpackage com_config
* @since 3.2
* @since 3.2
*/
class ConfigControllerApplicationSave extends JControllerBase
{
Expand All @@ -37,14 +35,14 @@ public function execute()
// Check for request forgeries.
if (!JSession::checkToken())
{
$this->app->enqueueMessage(JText::_('JINVALID_TOKEN'));
$this->app->enqueueMessage(JText::_('JINVALID_TOKEN'), 'error');
$this->app->redirect('index.php');
}

// Check if the user is authorized to do this.
if (!JFactory::getUser()->authorise('core.admin'))
{
$this->app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'));
$this->app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'error');
$this->app->redirect('index.php');
}

Expand Down Expand Up @@ -88,7 +86,7 @@ public function execute()
}

// Attempt to save the configuration.
$data = $return;
$data = $return;
$return = $model->save($data);

// Check the return value.
Expand All @@ -106,7 +104,7 @@ public function execute()
}

// Set the success message.
$this->app->enqueueMessage(JText::_('COM_CONFIG_SAVE_SUCCESS'));
$this->app->enqueueMessage(JText::_('COM_CONFIG_SAVE_SUCCESS'), 'message');

// Set the redirect based on the task.
switch ($this->options[3])
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?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;

/**
* Send Test Mail Controller from global configuration
*
* @since 3.5
*/
class ConfigControllerApplicationSendtestmail extends JControllerBase
{
/**
* Method to send the test mail.
*
* @return string
*
* @since 3.5
*/
public function execute()
{
// Send json mime type.
$this->app->mimeType = 'application/json';
$this->app->setHeader('Content-Type', $this->app->mimeType . '; charset=' . $this->app->charSet);
$this->app->sendHeaders();

// Check if user token is valid.
if (!JSession::checkToken('get'))
{
$this->app->enqueueMessage(JText::_('JINVALID_TOKEN'), 'error');
echo new JResponseJson;
$this->app->close();
}

// Check if the user is authorized to do this.
if (!JFactory::getUser()->authorise('core.admin'))
{
$this->app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'error');
echo new JResponseJson;
$this->app->close();
}

$model = new ConfigModelApplication;
echo new JResponseJson($model->sendTestMail());
$this->app->close();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?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()
{
// Send json mime type.
$this->app->mimeType = 'application/json';
$this->app->setHeader('Content-Type', $this->app->mimeType . '; charset=' . $this->app->charSet);
$this->app->sendHeaders();

// Check if user token is valid.
if (!JSession::checkToken('get'))
{
$this->app->enqueueMessage(JText::_('JINVALID_TOKEN'), 'error');
echo new JResponseJson;
$this->app->close();
}

$model = new ConfigModelApplication;
echo new JResponseJson($model->storePermissions());
$this->app->close();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package Joomla.Site
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package Joomla.Site
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

Expand All @@ -12,9 +12,7 @@
/**
* Cancel Controller for global configuration components
*
* @package Joomla.Administrator
* @subpackage com_config
* @since 3.2
* @since 3.2
*/
class ConfigControllerComponentCancel extends ConfigControllerCanceladmin
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage Joomla.Config
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

Expand All @@ -12,10 +12,8 @@
/**
* Base Display Controller
*
* @package Joomla.Administrator
* @subpackage com_config
* @since 3.2
* @note Needed for front end view
* @since 3.2
* @note Needed for front end view
*/
class ConfigControllerComponentDisplay extends ConfigControllerDisplay
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

Expand All @@ -12,9 +12,7 @@
/**
* Save Controller for global configuration
*
* @package Joomla.Administrator
* @subpackage com_config
* @since 3.2
* @since 3.2
*/
class ConfigControllerComponentSave extends JControllerBase
{
Expand All @@ -38,7 +36,7 @@ public function execute()
// Check for request forgeries.
if (!JSession::checkToken())
{
$this->app->enqueueMessage(JText::_('JINVALID_TOKEN'));
$this->app->enqueueMessage(JText::_('JINVALID_TOKEN'), 'error');
$this->app->redirect('index.php');
}

Expand All @@ -50,14 +48,21 @@ public function execute()
$data = $this->input->get('jform', array(), 'array');
$id = $this->input->getInt('id');
$option = $this->input->get('component');
$user = JFactory::getUser();

// Check if the user is authorized to do this.
if (!JFactory::getUser()->authorise('core.admin', $option))
// Check if the user is authorised to do this.
if (!$user->authorise('core.admin', $option) && !$user->authorise('core.options', $option))
{
$this->app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'));
$this->app->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'error');
$this->app->redirect('index.php');
}

// Remove the permissions rules data if user isn't allowed to edit them.
if (!$user->authorise('core.admin', $option) && isset($data['params']) && isset($data['params']['rules']))
{
unset($data['params']['rules']);
}

$returnUri = $this->input->post->get('return', null, 'base64');

$redirect = '';
Expand Down Expand Up @@ -109,7 +114,7 @@ public function execute()
switch ($this->options[3])
{
case 'apply':
$this->app->enqueueMessage(JText::_('COM_CONFIG_SAVE_SUCCESS'));
$this->app->enqueueMessage(JText::_('COM_CONFIG_SAVE_SUCCESS'), 'message');
$this->app->redirect(JRoute::_('index.php?option=com_config&view=component&component=' . $option . $redirect, false));

break;
Expand All @@ -123,6 +128,12 @@ public function execute()
$redirect = base64_decode($returnUri);
}

// Don't redirect to an external URL.
if (!JUri::isInternal($redirect))
{
$redirect = JUri::base();
}

$this->app->redirect(JRoute::_($redirect, false));

break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package Joomla.Site
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

Expand Down
Loading

0 comments on commit 781341e

Please sign in to comment.