diff --git a/administrator/components/com_categories/src/Model/CategoriesModel.php b/administrator/components/com_categories/src/Model/CategoriesModel.php
index 8eb7b2ab901e6..271a585f06289 100644
--- a/administrator/components/com_categories/src/Model/CategoriesModel.php
+++ b/administrator/components/com_categories/src/Model/CategoriesModel.php
@@ -249,8 +249,8 @@ protected function getListQuery()
$categoryId = $categoryId ? [$categoryId] : [];
}
- // Case: Using both categories filter and by level filter
if (\count($categoryId)) {
+ // Case: Using both categories filter and by level filter
$categoryTable = Table::getInstance('Category', 'JTable');
$subCatItemsWhere = [];
@@ -264,8 +264,8 @@ protected function getListQuery()
$query->where('(' . implode(' OR ', $subCatItemsWhere) . ')');
- // Case: Using only the by level filter
} elseif ($level) {
+ // Case: Using only the by level filter
$query->where($db->quoteName('a.level') . ' <= :level')
->bind(':level', $level, ParameterType::INTEGER);
}
diff --git a/administrator/components/com_finder/src/Indexer/Adapter.php b/administrator/components/com_finder/src/Indexer/Adapter.php
index 4bc1d54a41ca0..f398751b16d3d 100644
--- a/administrator/components/com_finder/src/Indexer/Adapter.php
+++ b/administrator/components/com_finder/src/Indexer/Adapter.php
@@ -922,20 +922,20 @@ protected function translateState($item, $category = null)
// Translate the state
switch ($item) {
- // Published items should always show up in search results
case 1:
+ // Published items should always show up in search results
return 1;
- // Archived items should only show up when option is enabled
case 2:
+ // Archived items should only show up when option is enabled
if ($this->params->get('search_archived', 1) == 0) {
return 0;
}
return 1;
- // All other states should return an unpublished state
default:
+ // All other states should return an unpublished state
return 0;
}
}
diff --git a/administrator/components/com_finder/src/Indexer/DebugAdapter.php b/administrator/components/com_finder/src/Indexer/DebugAdapter.php
index 98d2d52c03354..b389c897aa040 100644
--- a/administrator/components/com_finder/src/Indexer/DebugAdapter.php
+++ b/administrator/components/com_finder/src/Indexer/DebugAdapter.php
@@ -920,13 +920,13 @@ protected function translateState($item, $category = null)
// Translate the state
switch ($item) {
- // Published and archived items only should return a published state
case 1:
case 2:
+ // Published and archived items only should return a published state
return 1;
- // All other states should return an unpublished state
default:
+ // All other states should return an unpublished state
return 0;
}
}
diff --git a/administrator/components/com_finder/src/Indexer/Query.php b/administrator/components/com_finder/src/Indexer/Query.php
index ea893430082a2..7a92521c3a1a6 100644
--- a/administrator/components/com_finder/src/Indexer/Query.php
+++ b/administrator/components/com_finder/src/Indexer/Query.php
@@ -794,9 +794,9 @@ protected function processString($input, $lang, $mode)
// Now we have to handle the filter string.
switch ($modifier) {
- // Handle a before and after date filters.
case 'before':
case 'after':
+ // Handle a before and after date filters.
// Get the time offset.
$offset = Factory::getApplication()->get('offset');
@@ -820,8 +820,8 @@ protected function processString($input, $lang, $mode)
break;
- // Handle a taxonomy branch filter.
default:
+ // Handle a taxonomy branch filter.
// Try to find the node id.
$return = Taxonomy::getNodeByTitle($modifier, $value);
diff --git a/administrator/components/com_installer/src/Model/UpdateModel.php b/administrator/components/com_installer/src/Model/UpdateModel.php
index 81d27386d15ef..21555b68ce574 100644
--- a/administrator/components/com_installer/src/Model/UpdateModel.php
+++ b/administrator/components/com_installer/src/Model/UpdateModel.php
@@ -552,8 +552,8 @@ protected function loadFormData()
protected function preparePreUpdate($update, $table)
{
switch ($table->type) {
- // Components could have a helper which adds additional data
case 'component':
+ // Components could have a helper which adds additional data
$ename = str_replace('com_', '', $table->element);
$fname = $ename . '.php';
$cname = ucfirst($ename) . 'Helper';
@@ -570,8 +570,8 @@ protected function preparePreUpdate($update, $table)
break;
- // Modules could have a helper which adds additional data
case 'module':
+ // Modules could have a helper which adds additional data
$cname = str_replace('_', '', $table->element) . 'Helper';
$path = ($table->client_id ? JPATH_ADMINISTRATOR : JPATH_SITE) . '/modules/' . $table->element . '/helper.php';
@@ -585,9 +585,9 @@ protected function preparePreUpdate($update, $table)
break;
+ case 'plugin':
// If we have a plugin, we can use the plugin trigger "onInstallerBeforePackageDownload"
// But we should make sure, that our plugin is loaded, so we don't need a second "installer" plugin
- case 'plugin':
$cname = str_replace('plg_', '', $table->element);
PluginHelper::importPlugin($table->folder, $cname);
break;
diff --git a/administrator/components/com_joomlaupdate/src/Model/UpdateModel.php b/administrator/components/com_joomlaupdate/src/Model/UpdateModel.php
index c0da77051db72..b77ef7e498542 100644
--- a/administrator/components/com_joomlaupdate/src/Model/UpdateModel.php
+++ b/administrator/components/com_joomlaupdate/src/Model/UpdateModel.php
@@ -88,19 +88,19 @@ public function applyUpdateSite()
$params = ComponentHelper::getParams('com_joomlaupdate');
switch ($params->get('updatesource', 'nochange')) {
- // "Minor & Patch Release for Current version AND Next Major Release".
case 'next':
+ // "Minor & Patch Release for Current version AND Next Major Release".
$updateURL = 'https://update.joomla.org/core/sts/list_sts.xml';
break;
- // "Testing"
case 'testing':
+ // "Testing"
$updateURL = 'https://update.joomla.org/core/test/list_test.xml';
break;
+ case 'custom':
// "Custom"
// @todo: check if the customurl is valid and not just "not empty".
- case 'custom':
if (trim($params->get('customurl', '')) != '') {
$updateURL = trim($params->get('customurl', ''));
} else {
@@ -110,6 +110,7 @@ public function applyUpdateSite()
}
break;
+ default:
/**
* "Minor & Patch Release for Current version (recommended and default)".
* The commented "case" below are for documenting where 'default' and legacy options falls
@@ -118,7 +119,6 @@ public function applyUpdateSite()
* case 'sts': (It's shown as "Default" because that option does not exist any more)
* case 'nochange':
*/
- default:
$updateURL = 'https://update.joomla.org/core/list.xml';
}
diff --git a/administrator/components/com_joomlaupdate/src/View/Joomlaupdate/HtmlView.php b/administrator/components/com_joomlaupdate/src/View/Joomlaupdate/HtmlView.php
index 649e00c56c392..5147b60e20b6d 100644
--- a/administrator/components/com_joomlaupdate/src/View/Joomlaupdate/HtmlView.php
+++ b/administrator/components/com_joomlaupdate/src/View/Joomlaupdate/HtmlView.php
@@ -233,24 +233,25 @@ public function display($tpl = null)
$params = ComponentHelper::getParams('com_joomlaupdate');
switch ($params->get('updatesource', 'default')) {
- // "Minor & Patch Release for Current version AND Next Major Release".
case 'next':
+ // "Minor & Patch Release for Current version AND Next Major Release".
$this->langKey = 'COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATES_INFO_NEXT';
$this->updateSourceKey = Text::_('COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_NEXT');
break;
- // "Testing"
case 'testing':
+ // "Testing"
$this->langKey = 'COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATES_INFO_TESTING';
$this->updateSourceKey = Text::_('COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_TESTING');
break;
- // "Custom"
case 'custom':
+ // "Custom"
$this->langKey = 'COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATES_INFO_CUSTOM';
$this->updateSourceKey = Text::_('COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_CUSTOM');
break;
+ default:
/**
* "Minor & Patch Release for Current version (recommended and default)".
* The commented "case" below are for documenting where 'default' and legacy options falls
@@ -259,7 +260,6 @@ public function display($tpl = null)
* case 'lts':
* case 'nochange':
*/
- default:
$this->langKey = 'COM_JOOMLAUPDATE_VIEW_DEFAULT_UPDATES_INFO_DEFAULT';
$this->updateSourceKey = Text::_('COM_JOOMLAUPDATE_CONFIG_UPDATESOURCE_DEFAULT');
}
diff --git a/administrator/components/com_media/src/Controller/PluginController.php b/administrator/components/com_media/src/Controller/PluginController.php
index 9e34023998ce0..b97b636fdeb71 100644
--- a/administrator/components/com_media/src/Controller/PluginController.php
+++ b/administrator/components/com_media/src/Controller/PluginController.php
@@ -94,16 +94,16 @@ public function oauthcallback()
* - control-panel : Redirect to Control Panel
*/
switch ($action) {
- /**
- * Close a window opened by developer
- * Use this for close New Windows opened for OAuth Process
- */
case 'close':
+ /**
+ * Close a window opened by developer
+ * Use this for close New Windows opened for OAuth Process
+ */
$this->setRedirect(Route::_('index.php?option=com_media&view=plugin&action=close', false));
break;
- // Redirect browser to any page specified by the user
case 'redirect':
+ // Redirect browser to any page specified by the user
if (!isset($eventResults['redirect_uri'])) {
throw new \Exception("Redirect URI must be set in the plugin");
}
@@ -111,14 +111,14 @@ public function oauthcallback()
$this->setRedirect($eventResults['redirect_uri']);
break;
- // Redirect browser to Control Panel
case 'control-panel':
+ // Redirect browser to Control Panel
$this->setRedirect(Route::_('index.php', false));
break;
- // Redirect browser to Media Manager
case 'media-manager':
default:
+ // Redirect browser to Media Manager
$this->setRedirect(Route::_('index.php?option=com_media&view=media', false));
}
} catch (\Exception $e) {
diff --git a/administrator/components/com_privacy/src/Controller/RequestController.php b/administrator/components/com_privacy/src/Controller/RequestController.php
index d3159979ef465..846ebf68862b5 100644
--- a/administrator/components/com_privacy/src/Controller/RequestController.php
+++ b/administrator/components/com_privacy/src/Controller/RequestController.php
@@ -393,10 +393,10 @@ private function canTransition($item, $newStatus)
// A confirmed item can be marked completed or invalid
return \in_array($newStatus, ['-1', '2'], true);
- // An item which is already in an invalid or complete state cannot transition, likewise if we don't know the state don't change anything
case '-1':
case '2':
default:
+ // An item which is already in an invalid or complete state cannot transition, likewise if we don't know the state don't change anything
return false;
}
}
diff --git a/administrator/components/com_privacy/src/View/Request/HtmlView.php b/administrator/components/com_privacy/src/View/Request/HtmlView.php
index 01f695cbdf6eb..bfd1772ccce3b 100644
--- a/administrator/components/com_privacy/src/View/Request/HtmlView.php
+++ b/administrator/components/com_privacy/src/View/Request/HtmlView.php
@@ -173,8 +173,8 @@ protected function addToolbar()
break;
- // Item is in a "locked" state and cannot transition
default:
+ // Item is in a "locked" state and cannot transition
break;
}
diff --git a/administrator/components/com_users/src/Controller/DisplayController.php b/administrator/components/com_users/src/Controller/DisplayController.php
index a6a64d81cc811..3530077485a9d 100644
--- a/administrator/components/com_users/src/Controller/DisplayController.php
+++ b/administrator/components/com_users/src/Controller/DisplayController.php
@@ -49,15 +49,15 @@ protected function canView($view)
$canDo = ContentHelper::getActions('com_users');
switch ($view) {
- // Special permissions.
case 'groups':
case 'group':
case 'levels':
case 'level':
+ // Special permissions.
return $canDo->get('core.admin');
- // Default permissions.
default:
+ // Default permissions.
return true;
}
}
diff --git a/administrator/components/com_users/src/Model/UserModel.php b/administrator/components/com_users/src/Model/UserModel.php
index 68fcd957be82a..cdbbd8ed9baef 100644
--- a/administrator/components/com_users/src/Model/UserModel.php
+++ b/administrator/components/com_users/src/Model/UserModel.php
@@ -703,20 +703,20 @@ public function batchUser($groupId, $userIds, $action)
$db = $this->getDatabase();
switch ($action) {
- // Sets users to a selected group
case 'set':
+ // Sets users to a selected group
$doDelete = 'all';
$doAssign = true;
break;
- // Remove users from a selected group
case 'del':
+ // Remove users from a selected group
$doDelete = 'group';
break;
- // Add users to a selected group
case 'add':
default:
+ // Add users to a selected group
$doAssign = true;
break;
}
diff --git a/build/build.php b/build/build.php
index 2534fed220162..a265e7ce22edc 100644
--- a/build/build.php
+++ b/build/build.php
@@ -512,14 +512,14 @@ function clean_composer(string $dir)
break;
- // Deleted files
case 'D':
+ // Deleted files
$deletedFiles[] = $fileName;
break;
- // Regular additions and modifications
default:
+ // Regular additions and modifications
$filesArray[$fileName] = true;
break;
diff --git a/components/com_ajax/ajax.php b/components/com_ajax/ajax.php
index 62c00f42e81e9..4c06d66bf8cf5 100644
--- a/components/com_ajax/ajax.php
+++ b/components/com_ajax/ajax.php
@@ -204,14 +204,14 @@
// Return the results in the desired format
switch ($format) {
- // JSONinzed
case 'json':
+ // JSONinzed
echo new JsonResponse($results, null, false, $input->get('ignoreMessages', true, 'bool'));
break;
- // Handle as raw format
default:
+ // Handle as raw format
// Output exception
if ($results instanceof Exception) {
// Log an error
diff --git a/components/com_users/src/Controller/DisplayController.php b/components/com_users/src/Controller/DisplayController.php
index 89a9c713cf3a9..6cf720999980c 100644
--- a/components/com_users/src/Controller/DisplayController.php
+++ b/components/com_users/src/Controller/DisplayController.php
@@ -73,8 +73,8 @@ public function display($cachable = false, $urlparams = false)
$model = $this->getModel('Registration');
break;
- // Handle view specific models.
case 'profile':
+ // Handle view specific models.
// If the user is a guest, redirect to the login page.
$user = $this->app->getIdentity();
@@ -88,8 +88,8 @@ public function display($cachable = false, $urlparams = false)
$model = $this->getModel($vName);
break;
- // Handle the default views.
case 'login':
+ // Handle the default views.
$model = $this->getModel($vName);
break;
diff --git a/libraries/src/Filesystem/Stream.php b/libraries/src/Filesystem/Stream.php
index bbbbfa942fe0a..a0d57fe1c3856 100644
--- a/libraries/src/Filesystem/Stream.php
+++ b/libraries/src/Filesystem/Stream.php
@@ -259,19 +259,19 @@ public function open(
// Decide which context to use:
switch ($this->processingmethod) {
- // Gzip doesn't support contexts or streams
case 'gz':
+ // Gzip doesn't support contexts or streams
$this->fh = gzopen($filename, $mode, $useIncludePath);
break;
- // Bzip2 is much like gzip except it doesn't use the include path
case 'bz':
+ // Bzip2 is much like gzip except it doesn't use the include path
$this->fh = bzopen($filename, $mode);
break;
- // Fopen can handle streams
case 'f':
default:
+ // Fopen can handle streams
// One supplied at open; overrides everything
if ($context) {
$this->fh = fopen($filename, $mode, $useIncludePath, $context);
diff --git a/libraries/src/Form/Field/CalendarField.php b/libraries/src/Form/Field/CalendarField.php
index 489f791785967..bea6338dbfc71 100644
--- a/libraries/src/Form/Field/CalendarField.php
+++ b/libraries/src/Form/Field/CalendarField.php
@@ -415,8 +415,8 @@ public function filter($value, $group = null, Registry $input = null)
$return = Factory::getDate($value, $app->get('offset'))->toSql();
break;
- // Convert a date to UTC based on the user timezone offset.
case 'USER_UTC':
+ // Convert a date to UTC based on the user timezone offset.
// Get the user timezone setting defaulting to the server timezone setting.
$offset = $app->getIdentity()->getParam('timezone', $app->get('offset'));
diff --git a/libraries/src/Form/Field/GroupedlistField.php b/libraries/src/Form/Field/GroupedlistField.php
index 89eff495843db..1cbaf445be63d 100644
--- a/libraries/src/Form/Field/GroupedlistField.php
+++ b/libraries/src/Form/Field/GroupedlistField.php
@@ -56,8 +56,8 @@ protected function getGroups()
foreach ($this->element->children() as $element) {
switch ($element->getName()) {
- // The element is an
case 'option':
+ // The element is an
// Initialize the group if necessary.
if (!isset($groups[$label])) {
$groups[$label] = [];
@@ -86,8 +86,8 @@ protected function getGroups()
$groups[$label][] = $tmp;
break;
- // The element is a
case 'group':
+ // The element is a
// Get the group label.
if ($groupLabel = (string) $element['label']) {
$label = Text::_($groupLabel);
@@ -133,8 +133,8 @@ protected function getGroups()
}
break;
- // Unknown element type.
default:
+ // Unknown element type.
throw new \UnexpectedValueException(sprintf('Unsupported element %s in GroupedlistField', $element->getName()), 500);
}
}
diff --git a/libraries/src/Form/Field/MenuField.php b/libraries/src/Form/Field/MenuField.php
index 913a1c839edf8..976ddd7740257 100644
--- a/libraries/src/Form/Field/MenuField.php
+++ b/libraries/src/Form/Field/MenuField.php
@@ -83,8 +83,8 @@ protected function getGroups()
}
break;
- // Editing a menu item is a bit tricky, we have to check the current menutype for core.edit and all others for core.create
case 'edit':
+ // Editing a menu item is a bit tricky, we have to check the current menutype for core.edit and all others for core.create
$check = $this->value == $menu->value ? 'edit' : 'create';
if (!$user->authorise('core.' . $check, 'com_menus.menu.' . (int) $menu->id)) {
diff --git a/libraries/src/Installer/Adapter/PackageAdapter.php b/libraries/src/Installer/Adapter/PackageAdapter.php
index a503e099e1df0..0292cc43a8950 100644
--- a/libraries/src/Installer/Adapter/PackageAdapter.php
+++ b/libraries/src/Installer/Adapter/PackageAdapter.php
@@ -585,8 +585,8 @@ protected function triggerManifestScript($method)
if ($this->parent->manifestClass && method_exists($this->parent->manifestClass, $method)) {
switch ($method) {
- // The preflight method takes the route as a param
case 'preflight':
+ // The preflight method takes the route as a param
if ($this->parent->manifestClass->$method($this->route, $this) === false) {
// The script failed, rollback changes
throw new \RuntimeException(
@@ -599,16 +599,16 @@ protected function triggerManifestScript($method)
break;
- // The postflight method takes the route and a results array as params
case 'postflight':
+ // The postflight method takes the route and a results array as params
$this->parent->manifestClass->$method($this->route, $this, $this->results);
break;
- // The install, uninstall, and update methods only pass this object as a param
case 'install':
case 'uninstall':
case 'update':
+ // The install, uninstall, and update methods only pass this object as a param
if ($this->parent->manifestClass->$method($this) === false) {
if ($method !== 'uninstall') {
// The script failed, rollback changes
diff --git a/libraries/src/Installer/InstallerAdapter.php b/libraries/src/Installer/InstallerAdapter.php
index 52c713732f5a4..eaa8070bfe93d 100644
--- a/libraries/src/Installer/InstallerAdapter.php
+++ b/libraries/src/Installer/InstallerAdapter.php
@@ -1054,9 +1054,9 @@ protected function triggerManifestScript($method)
if ($this->parent->manifestClass && method_exists($this->parent->manifestClass, $method)) {
switch ($method) {
- // The preflight and postflight take the route as a param
case 'preflight':
case 'postflight':
+ // The preflight and postflight take the route as a param
if ($this->parent->manifestClass->$method($this->route, $this) === false) {
if ($method !== 'postflight') {
// Clean and close the output buffer
@@ -1073,10 +1073,10 @@ protected function triggerManifestScript($method)
}
break;
- // The install, uninstall, and update methods only pass this object as a param
case 'install':
case 'uninstall':
case 'update':
+ // The install, uninstall, and update methods only pass this object as a param
if ($this->parent->manifestClass->$method($this) === false) {
if ($method !== 'uninstall') {
// Clean and close the output buffer
diff --git a/libraries/src/Updater/Adapter/ExtensionAdapter.php b/libraries/src/Updater/Adapter/ExtensionAdapter.php
index cee8cec15d685..42fd19de0a484 100644
--- a/libraries/src/Updater/Adapter/ExtensionAdapter.php
+++ b/libraries/src/Updater/Adapter/ExtensionAdapter.php
@@ -63,8 +63,8 @@ protected function _startElement($parser, $name, $attrs = [])
$this->currentUpdate->infourl = '';
break;
- // Don't do anything
case 'UPDATES':
+ // Don't do anything
break;
default:
diff --git a/libraries/src/Updater/Update.php b/libraries/src/Updater/Update.php
index 15c592ece438f..9358a4647a102 100644
--- a/libraries/src/Updater/Update.php
+++ b/libraries/src/Updater/Update.php
@@ -297,13 +297,13 @@ public function _startElement($parser, $name, $attrs = [])
}
switch ($name) {
- // This is a new update; create a current update
case 'UPDATE':
+ // This is a new update; create a current update
$this->currentUpdate = new \stdClass();
break;
- // Handle the array of download sources
case 'DOWNLOADSOURCE':
+ // Handle the array of download sources
$source = new DownloadSource();
foreach ($attrs as $key => $data) {
@@ -315,12 +315,12 @@ public function _startElement($parser, $name, $attrs = [])
break;
- // Don't do anything
case 'UPDATES':
+ // Don't do anything
break;
- // For everything else there's...the default!
default:
+ // For everything else there's...the default!
$name = strtolower($name);
if (!isset($this->currentUpdate->$name)) {
diff --git a/plugins/content/pagenavigation/src/Extension/PageNavigation.php b/plugins/content/pagenavigation/src/Extension/PageNavigation.php
index c82ea1cd38662..e32ba7b128e3f 100644
--- a/plugins/content/pagenavigation/src/Extension/PageNavigation.php
+++ b/plugins/content/pagenavigation/src/Extension/PageNavigation.php
@@ -86,20 +86,21 @@ public function onContentBeforeDisplay($context, &$row, &$params, $page = 0)
$orderDate = $params->get('order_date');
switch ($orderDate) {
- // Use created if modified is not set
case 'modified':
+ // Use created if modified is not set
$orderby = 'CASE WHEN ' . $db->quoteName('a.modified') . ' IS NULL THEN ' .
$db->quoteName('a.created') . ' ELSE ' . $db->quoteName('a.modified') . ' END';
break;
- // Use created if publish_up is not set
+
case 'published':
+ // Use created if publish_up is not set
$orderby = 'CASE WHEN ' . $db->quoteName('a.publish_up') . ' IS NULL THEN ' .
$db->quoteName('a.created') . ' ELSE ' . $db->quoteName('a.publish_up') . ' END';
break;
- // Use created as default
default:
+ // Use created as default
$orderby = $db->quoteName('a.created');
break;
}
diff --git a/plugins/system/languagefilter/src/Extension/LanguageFilter.php b/plugins/system/languagefilter/src/Extension/LanguageFilter.php
index 47df17747a8cc..c0bd90178a80c 100644
--- a/plugins/system/languagefilter/src/Extension/LanguageFilter.php
+++ b/plugins/system/languagefilter/src/Extension/LanguageFilter.php
@@ -738,36 +738,36 @@ public function onAfterDispatch()
// For each language...
foreach ($languages as $i => $language) {
switch (true) {
- // Language without frontend UI || Language without specific home menu || Language without authorized access level
case !\array_key_exists($i, LanguageHelper::getInstalledLanguages(0)):
case !isset($homes[$i]):
case isset($language->access) && $language->access && !\in_array($language->access, $levels):
+ // Language without frontend UI || Language without specific home menu || Language without authorized access level
unset($languages[$i]);
break;
- // Home page
case $is_home:
+ // Home page
$language->link = Route::_('index.php?lang=' . $language->sef . '&Itemid=' . $homes[$i]->id);
break;
- // Current language link
case $i === $this->current_lang:
+ // Current language link
$language->link = Route::_($currentInternalUrl);
break;
- // Component association
case isset($cassociations[$i]):
+ // Component association
$language->link = Route::_($cassociations[$i]);
break;
+ case isset($associations[$i]) && ($item = $menu->getItem($associations[$i])):
// Menu items association
// Heads up! "$item = $menu" here below is an assignment, *NOT* comparison
- case isset($associations[$i]) && ($item = $menu->getItem($associations[$i])):
$language->link = Route::_('index.php?Itemid=' . $item->id . '&lang=' . $language->sef);
break;
- // Too bad...
default:
+ // Too bad...
unset($languages[$i]);
}
}