CoreFiles by mySites.guru
refreshhelp.php59 lines, 1,587 bytes, from Joomla_3.2.0-Stable-Full_Package.zip
Raw History Compare with 3.1.6
md5
ec211a7702839333dec3d112b675b595
sha1
02b4df5d3b4cf2217b3fda54445c20257704bff5
sha256
3eb9872e94cd78aa4048cf3e7d4c86c1b414de31fd20fae624a81589bc81ee30
<?php
/**
 * @package     Joomla.Administrator
 * @subpackage  com_config
 *
 * @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;

/**
 * Refresh Help Controller for global configuration
 *
 * @package     Joomla.Administrator
 * @subpackage  com_config
 * @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 2 releases, Joomla 3.2.0 to 3.2.1. See them all, or every version of this file.