From 1a3885babb73870ef99af24297c722d8251480a1 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 2 May 2012 10:23:12 +0300 Subject: Fix pagination anchor_class with multiple initializations --- system/libraries/Pagination.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'system/libraries/Pagination.php') diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index 0fe73d69f..3d2911813 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -94,17 +94,16 @@ class CI_Pagination { { foreach ($params as $key => $val) { - if (isset($this->$key)) + if ($key === 'anchor_class') + { + $this->anchor_class = ($val != '') ? 'class="'.$val.'" ' : ''; + } + elseif (isset($this->$key)) { $this->$key = $val; } } } - - if ($this->anchor_class != '') - { - $this->anchor_class = 'class="'.$this->anchor_class.'" '; - } } // -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b