Skip to content

Commit a9afdb2

Browse files
committed
Merge branch 'refs/heads/5.2-backup' into 5.2-dev
2 parents f29f97e + 22d87a0 commit a9afdb2

File tree

9 files changed

+37
-14
lines changed

9 files changed

+37
-14
lines changed

administrator/components/com_admin/script.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3002,7 +3002,7 @@ private function migrateTinymceConfiguration(): bool
30023002
/**
30033003
* setup Guided Tours Unique Identifiers
30043004
*
3005-
* @return boolean True on success
3005+
* @return void
30063006
*
30073007
* @since 5.0.0
30083008
*/

administrator/components/com_categories/src/Model/CategoryModel.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,8 @@ public function publish(&$pks, $value = 1)
752752

753753
return true;
754754
}
755+
756+
return false;
755757
}
756758

757759
/**

administrator/components/com_languages/src/Model/OverridesModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public function delete($cids)
233233
/**
234234
* Removes all of the cached strings from the table.
235235
*
236-
* @return boolean result of operation
236+
* @return void|\RuntimeException
237237
*
238238
* @since 3.4.2
239239
*/

administrator/components/com_menus/src/Controller/MenuController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ public function save($key = null, $urlVar = null)
180180
$this->setRedirect(Route::_('index.php?option=com_menus&view=menus', false));
181181
break;
182182
}
183+
184+
return true;
183185
}
184186

185187
/**

administrator/components/com_modules/src/Controller/ModuleController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ public function save($key = null, $urlVar = null)
258258
/**
259259
* Method to get the other modules in the same position
260260
*
261-
* @return string The data for the Ajax request.
261+
* @return void
262262
*
263263
* @since 3.6.3
264264
*/
@@ -303,7 +303,7 @@ public function orderPosition()
303303
} catch (\RuntimeException $e) {
304304
$app->enqueueMessage($e->getMessage(), 'error');
305305

306-
return '';
306+
return;
307307
}
308308

309309
$orders2 = [];

administrator/language/en-GB/lib_joomla.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ JLIB_HTML_NO_RECORDS_FOUND="No records found."
454454
JLIB_HTML_PAGE_CURRENT="Page %s"
455455
JLIB_HTML_PAGE_CURRENT_OF_TOTAL="Page %s of %s"
456456
JLIB_HTML_PAGINATION="Pagination"
457+
JLIB_HTML_PAGINATION_NUMBERS="%1$d - %2$d / %3$d items"
457458
JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST="Please first make a selection from the list."
458459
JLIB_HTML_PUBLISH_ITEM="Publish Item"
459460
JLIB_HTML_PUBLISHED_EXPIRED_ITEM="Published, but has Expired."

language/en-GB/lib_joomla.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ JLIB_HTML_NO_RECORDS_FOUND="No records found."
448448
JLIB_HTML_PAGE_CURRENT="Page %s"
449449
JLIB_HTML_PAGE_CURRENT_OF_TOTAL="Page %s of %s"
450450
JLIB_HTML_PAGINATION="Pagination"
451+
JLIB_HTML_PAGINATION_NUMBERS="%1$d - %2$d / %3$d items"
451452
JLIB_HTML_PLEASE_MAKE_A_SELECTION_FROM_THE_LIST="Please first make a selection from the list."
452453
JLIB_HTML_PUBLISH_ITEM="Publish Item"
453454
JLIB_HTML_PUBLISHED_EXPIRED_ITEM="Published, but has Expired."

layouts/joomla/pagination/links.php

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@
1616

1717
$list = $displayData['list'];
1818
$pages = $list['pages'];
19+
$total = $list['total'];
1920

2021
$options = new Registry($displayData['options']);
2122

22-
$showLimitBox = $options->get('showLimitBox', false);
23-
$showPagesLinks = $options->get('showPagesLinks', true);
24-
$showLimitStart = $options->get('showLimitStart', true);
23+
$showLimitBox = $options->get('showLimitBox', false);
24+
$showPagesLinks = $options->get('showPagesLinks', true);
25+
$showLimitStart = $options->get('showLimitStart', true);
26+
$showItemPosition = $options->get('showItemPosition', true);
2527

2628
// Calculate to display range of pages
2729
$currentPage = 1;
@@ -43,21 +45,29 @@
4345
$range = ceil($currentPage / $step);
4446
}
4547
}
46-
?>
47-
48+
$first = ($currentPage - 1) * $list['limit'] + 1;
49+
$last = $first + $list['limit'] - 1;
50+
$last = $last > $total ? $total : $last;
4851

49-
<?php if (!empty($pages)) : ?>
52+
?>
53+
<?php if (!empty($pages) || $showItemPosition) : ?>
5054
<nav class="pagination__wrapper" aria-label="<?php echo Text::_('JLIB_HTML_PAGINATION'); ?>">
51-
<div class="pagination pagination-toolbar text-center">
55+
<?php if ($showItemPosition) : ?>
56+
<div class="text-end me-3">
57+
<?php echo Text::sprintf('JLIB_HTML_PAGINATION_NUMBERS', $first, $last, $total); ?>
58+
</div>
59+
<?php endif; ?>
60+
61+
<div class="pagination pagination-toolbar text-center mt-0">
5262

5363
<?php if ($showLimitBox) : ?>
5464
<div class="limit float-end">
5565
<?php echo Text::_('JGLOBAL_DISPLAY_NUM') . $list['limitfield']; ?>
5666
</div>
5767
<?php endif; ?>
5868

59-
<?php if ($showPagesLinks) : ?>
60-
<ul class="pagination ms-auto mb-4 me-0">
69+
<?php if ($showPagesLinks && !empty($pages)) : ?>
70+
<ul class="pagination ms-auto me-0">
6171
<?php echo LayoutHelper::render('joomla.pagination.link', $pages['start']); ?>
6272
<?php echo LayoutHelper::render('joomla.pagination.link', $pages['previous']); ?>
6373
<?php foreach ($pages['pages'] as $k => $page) : ?>

libraries/src/HTML/Helpers/Select.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,14 @@ public static function radiolist(
631631
$idtag = false,
632632
$translate = false
633633
) {
634+
$class = '';
635+
634636
if (\is_array($attribs)) {
637+
if (\array_key_exists('class', $attribs)) {
638+
$class = ' ' . $attribs['class'];
639+
unset($attribs['class']);
640+
}
641+
635642
$attribs = ArrayHelper::toString($attribs);
636643
}
637644

@@ -662,7 +669,7 @@ public static function radiolist(
662669
$extra .= ((string) $k === (string) $selected ? ' checked="checked" ' : '');
663670
}
664671

665-
$html .= '<input type="radio" class="form-check-input" name="' . $name . '" id="' . $id . '" value="' . $k . '" '
672+
$html .= '<input type="radio" class="form-check-input' . $class . '" name="' . $name . '" id="' . $id . '" value="' . $k . '" '
666673
. $extra . $attribs . '>';
667674
$html .= '<label for="' . $id . '" class="form-check-label" id="' . $id . '-lbl">' . $t . '</label>';
668675
$html .= '</div>';

0 commit comments

Comments
 (0)