From 75db0cfa371941cbd7743d0523bbe3460688fc37 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 28 Nov 2017 13:12:12 +0200 Subject: [ci skip] Merge pull request #5342 from aanbar/pagination-bc-fix Preserve attributes from pagination config files Related: #4454 --- system/libraries/Pagination.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'system/libraries/Pagination.php') diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index f26f8a4ed..ece4edac9 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -339,6 +339,8 @@ class CI_Pagination { } } + // Enable rel attribute by default + isset($params['attributes']) OR $params['attributes'] = array(); $this->initialize($params); log_message('info', 'Pagination Class Initialized'); } @@ -353,8 +355,7 @@ class CI_Pagination { */ public function initialize(array $params = array()) { - isset($params['attributes']) OR $params['attributes'] = array(); - if (is_array($params['attributes'])) + if (isset($params['attributes']) && is_array($params['attributes'])) { $this->_parse_attributes($params['attributes']); unset($params['attributes']); -- cgit v1.2.3-24-g4f1b From 51dbfde284572f80f09360691525c181d26df0ae Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 28 Nov 2017 13:14:44 +0200 Subject: [ci skip] Polish changes from PR #5342 --- system/libraries/Pagination.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'system/libraries/Pagination.php') diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index ece4edac9..3af70cb12 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -339,8 +339,10 @@ class CI_Pagination { } } - // Enable rel attribute by default + // _parse_attributes(), called by initialize(), needs to run at least once + // in order to enable "rel" attributes, and this triggers it. isset($params['attributes']) OR $params['attributes'] = array(); + $this->initialize($params); log_message('info', 'Pagination Class Initialized'); } -- cgit v1.2.3-24-g4f1b From cce6bd170f24cf0f10ca0b58150d0324433a66be Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 9 Jan 2018 11:32:02 +0200 Subject: [ci skip] Merge pull request #5376 from jim-parry/copyright-update Annual copyright update Conflicts resolved: system/libraries/Cache/drivers/Cache_apcu.php --- system/libraries/Pagination.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/libraries/Pagination.php') diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index 3af70cb12..3fe3d3a45 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2017, British Columbia Institute of Technology + * Copyright (c) 2014 - 2018, British Columbia Institute of Technology * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link https://codeigniter.com * @since Version 1.0.0 -- cgit v1.2.3-24-g4f1b