- md5
- 8787f92a3ee51db3663d1ee3fc88bb56
- sha1
- debe5bb85b7a2cba8128286fc83cfaf2a5214ecb
- sha256
- a8e1c508bdf5e4811dbba5036f58e7df406386eea525805306d75e33a1f985c2
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
<?php
/**
* @package Joomla.Administrator
* @subpackage com_config
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Refresh Help Controller for global configuration
*
* @since 3.2
*/
class ConfigControllerApplicationRefreshhelp extends JControllerBase
{
/**
* Application object - Redeclared for proper typehinting
*
* @var JApplicationCms
* @since 3.2
*/
protected $app;
/**
* Method to refresh help in global configuration.
*
* @return boolean True on success.
*
* @since 3.2
*/
public function execute()
{
jimport('joomla.filesystem.file');
// Set FTP credentials, if given
JClientHelper::setCredentialsFromRequest('ftp');
if (($data = file_get_contents('http://help.joomla.org/helpsites.xml')) === false)
{
$this->app->enqueueMessage(JText::_('COM_CONFIG_ERROR_HELPREFRESH_FETCH'), 'error');
$this->app->redirect(JRoute::_('index.php?option=com_config', false));
}
elseif (!JFile::write(JPATH_BASE . '/help/helpsites.xml', $data))
{
$this->app->enqueueMessage(JText::_('COM_CONFIG_ERROR_HELPREFRESH_ERROR_STORE'), 'error');
$this->app->redirect(JRoute::_('index.php?option=com_config', false));
}
else
{
$this->app->enqueueMessage(JText::_('COM_CONFIG_HELPREFRESH_SUCCESS'), 'error');
$this->app->redirect(JRoute::_('index.php?option=com_config', false));
}
}
}
The same content is in 20 releases, Joomla 3.4.0-beta1 to 3.5.0-beta. See them all, or every version of this file.