art-web r547 - branches/art-hub/lib
- From: thos svn gnome org
- To: svn-commits-list gnome org
- Subject: art-web r547 - branches/art-hub/lib
- Date: Sat, 6 Sep 2008 22:42:34 +0000 (UTC)
Author: thos
Date: Sat Sep 6 22:42:34 2008
New Revision: 547
URL: http://svn.gnome.org/viewvc/art-web?rev=547&view=rev
Log:
* Add extra GET parameters to pagination links
Modified:
branches/art-hub/lib/pagination.php
Modified: branches/art-hub/lib/pagination.php
==============================================================================
--- branches/art-hub/lib/pagination.php (original)
+++ branches/art-hub/lib/pagination.php Sat Sep 6 22:42:34 2008
@@ -25,10 +25,12 @@
$cur_page = ceil ($this->start / $this->limit);
$prev_page = $cur_page - 1;
+ $get_params = '';
+ foreach ($_GET as $key => $value) {if ($key != 'page') $get_params .= "&$key=$value";}
if ($cur_page > 1)
{
- print ("<a href=\"?page=1\">First</a> · ");
- print ("<a href=\"?page=$prev_page\">Previous</a>");
+ print ("<a href=\"?page=1$get_params\">First</a> · ");
+ print ("<a href=\"?page=$prev_page$get_params\">Previous</a>");
}
else
{
@@ -47,15 +49,15 @@
if ($i == $cur_page)
print (" · $i ");
else
- print (" · <a href=\"?page=$i\">$i</a>");
+ print (" · <a href=\"?page=$i$get_params\">$i</a>");
}
$next_page = $cur_page + 1;
if ($cur_page < $num_pages)
{
- print (" · <a href=\"?page=${next_page}\">Next</a>");
- print (" · <a href=\"?page=${num_pages}\">Last</a>");
+ print (" · <a href=\"?page=${next_page}$get_params\">Next</a>");
+ print (" · <a href=\"?page=${num_pages}$get_params\">Last</a>");
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]