Skip to content

Commit 1a91fa3

Browse files
committed
Merge remote-tracking branch 'origin/5.2-dev' into 5.2-dev
2 parents 32aa8fc + 5b738e8 commit 1a91fa3

File tree

7 files changed

+7
-29
lines changed

7 files changed

+7
-29
lines changed

administrator/components/com_languages/tmpl/multilangstatus/default.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,6 @@
5555
<?php endif; ?>
5656
<?php endforeach; ?>
5757
<?php endif; ?>
58-
<?php if ($this->defaultHome == true) : ?>
59-
<div class="alert alert-warning">
60-
<span class="icon-exclamation-triangle" aria-hidden="true"></span>
61-
<span class="visually-hidden"><?php echo Text::_('WARNING'); ?></span>
62-
<?php echo Text::_('COM_LANGUAGES_MULTILANGSTATUS_DEFAULT_HOME_MODULE_PUBLISHED'); ?>
63-
</div>
64-
<?php endif; ?>
6558
<?php foreach ($this->statuses as $status) : ?>
6659
<?php // Displays error when Site language and Content language are published but Home page is unpublished, trashed or missing. ?>
6760
<?php if ($status->lang_code && $status->published == 1 && $status->home_published != 1) : ?>

administrator/components/com_menus/presets/alternate.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,11 @@
225225
type="separator"
226226
title="JSITE"
227227
hidden="false"
228-
sql_select="a.id, a.title, a.menutype, CASE COALESCE(SUM(m.home), 0) WHEN 0 THEN '' WHEN 1 THEN CASE m.language WHEN '*' THEN 'class:icon-home' ELSE CONCAT('image:', l.lang_code) END ELSE 'image:mod_languages/icon-16-language.png' END AS icon"
228+
sql_select="a.id, a.title, a.menutype, CASE COALESCE(SUM(m.home), 0) WHEN 0 THEN '' WHEN 1 THEN CASE MAX(m.language) WHEN '*' THEN 'class:icon-home' ELSE CONCAT('image:', MAX(l.lang_code)) END ELSE 'class:icon-home' END AS icon"
229229
sql_from="#__menu_types AS a"
230230
sql_where="a.client_id = 0"
231231
sql_leftjoin="#__menu AS m ON m.menutype = a.menutype AND m.home = 1 LEFT JOIN #__languages AS l ON l.lang_code = m.language"
232-
sql_group="a.id, a.title, a.menutype, m.language, l.lang_code"
232+
sql_group="a.id, a.title, a.menutype"
233233
sql_order="a.id DESC"
234234
>
235235
<menuitem

administrator/components/com_menus/presets/default.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,11 +136,11 @@
136136
type="separator"
137137
title="JSITE"
138138
hidden="false"
139-
sql_select="a.id, a.title, a.menutype, CASE COALESCE(SUM(m.home), 0) WHEN 0 THEN '' WHEN 1 THEN CASE m.language WHEN '*' THEN 'class:icon-home' ELSE CONCAT('image:', l.lang_code) END ELSE 'image:mod_languages/icon-16-language.png' END AS icon"
139+
sql_select="a.id, a.title, a.menutype, CASE COALESCE(SUM(m.home), 0) WHEN 0 THEN '' WHEN 1 THEN CASE MAX(m.language) WHEN '*' THEN 'class:icon-home' ELSE CONCAT('image:', MAX(l.lang_code)) END ELSE 'class:icon-home' END AS icon"
140140
sql_from="#__menu_types AS a"
141141
sql_where="a.client_id = 0"
142142
sql_leftjoin="#__menu AS m ON m.menutype = a.menutype AND m.home = 1 LEFT JOIN #__languages AS l ON l.lang_code = m.language"
143-
sql_group="a.id, a.title, a.menutype, m.language, l.lang_code"
143+
sql_group="a.id, a.title, a.menutype"
144144
sql_order="a.ordering ASC"
145145
>
146146
<menuitem

administrator/components/com_menus/src/Model/ItemsModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ protected function getListQuery()
326326
->bind(':clientId', $clientId, ParameterType::INTEGER);
327327

328328
// Filter on the published state.
329-
$published = $this->getState('filter.published');
329+
$published = $this->getState('filter.published', '');
330330

331331
if (is_numeric($published)) {
332332
$published = (int) $published;

administrator/components/com_modules/src/Model/ModulesModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ protected function getListQuery()
313313
}
314314

315315
// Filter by published state.
316-
$state = $this->getState('filter.state');
316+
$state = $this->getState('filter.state', '');
317317

318318
if (is_numeric($state)) {
319319
$state = (int) $state;

administrator/language/en-GB/com_languages.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ COM_LANGUAGES_MULTILANGSTATUS_CONTENT_LANGUAGE_PUBLISHED="Published Content Lang
7070
COM_LANGUAGES_MULTILANGSTATUS_CONTENT_LANGUAGE_SEF_MISSING="The \"URL Language Code\" is missing for the <strong>%s</strong> Content Language. <strong>The multilingual feature may not function properly or the site may not be reachable!</strong>"
7171
COM_LANGUAGES_MULTILANGSTATUS_CONTENT_LANGUAGE_TRASHED="The <strong>%s</strong> Content Language is trashed. <strong>The language will not display on the site.</strong>"
7272
COM_LANGUAGES_MULTILANGSTATUS_CONTENT_TABLE_CAPTION="Content Language Status"
73+
; The following string is deprecated and will be removed with 7.0
7374
COM_LANGUAGES_MULTILANGSTATUS_DEFAULT_HOME_MODULE_PUBLISHED="The menu module displaying the Home menu item set to language &quot;All&quot; should not be published."
7475
COM_LANGUAGES_MULTILANGSTATUS_ERROR_CONTENT_LANGUAGE="A Default Home page is assigned to the <strong>%s</strong> Content Language although a Site Language for this Content Language is not installed or enabled AND/OR the Content Language is not published. <strong>The language will not display on the site.</strong>"
7576
COM_LANGUAGES_MULTILANGSTATUS_ERROR_DEFAULT_CONTENT_LANGUAGE="The Content Language for the <strong>%s</strong> default Site Language is unpublished or does not exist. <strong>The multilingual feature may not function properly or the site may not be reachable!</strong>"

libraries/src/Table/Menu.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -258,22 +258,6 @@ public function store($updateNulls = true)
258258
}
259259

260260
if ($this->home == '1') {
261-
// Verify that the home page for this menu is unique.
262-
if (
263-
$table->load(
264-
[
265-
'menutype' => $this->menutype,
266-
'client_id' => (int) $this->client_id,
267-
'home' => '1',
268-
]
269-
)
270-
&& ($table->language != $this->language)
271-
) {
272-
$this->setError(Text::_('JLIB_DATABASE_ERROR_MENU_HOME_NOT_UNIQUE_IN_MENU'));
273-
274-
return false;
275-
}
276-
277261
// Verify that the home page for this language is unique per client id
278262
if ($table->load(['home' => '1', 'language' => $this->language, 'client_id' => (int) $this->client_id])) {
279263
if ($table->checked_out && $table->checked_out != $this->checked_out) {

0 commit comments

Comments
 (0)