From d08a51047ac462ddc90ddd460fc424683aa8dc84 Mon Sep 17 00:00:00 2001 From: Gustav Bertram Date: Mon, 14 Nov 2011 15:10:41 +0200 Subject: Adding a default memcached config file - GWB --- application/config/memcached.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 application/config/memcached.php diff --git a/application/config/memcached.php b/application/config/memcached.php new file mode 100644 index 000000000..d2ece65cc --- /dev/null +++ b/application/config/memcached.php @@ -0,0 +1,17 @@ + '127.0.0.1', + 'port' => '11211', + 'weight' => '1' +); + +/* End of file memcached.php */ +/* Location: ./application/config/memcached.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b From ee04a1c8e25cc98aa5e68b328074efe6d6abf222 Mon Sep 17 00:00:00 2001 From: Gustav Bertram Date: Mon, 14 Nov 2011 15:19:21 +0200 Subject: Adding a default memcached config file - GWB --- application/config/memcached.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/application/config/memcached.php b/application/config/memcached.php index d2ece65cc..1b34aa683 100644 --- a/application/config/memcached.php +++ b/application/config/memcached.php @@ -3,14 +3,19 @@ | ------------------------------------------------------------------------- | Memcached settings | ------------------------------------------------------------------------- -| Memcached doesn't seem to like hostnames. Try use an IP first. -GWB +| To add another server, just add another set in the array. +| +| NOTE: Memcached doesn't seem to like hostnames. Try using an IP first. +| -GWB | */ -$config['default'] = array( - 'hostname' => '127.0.0.1', - 'port' => '11211', - 'weight' => '1' +$config = array( + 'default' => array( + 'hostname' => '127.0.0.1', + 'port' => '11211', + 'weight' => '1', + ), ); /* End of file memcached.php */ -- cgit v1.2.3-24-g4f1b From 8bd8f687827454f83a5512b96bb0f632178a08a6 Mon Sep 17 00:00:00 2001 From: dixy Date: Mon, 19 Dec 2011 22:26:12 +0100 Subject: Prev link and 1 link don't have the same url with use_page_numbers=TRUE --- system/libraries/Pagination.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index eea953ae4..cc73e0d2f 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -236,13 +236,13 @@ class CI_Pagination { { $i = ($this->use_page_numbers) ? $uri_page_number - 1 : $uri_page_number - $this->per_page; - if (($i == 0 OR ($this->use_page_numbers && $i == 1)) AND $this->first_url != '') + if ($i == $base_page AND $this->first_url != '') { $output .= $this->prev_tag_open.'anchor_class.'href="'.$this->first_url.'">'.$this->prev_link.''.$this->prev_tag_close; } else { - $i = ($i == 0) ? '' : $this->prefix.$i.$this->suffix; + $i = ($i == $base_page) ? '' : $this->prefix.$i.$this->suffix; $output .= $this->prev_tag_open.'anchor_class.'href="'.$this->base_url.$i.'">'.$this->prev_link.''.$this->prev_tag_close; } -- cgit v1.2.3-24-g4f1b From 37b1d9ba5bef4594aaf458e0406599bdf33deb46 Mon Sep 17 00:00:00 2001 From: dixy Date: Mon, 19 Dec 2011 22:32:48 +0100 Subject: Add #800 to changelog --- user_guide_src/source/changelog.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 44c9432a2..f5432a95d 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -74,6 +74,7 @@ Bug fixes for 3.0 - Fixed a bug where using $this->dbforge->create_table() with PostgreSQL database could lead to fetching whole table. - Bug #795 - Fixed form method and accept-charset when passing an empty array. - Bug #797 - timespan was using incorrect seconds for year and month. +- In Pagination library, when use_page_numbers=TRUE previous link and page 1 link do not have the same url Version 2.1.0 ============= -- cgit v1.2.3-24-g4f1b From 26cba2ae6c47ecbacdf34fe94a32f1f00fbef72c Mon Sep 17 00:00:00 2001 From: Eric Barnes Date: Tue, 3 Jan 2012 23:39:24 -0500 Subject: Updated the memcached config file. --- application/config/memcached.php | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/application/config/memcached.php b/application/config/memcached.php index 1b34aa683..2b1a77266 100644 --- a/application/config/memcached.php +++ b/application/config/memcached.php @@ -1,22 +1,46 @@ - array( 'hostname' => '127.0.0.1', 'port' => '11211', 'weight' => '1', - ), -); + ), +); /* End of file memcached.php */ /* Location: ./application/config/memcached.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 8d727f14446f31d919e808e3833d252ef12cf1ae Mon Sep 17 00:00:00 2001 From: Eric Barnes Date: Wed, 4 Jan 2012 00:06:36 -0500 Subject: Fixed prefix and suffix in pagination. Fixes #677 --- system/libraries/Pagination.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index 23ca549e2..2fe4cf31b 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -142,6 +142,11 @@ class CI_Pagination { // Determine the current page number. $CI =& get_instance(); + if ($this->prefix != '' OR $this->suffix != '') + { + $this->cur_page = str_replace(array($this->prefix, $this->suffix), '', $CI->uri->segment($this->uri_segment)); + } + if ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE) { if ($CI->input->get($this->query_string_segment) != $base_page) -- cgit v1.2.3-24-g4f1b From 3b376595183e0e0db5559ccbfc368c442408dca9 Mon Sep 17 00:00:00 2001 From: Eric Barnes Date: Wed, 4 Jan 2012 00:28:27 -0500 Subject: Fixed paging with prefix and suffix for real page numbers. Refs #677 Fixes #52 --- system/libraries/Pagination.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index 2fe4cf31b..e0cab2128 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -142,9 +142,10 @@ class CI_Pagination { // Determine the current page number. $CI =& get_instance(); + // See if we are using a prefix or suffix on links if ($this->prefix != '' OR $this->suffix != '') { - $this->cur_page = str_replace(array($this->prefix, $this->suffix), '', $CI->uri->segment($this->uri_segment)); + $this->cur_page = (int) str_replace(array($this->prefix, $this->suffix), '', $CI->uri->segment($this->uri_segment)); } if ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE) @@ -154,7 +155,7 @@ class CI_Pagination { $this->cur_page = (int) $CI->input->get($this->query_string_segment); } } - elseif ($CI->uri->segment($this->uri_segment) != $base_page) + elseif ( ! $this->cur_page AND $CI->uri->segment($this->uri_segment) != $base_page) { $this->cur_page = (int) $CI->uri->segment($this->uri_segment); } @@ -165,7 +166,7 @@ class CI_Pagination { $this->cur_page = $base_page; } - $this->num_links = (int)$this->num_links; + $this->num_links = (int) $this->num_links; if ($this->num_links < 1) { -- cgit v1.2.3-24-g4f1b From 43fcdbcac05a0cdc5c2a77c79c641849c41caa9e Mon Sep 17 00:00:00 2001 From: Eric Barnes Date: Wed, 4 Jan 2012 21:27:47 -0500 Subject: Added pagination change log item back. --- user_guide_src/source/changelog.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index f611be5c3..668f073df 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -91,6 +91,9 @@ Bug fixes for 3.0 - Fixed a bug (#696) - make oci_execute calls inside num_rows non-committing, since they are only there to reset which row is next in line for oci_fetch calls and thus don't need to be committed. - Fixed a bug (#406) - sqlsrv DB driver not reuturning resource on db_pconnect(). - Fixed a bug in CI_Image_lib::gd_loaded() where it was possible for the script execution to end or a PHP E_WARNING message to be emitted. +- In Pagination library, when use_page_numbers=TRUE previous link and page 1 link do not have the same url + + Version 2.1.0 ============= -- cgit v1.2.3-24-g4f1b