Source for file profile.json.php

Documentation is available at profile.json.php

  1. <?php
  2. /**
  3.  * @package     Joomla.Site
  4.  * @subpackage  com_users
  5.  *
  6.  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
  7.  * @license     GNU General Public License version 2 or later; see LICENSE.txt
  8.  */
  9.  
  10. defined('_JEXEC'or die;
  11.  
  12. require_once JPATH_COMPONENT.'/controller.php';
  13.  
  14. /**
  15.  * Profile controller class for Users.
  16.  *
  17.  * @package     Joomla.Site
  18.  * @subpackage  com_users
  19.  * @since       1.6
  20.  */
  21. {
  22.     /**
  23.      * Returns the updated options for help site selector
  24.      *
  25.      * @return  void 
  26.      *
  27.      * @since   3.2
  28.      * @throws  Exception
  29.      */
  30.     public function gethelpsites()
  31.     {
  32.         jimport('joomla.filesystem.file');
  33.  
  34.         // Set FTP credentials, if given
  35.         JClientHelper::setCredentialsFromRequest('ftp');
  36.  
  37.         if (($data file_get_contents('http://update.joomla.org/helpsites/helpsites.xml')) === false)
  38.         {
  39.             throw new Exception(JText::_('COM_CONFIG_ERROR_HELPREFRESH_FETCH')500);
  40.         }
  41.         elseif (!JFile::write(JPATH_ADMINISTRATOR '/help/helpsites.xml'$data))
  42.         {
  43.             throw new Exception(JText::_('COM_CONFIG_ERROR_HELPREFRESH_ERROR_STORE')500);
  44.         }
  45.  
  46.         $options JHelp::createSiteList(JPATH_ADMINISTRATOR '/help/helpsites.xml');
  47.         echo json_encode($options);
  48.         JFactory::getApplication()->close();
  49.     }
  50. }

Documentation generated on Tue, 19 Nov 2013 15:11:14 +0100 by phpDocumentor 1.4.3