Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

# [#29714] Code style fixes based on Jenkins, replace uses of JRequest.

Thanks Michael.
  • Loading branch information...
commit b8583c4c0e28540fc89dfc240efa6950ba133e81 1 parent e2ffca9
@mbabker mbabker authored infograf768 committed
View
30 administrator/components/com_installer/views/update/view.html.php
@@ -88,16 +88,30 @@ protected function addToolbar()
JToolbarHelper::help('JHELP_EXTENSIONS_EXTENSION_MANAGER_UPDATE');
JHtmlSidebar::setAction('index.php?option=com_installer&view=manage');
- JHtmlSidebar::addFilter(JText::_('COM_INSTALLER_VALUE_CLIENT_SELECT'), 'filter_client_id',
- JHtml::_('select.options', array('0' => 'JSITE', '1' => 'JADMINISTRATOR'), 'value', 'text', $this->state->get('filter.client_id'), true));
+ JHtmlSidebar::addFilter(
+ JText::_('COM_INSTALLER_VALUE_CLIENT_SELECT'),
+ 'filter_client_id',
+ JHtml::_('select.options', array('0' => 'JSITE', '1' => 'JADMINISTRATOR'), 'value', 'text', $this->state->get('filter.client_id'), true)
+ );
- JHtmlSidebar::addFilter(JText::_('COM_INSTALLER_VALUE_TYPE_SELECT'), 'filter_type',
- JHtml::_('select.options', InstallerHelper::getExtensionTypes(), 'value', 'text', $this->state->get('filter.type'), true));
+ JHtmlSidebar::addFilter(
+ JText::_('COM_INSTALLER_VALUE_TYPE_SELECT'),
+ 'filter_type',
+ JHtml::_('select.options', InstallerHelper::getExtensionTypes(), 'value', 'text', $this->state->get('filter.type'), true)
+ );
- JHtmlSidebar::addFilter(JText::_('COM_INSTALLER_VALUE_FOLDER_SELECT'), 'filter_group',
- JHtml::_('select.options',
- array_merge(InstallerHelper::getExtensionGroupes(), array('*' => JText::_('COM_INSTALLER_VALUE_FOLDER_NONAPPLICABLE'))), 'value',
- 'text', $this->state->get('filter.group'), true));
+ JHtmlSidebar::addFilter(
+ JText::_('COM_INSTALLER_VALUE_FOLDER_SELECT'),
+ 'filter_group',
+ JHtml::_(
+ 'select.options',
+ array_merge(InstallerHelper::getExtensionGroupes(), array('*' => JText::_('COM_INSTALLER_VALUE_FOLDER_NONAPPLICABLE'))),
+ 'value',
+ 'text',
+ $this->state->get('filter.group'),
+ true
+ )
+ );
parent::addToolbar();
}
}
View
8 administrator/components/com_menus/views/item/tmpl/edit_options.php
@@ -15,7 +15,7 @@
$i = 0;
foreach ($fieldSets as $name => $fieldSet):
- if (!($this->item->link == 'index.php?option=com_wrapper&view=wrapper' && $fieldSet->name == 'request')):
+ if (!($this->item->link == 'index.php?option=com_wrapper&view=wrapper' && $fieldSet->name == 'request')):
$label = !empty($fieldSet->label) ? $fieldSet->label : 'COM_MENUS_'.$name.'_FIELDSET_LABEL';
echo JHtml::_('bootstrap.addSlide', 'menuOptions', JText::_($label), 'collapse' . $i++);
if (isset($fieldSet->description) && trim($fieldSet->description)) :
@@ -23,16 +23,16 @@
endif;
?>
<?php foreach ($this->form->getFieldset($name) as $field) : ?>
-
+
<div class="control-group">
-
+
<div class="control-label">
<?php echo $field->label; ?>
</div>
<div class="controls">
<?php echo $field->input; ?>
</div>
-
+
</div>
<?php endforeach;
echo JHtml::_('bootstrap.endSlide');
View
9 administrator/templates/hathor/html/com_users/user/edit.php
@@ -1,9 +1,10 @@
<?php
/**
- * @package Joomla.Administrator
- * @subpackage com_users
- * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
- * @license GNU General Public License version 2 or later; see LICENSE.txt
+ * @package Joomla.Administrator
+ * @subpackage Template.hathor
+ *
+ * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
View
3  installation/CHANGELOG
@@ -26,6 +26,9 @@ $ -> Language fix or change
- -> Removed
! -> Note
+19-Nov-2012 Jean-Marie Simonet
+ # [#29714] Code style fixes based on Jenkins, replace uses of JRequest. Thanks Michael.
+
18-Nov-2012 Jean-Marie Simonet
# [#29684] Wrong HTML markup on category edit. Thanks Ofer
# [#29528] Incorrect arrows in table heading. Thanks Dennis
View
17 installation/controller.php
@@ -26,11 +26,10 @@ class InstallationController extends JControllerLegacy
*
* @since 1.5
*/
- public function display($cachable = false, $urlparams = false)
+ public function display($cachable = false, $urlparams = array())
{
-
// Get the current URI to redirect to.
- $uri = JURI::getInstance();
+ $uri = JUri::getInstance();
$redirect = base64_encode($uri);
// Get the document object.
@@ -57,27 +56,31 @@ public function display($cachable = false, $urlparams = false)
}
$view = $this->getView($vName, $vFormat);
+
if ($view)
{
$checkOptions = null;
switch ($vName)
{
case 'preinstall':
- $model = $this->getModel('Setup', 'InstallationModel', array('dbo' => null));
- $sufficient = $model->getPhpOptionsSufficient();
+ $model = $this->getModel('Setup', 'InstallationModel', array('dbo' => null));
+ $sufficient = $model->getPhpOptionsSufficient();
$checkOptions = false;
+
if ($sufficient)
{
$this->setRedirect('index.php');
}
break;
+
case 'languages':
case 'defaultlanguage':
$model = $this->getModel('Languages', 'InstallationModel', array('dbo' => null));
break;
+
default:
- $model = $this->getModel('Setup', 'InstallationModel', array('dbo' => null));
- $sufficient = $model->getPhpOptionsSufficient();
+ $model = $this->getModel('Setup', 'InstallationModel', array('dbo' => null));
+ $sufficient = $model->getPhpOptionsSufficient();
$checkOptions = true;
if (!$sufficient)
{
View
54 installation/controllers/languages.json.php
@@ -5,12 +5,13 @@
* @copyright Copyright (C) 2005 - 2012 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 __DIR__ . '/setup.json.php';
+JLoader::register('InstallationControllerSetup', __DIR__ . '/setup.json.php');
/**
- * Setup controller for the Joomla Core Installer.
+ * Setup controller for the Joomla Core Installer Languages feature.
* - JSON Protocol -
*
* @package Joomla.Installation
@@ -18,9 +19,15 @@
*/
class InstallationControllerLanguages extends InstallationControllerSetup
{
+ /**
+ * Constructor.
+ *
+ * @param array $config An optional associative array of configuration settings.
+ *
+ * @since 3.0
+ */
public function __construct($config = array())
{
-
// Overrides application config and set the configuration.php file so tokens and database works
JFactory::$config = null;
JFactory::getConfig(JPATH_SITE . '/configuration.php');
@@ -28,51 +35,48 @@ public function __construct($config = array())
parent::__construct();
}
-
/**
* Method to install languages to Joomla application.
*
* @return void
- * @since 3.x.x
+ *
+ * @since 3.0
*/
public function installLanguages()
{
-
// Check for a valid token. If invalid, send a 403 with the error message.
JSession::checkToken() or $this->sendResponse(new Exception(JText::_('JINVALID_TOKEN'), 403));
// Get the application object.
$app = JFactory::getApplication();
-
// Get array of selected languages
- $lids = $this->input->get('cid', array(), 'array');
+ $lids = $this->input->get('cid', array(), 'array');
JArrayHelper::toInteger($lids, array());
// Get the languages model.
$model = $this->getModel('Languages', 'InstallationModel');
$return = false;
+
if (!$lids)
{
-
// No languages have been selected
$app->enqueueMessage(JText::_('INSTL_LANGUAGES_NO_LANGUAGE_SELECTED'));
}
else
{
-
// Install selected languages
- $return = $model->install($lids);
+ $return = $model->install($lids);
}
$r = new stdClass;
// Check for validation errors.
- if ($return === false) {
-
+ if ($return === false)
+ {
// Get the validation messages.
- $errors = $model->getErrors();
+ $errors = $model->getErrors();
// Push up to three validation messages out to the user.
for ($i = 0, $n = count($errors); $i < $n && $i < 3; $i++)
@@ -102,7 +106,9 @@ public function installLanguages()
/**
* Set the selected language as the main language to the Joomla! administrator
*
- * @since X.x.x
+ * @return void
+ *
+ * @since 3.0
*/
function setDefaultLanguage()
{
@@ -113,7 +119,7 @@ function setDefaultLanguage()
$model = $this->getModel('Languages', 'InstallationModel');
// Check for request forgeries
- $admin_lang = JRequest::getString('administratorlang', false);
+ $admin_lang = $this->input->getString('administratorlang', false);
// Check that is an Lang ISO Code avoiding any injection.
if (!preg_match('/^[a-z]{2}(\-[A-Z]{2})?$/', $admin_lang))
@@ -122,22 +128,20 @@ function setDefaultLanguage()
}
$app = JFactory::getApplication();
- $r = new stdClass;
+ $r = new stdClass;
- if (!$model->setDefault($admin_lang, "administrator"))
+ if (!$model->setDefault($admin_lang, 'administrator'))
{
-
// Create a error response message.
- $app->enqueueMessage(JText::_('INSTL_DEFAULTLANGUAGE_ADMIN_COULDNT_SET_DEFAULT'), "error");
+ $app->enqueueMessage(JText::_('INSTL_DEFAULTLANGUAGE_ADMIN_COULDNT_SET_DEFAULT'), 'error');
}
else
{
-
// Create a response body.
$app->enqueueMessage(JText::sprintf('INSTL_DEFAULTLANGUAGE_ADMIN_SET_DEFAULT', $admin_lang));
}
- $frontend_lang = JRequest::getString('frontendlang', false);
+ $frontend_lang = $this->input->getString('frontendlang', false);
// check that is an Lang ISO Code avoiding any injection.
if (!preg_match('/^[a-z]{2}(\-[A-Z]{2})?$/', $frontend_lang))
@@ -145,15 +149,13 @@ function setDefaultLanguage()
$frontend_lang = 'en-GB';
}
- if (!$model->setDefault($frontend_lang, "site"))
+ if (!$model->setDefault($frontend_lang, 'site'))
{
-
// Create a error response message.
- $app->enqueueMessage(JText::_('INSTL_DEFAULTLANGUAGE_FRONTEND_COULDNT_SET_DEFAULT'), "error");
+ $app->enqueueMessage(JText::_('INSTL_DEFAULTLANGUAGE_FRONTEND_COULDNT_SET_DEFAULT'), 'error');
}
else
{
-
// Create a response body.
$app->enqueueMessage(JText::sprintf('INSTL_DEFAULTLANGUAGE_FRONTEND_SET_DEFAULT', $frontend_lang));
}
View
3  installation/controllers/setup.json.php
@@ -26,7 +26,6 @@ class InstallationControllerSetup extends JControllerLegacy
*/
public function setlanguage()
{
-
// Check for request forgeries.
JSession::checkToken() or $this->sendResponse(new Exception(JText::_('JINVALID_TOKEN'), 403));
@@ -63,7 +62,6 @@ public function setlanguage()
// Check for validation errors.
if ($return === false)
{
-
// Get the validation messages.
$errors = $model->getErrors();
@@ -83,6 +81,7 @@ public function setlanguage()
// Redirect to the page.
$r->view = $this->input->getWord('view', 'site');
$this->sendResponse($r);
+
return false;
}
View
160 installation/models/languages.php
@@ -20,33 +20,39 @@
*/
class InstallationModelLanguages extends JModelLegacy
{
-
/**
- * @var object client object
+ * @var object Client object
+ * @since 3.0
*/
protected $client = null;
/**
- * @var array languages description
+ * @var array Languages description
+ * @since 3.0
*/
protected $data = null;
/**
- * @var string language path
+ * @var string Language path
+ * @since 3.0
*/
protected $path = null;
/**
- * @var int total number of languages installed
+ * @var integer Total number of languages installed
+ * @since 3.0
*/
protected $langlist = null;
/**
- * Constructor, deletes the default installation config file and recreates it with the good config file.
+ * Constructor
+ *
+ * Deletes the default installation config file and recreates it with the good config file.
+ *
+ * @since 3.0
*/
public function __construct()
{
-
// Overrides application config and set the configuration.php file so tokens and database works
JFactory::$config = null;
JFactory::getConfig(JPATH_SITE . '/configuration.php');
@@ -58,7 +64,9 @@ public function __construct()
/**
* Generate a list of language choices to install in the Joomla CMS
*
- * @return boolean True if successful
+ * @return boolean True if successful
+ *
+ * @since 3.0
*/
public function getItems()
{
@@ -98,52 +106,50 @@ public function getItems()
*/
public function install($lids)
{
-
- $app = JFactory::getApplication();
- $installer = JInstaller::getInstance();
+ $app = JFactory::getApplication();
+ $installer = JInstaller::getInstance();
// Loop through every selected language
foreach ($lids as $id)
{
-
// Loads the update database object that represents the language
$language = JTable::getInstance('update');
$language->load($id);
// Get the url to the XML manifest file of the selected language
- $remote_manifest = $this->_getLanguageManifest($id);
+ $remote_manifest = $this->getLanguageManifest($id);
+
if (!$remote_manifest)
{
-
// Could not find the url, the information in the update server may be corrupt
- $message = JText::sprintf('INSTL_DEFAULTLANGUAGE_COULD_NOT_INSTALL_LANGUAGE', $language->name);
- $message .= ' ' . JText::_('INSTL_DEFAULTLANGUAGE_TRY_LATER');
+ $message = JText::sprintf('INSTL_DEFAULTLANGUAGE_COULD_NOT_INSTALL_LANGUAGE', $language->name);
+ $message .= ' ' . JText::_('INSTL_DEFAULTLANGUAGE_TRY_LATER');
$app->enqueueMessage($message);
continue;
}
// Based on the language XML manifest get the url of the package to download
- $package_url = $this->_getPackageUrl($remote_manifest);
+ $package_url = $this->getPackageUrl($remote_manifest);
+
if (!$package_url)
{
// Could not find the url , maybe the url is wrong in the update server, or there is not internet access
- $message = JText::sprintf('INSTL_DEFAULTLANGUAGE_COULD_NOT_INSTALL_LANGUAGE', $language->name);
- $message .= ' ' . JText::_('INSTL_DEFAULTLANGUAGE_TRY_LATER');
+ $message = JText::sprintf('INSTL_DEFAULTLANGUAGE_COULD_NOT_INSTALL_LANGUAGE', $language->name);
+ $message .= ' ' . JText::_('INSTL_DEFAULTLANGUAGE_TRY_LATER');
$app->enqueueMessage($message);
continue;
}
// Download the package to the tmp folder
- $package = $this->_downloadPackage($package_url);
+ $package = $this->downloadPackage($package_url);
// Install the package
if (!$installer->install($package['dir']))
{
-
// There was an error installing the package
- $message = JText::sprintf('INSTL_DEFAULTLANGUAGE_COULD_NOT_INSTALL_LANGUAGE', $language->name);
- $message .= ' ' . JText::_('INSTL_DEFAULTLANGUAGE_TRY_LATER');
+ $message = JText::sprintf('INSTL_DEFAULTLANGUAGE_COULD_NOT_INSTALL_LANGUAGE', $language->name);
+ $message .= ' ' . JText::_('INSTL_DEFAULTLANGUAGE_TRY_LATER');
$app->enqueueMessage($message);
continue;
}
@@ -159,22 +165,24 @@ public function install($lids)
// Delete the installed language from the list
$language->delete($id);
}
- return true;
+ return true;
}
/**
* Gets the manifest file of a selected language from a the language list in a update server.
*
- * @param int $uid the id of the language in the #__updates table
+ * @param integer $uid The id of the language in the #__updates table
*
- * @return string
+ * @return string
+ *
+ * @since 3.0
*/
- protected function _getLanguageManifest($uid)
+ protected function getLanguageManifest($uid)
{
- $instance = JTable::getInstance('update');
+ $instance = JTable::getInstance('update');
$instance->load($uid);
- $detailurl = trim($instance->detailsurl);
+ $detailurl = trim($instance->detailsurl);
return $detailurl;
}
@@ -184,9 +192,11 @@ protected function _getLanguageManifest($uid)
*
* @param string $remote_manifest url to the manifest XML file of the remote package
*
- * @return string|bool
+ * @return string|bool
+ *
+ * @since 3.0
*/
- protected function _getPackageUrl($remote_manifest)
+ protected function getPackageUrl($remote_manifest)
{
$update = new JUpdate;
$update->loadFromXML($remote_manifest);
@@ -200,11 +210,12 @@ protected function _getPackageUrl($remote_manifest)
*
* @param string $url url of the package
*
- * @return array|bool Package details or false on failure
+ * @return array|bool Package details or false on failure
+ *
+ * @since 3.0
*/
- protected function _downloadPackage($url)
+ protected function downloadPackage($url)
{
-
// Download the package from the given URL
$p_file = JInstallerHelper::downloadPackage($url);
@@ -227,7 +238,9 @@ protected function _downloadPackage($url)
/**
* Method to get Languages item data for the Administrator
*
- * @return array
+ * @return array
+ *
+ * @since 3.0
*/
public function getInstalledlangsAdministrator()
{
@@ -237,7 +250,9 @@ public function getInstalledlangsAdministrator()
/**
* Method to get Languages item data for the Frontend
*
- * @return array
+ * @return array
+ *
+ * @since 3.0
*/
public function getInstalledlangsFrontend()
{
@@ -249,27 +264,29 @@ public function getInstalledlangsFrontend()
*
* @param string $cms_client name of the cms client
*
- * @return array
+ * @return array
+ *
+ * @since 3.0
*/
- private function getInstalledlangs($cms_client = 'administrator')
+ protected function getInstalledlangs($cms_client = 'administrator')
{
-
// Get information
- $path = $this->_getPath();
- $client = $this->_getClient($cms_client);
- $langlist = $this->_getLanguageList($client->id);
+ $path = $this->getPath();
+ $client = $this->getClient($cms_client);
+ $langlist = $this->getLanguageList($client->id);
// Compute all the languages
- $data = array ();
+ $data = array();
foreach ($langlist as $lang)
{
$file = $path . '/' . $lang . '/' . $lang . '.xml';
- $info = JApplicationHelper::parseXMLLangMetaFile($file);
+ $info = JInstaller::parseXMLInstallFile($file);
$row = new stdClass;
$row->language = $lang;
- if (!is_array($info)) {
+ if (!is_array($info))
+ {
continue;
}
@@ -280,11 +297,13 @@ private function getInstalledlangs($cms_client = 'administrator')
// If current then set published
$params = JComponentHelper::getParams('com_languages');
+
if ($params->get($client->name, 'en-GB') == $row->language)
{
$row->published = 1;
}
- else {
+ else
+ {
$row->published = 0;
}
@@ -292,7 +311,7 @@ private function getInstalledlangs($cms_client = 'administrator')
$data[] = $row;
}
- usort($data, array($this, '_compareLanguages'));
+ usort($data, array($this, 'compareLanguages'));
return $data;
}
@@ -300,11 +319,14 @@ private function getInstalledlangs($cms_client = 'administrator')
/**
* Method to get installed languages data.
*
- * @return string An SQL query
+ * @param integer $client_id The client ID to retrieve data for
+ *
+ * @return object The language data
+ *
+ * @since 3.0
*/
- protected function _getLanguageList($client_id = 1)
+ protected function getLanguageList($client_id = 1)
{
-
// Create a new db object.
$db = $this->getDbo();
$query = $db->getQuery(true);
@@ -331,24 +353,27 @@ protected function _getLanguageList($client_id = 1)
* @param object $lang1 the first language
* @param object $lang2 the second language
*
- * @return integer
+ * @return integer
+ *
+ * @since 3.0
*/
- protected function _compareLanguages($lang1, $lang2)
+ protected function compareLanguages($lang1, $lang2)
{
return strcmp($lang1->name, $lang2->name);
}
-
/**
* Method to get the path
*
- * @return string The path to the languages folders
+ * @return string The path to the languages folders
+ *
+ * @since 3.0
*/
- protected function _getPath()
+ protected function getPath()
{
if (is_null($this->path))
{
- $client = $this->_getClient();
+ $client = $this->getClient();
$this->path = JLanguage::getLanguagePath($client->path);
}
@@ -360,14 +385,17 @@ protected function _getPath()
*
* @param string $client name of the client object
*
- * @return object
+ * @return object
+ *
+ * @since 3.0
*/
- protected function _getClient( $client = null )
+ protected function getClient($client = null)
{
if (null == $this->client)
{
$this->client = JApplicationHelper::getClientInfo('administrator', true);
}
+
if ($client)
{
$this->client = JApplicationHelper::getClientInfo($client, true);
@@ -379,10 +407,12 @@ protected function _getClient( $client = null )
/**
* Method to set the default language.
*
- * @param int $language_id The Id of the language to be set as default
- * @param string $cms_client The name of the CMS client
+ * @param integer $language_id The Id of the language to be set as default
+ * @param string $cms_client The name of the CMS client
*
- * @return bool
+ * @return boolean
+ *
+ * @since 3.0
*/
public function setDefault($language_id = null, $cms_client = "administrator")
{
@@ -391,13 +421,13 @@ public function setDefault($language_id = null, $cms_client = "administrator")
return false;
}
- $client = $this->_getClient($cms_client);
+ $client = $this->getClient($cms_client);
$params = JComponentHelper::getParams('com_languages');
$params->set($client->name, $language_id);
$table = JTable::getInstance('extension');
- $id = $table->find(array('element' => 'com_languages'));
+ $id = $table->find(array('element' => 'com_languages'));
// Load
if (!$table->load($id))
@@ -428,7 +458,9 @@ public function setDefault($language_id = null, $cms_client = "administrator")
/**
* Get the current setup options from the session.
*
- * @return array
+ * @return array
+ *
+ * @since 3.0
*/
public function getOptions()
{
View
1  installation/views/defaultlanguage/tmpl/default.php
@@ -1,6 +1,7 @@
<?php
/**
* @package Joomla.Installation
+ *
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
View
13 installation/views/defaultlanguage/view.html.php
@@ -1,17 +1,18 @@
<?php
/**
- * @package Joomla.Installation
- * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
- * @license GNU General Public License version 2 or later; see LICENSE.txt
+ * @package Joomla.Installation
+ *
+ * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
- * The HTML Joomla Core License View
+ * The HTML Joomla Core Default Language View
*
- * @package Joomla.Installation
- * @since 3.0
+ * @package Joomla.Installation
+ * @since 3.0
*/
class InstallationViewDefaultlanguage extends JViewLegacy
{
View
1  installation/views/languages/tmpl/default.php
@@ -1,6 +1,7 @@
<?php
/**
* @package Joomla.Installation
+ *
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
View
9 installation/views/languages/view.html.php
@@ -1,14 +1,15 @@
<?php
/**
- * @package Joomla.Installation
- * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
- * @license GNU General Public License version 2 or later; see LICENSE.txt
+ * @package Joomla.Installation
+ *
+ * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
+ * @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
- * The HTML Joomla Core License View
+ * The HTML Joomla Core Languages View
*
* @package Joomla.Installation
* @since 3.0
View
3  libraries/joomla/installer/helper.php
@@ -46,11 +46,12 @@ public static function downloadPackage($url, $target = false)
$http = JHttpFactory::getHttp();
$response = $http->get($url);
+
if (302 == $response->code && isset($response->headers['Location']))
{
return self::downloadPackage($response->headers['Location']);
}
- else if (200 != $response->code)
+ elseif (200 != $response->code)
{
JLog::add(JText::_('JLIB_INSTALLER_ERROR_DOWNLOAD_SERVER_CONNECT'), JLog::WARNING, 'jerror');
return false;
View
3  libraries/joomla/updater/update.php
@@ -202,7 +202,7 @@ public function _startElement($parser, $name, $attrs = array())
if (!isset($this->currentUpdate->$name))
{
- $this->currentUpdate->$name = new stdClass();
+ $this->currentUpdate->$name = new stdClass;
}
$this->currentUpdate->$name->_data = '';
@@ -235,6 +235,7 @@ public function _endElement($parser, $name)
case 'UPDATE':
$ver = new JVersion;
$product = strtolower(JFilterInput::getInstance()->clean($ver->PRODUCT, 'cmd'));
+
// Check for optional min_dev_level and max_dev_level attributes to further specify targetplatform (e.g., 3.0.1)
if (isset($this->currentUpdate->targetplatform->name)
&& $product == $this->currentUpdate->targetplatform->name
View
2  plugins/system/languagefilter/languagefilter.php
@@ -535,7 +535,9 @@ public function onAfterDispatch()
foreach (JLanguageHelper::getLanguages() as $language)
{
if (!JLanguage::exists($language->lang_code))
+ {
continue;
+ }
$item = $menu->getDefault($language->lang_code);
Please sign in to comment.
Something went wrong with that request. Please try again.