diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-05-02 09:23:12 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-05-02 09:23:12 +0200 |
commit | 1a3885babb73870ef99af24297c722d8251480a1 (patch) | |
tree | a0a85cf549b1448081fa4b134acce9b93640b187 | |
parent | 1eb1803e77f49672f8ef7179fbe3ca12257be922 (diff) |
Fix pagination anchor_class with multiple initializations
-rw-r--r-- | system/libraries/Pagination.php | 11 |
1 files changed, 5 insertions, 6 deletions
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.'" '; - } } // -------------------------------------------------------------------- |