Update core 8.3.0

This commit is contained in:
Rob Davies 2017-04-13 15:53:35 +01:00
parent da7a7918f8
commit cd7a898e66
6144 changed files with 132297 additions and 87747 deletions

View file

@ -147,7 +147,7 @@ function pager_default_initialize($total, $limit, $element = 0) {
function pager_get_query_parameters() {
$query = &drupal_static(__FUNCTION__);
if (!isset($query)) {
$query = UrlHelper::filterQueryParameters(\Drupal::request()->query->all(), array('page'));
$query = UrlHelper::filterQueryParameters(\Drupal::request()->query->all(), ['page']);
}
return $query;
}
@ -216,19 +216,19 @@ function template_preprocess_pager(&$variables) {
// Create the "first" and "previous" links if we are not on the first page.
if ($pager_page_array[$element] > 0) {
$items['first'] = array();
$options = array(
$items['first'] = [];
$options = [
'query' => pager_query_add_page($parameters, $element, 0),
);
];
$items['first']['href'] = \Drupal::url($route_name, $route_parameters, $options);
if (isset($tags[0])) {
$items['first']['text'] = $tags[0];
}
$items['previous'] = array();
$options = array(
$items['previous'] = [];
$options = [
'query' => pager_query_add_page($parameters, $element, $pager_page_array[$element] - 1),
);
];
$items['previous']['href'] = \Drupal::url($route_name, $route_parameters, $options);
if (isset($tags[1])) {
$items['previous']['text'] = $tags[1];
@ -242,9 +242,9 @@ function template_preprocess_pager(&$variables) {
}
// Now generate the actual pager piece.
for (; $i <= $pager_last && $i <= $pager_max; $i++) {
$options = array(
$options = [
'query' => pager_query_add_page($parameters, $element, $i - 1),
);
];
$items['pages'][$i]['href'] = \Drupal::url($route_name, $route_parameters, $options);
if ($i == $pager_current) {
$variables['current'] = $i;
@ -258,19 +258,19 @@ function template_preprocess_pager(&$variables) {
// Create the "next" and "last" links if we are not on the last page.
if ($pager_page_array[$element] < ($pager_max - 1)) {
$items['next'] = array();
$options = array(
$items['next'] = [];
$options = [
'query' => pager_query_add_page($parameters, $element, $pager_page_array[$element] + 1),
);
];
$items['next']['href'] = \Drupal::url($route_name, $route_parameters, $options);
if (isset($tags[3])) {
$items['next']['text'] = $tags[3];
}
$items['last'] = array();
$options = array(
$items['last'] = [];
$options = [
'query' => pager_query_add_page($parameters, $element, $pager_max - 1),
);
];
$items['last']['href'] = \Drupal::url($route_name, $route_parameters, $options);
if (isset($tags[4])) {
$items['last']['text'] = $tags[4];