-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8572 from RonakParmar/8470_help_site_link_per_user
#8470 fixed help site link per user issue
- Loading branch information
Showing
7 changed files
with
91 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
administrator/components/com_users/controllers/profile.json.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
/** | ||
* @package Joomla.Administrator | ||
* @subpackage com_users | ||
* | ||
* @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; | ||
|
||
require_once JPATH_SITE . '/components/com_users/controllers/profile_base_json.php'; | ||
|
||
/** | ||
* Profile controller class for Users. | ||
* | ||
* @since 3.5 | ||
*/ | ||
class UsersControllerProfile extends UsersControllerProfile_Base_Json | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,7 @@ | ||
<?xml version="1.0" encoding="iso-8859-1"?> | ||
<joshelp> | ||
<sites> | ||
<site | ||
tag="en-GB" | ||
url="https://help.joomla.org/proxy/index.php?option=com_help&keyref=Help{major}{minor}:{keyref}">English (GB) - Joomla help wiki</site> | ||
<site | ||
tag="fr-FR" | ||
url="http://help.joomla.fr/3/index.php?option=com_help&keyref=Help{major}{minor}:{keyref}">Français (FR) - Aide de Joomla!</site> | ||
<site tag="en-GB" url="https://help.joomla.org/proxy/index.php?option=com_help&keyref=Help{major}{minor}:{keyref}">English (GB) - Joomla help wiki</site> | ||
<site tag="fr-FR" url="http://help.joomla.fr/3/index.php?option=com_help&keyref=Help{major}{minor}:{keyref}">Français (FR) - Aide de Joomla!</site> | ||
</sites> | ||
</joshelp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
/** | ||
* @package Joomla.Site | ||
* @subpackage com_users | ||
* | ||
* @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; | ||
|
||
/** | ||
* Profile controller class for Users. | ||
* | ||
* @since 3.5 | ||
*/ | ||
class UsersControllerProfile_Base_Json extends JControllerLegacy | ||
{ | ||
/** | ||
* Returns the updated options for help site selector | ||
* | ||
* @return void | ||
* | ||
* @since 3.5 | ||
* @throws Exception | ||
*/ | ||
public function gethelpsites() | ||
{ | ||
jimport('joomla.filesystem.file'); | ||
|
||
// Set FTP credentials, if given | ||
JClientHelper::setCredentialsFromRequest('ftp'); | ||
|
||
if (($data = file_get_contents('http://update.joomla.org/helpsites/helpsites.xml')) === false) | ||
{ | ||
throw new Exception(JText::_('COM_CONFIG_ERROR_HELPREFRESH_FETCH'), 500); | ||
} | ||
elseif (!JFile::write(JPATH_ADMINISTRATOR . '/help/helpsites.xml', $data)) | ||
{ | ||
throw new Exception(JText::_('COM_CONFIG_ERROR_HELPREFRESH_ERROR_STORE'), 500); | ||
} | ||
|
||
$options = array_merge( | ||
array( | ||
JHtml::_('select.option', '', JText::_('JOPTION_USE_DEFAULT')) | ||
), | ||
JHelp::createSiteList(JPATH_ADMINISTRATOR . '/help/helpsites.xml') | ||
); | ||
|
||
echo json_encode($options); | ||
JFactory::getApplication()->close(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters