art-web r525 - branches/art-hub/views
- From: thos svn gnome org
- To: svn-commits-list gnome org
- Subject: art-web r525 - branches/art-hub/views
- Date: Sun, 15 Jun 2008 22:23:56 +0000 (UTC)
Author: thos
Date: Sun Jun 15 22:23:56 2008
New Revision: 525
URL: http://svn.gnome.org/viewvc/art-web?rev=525&view=rev
Log:
* Ensure a default value is set for the current page number
Modified:
branches/art-hub/views/backgrounds.php
Modified: branches/art-hub/views/backgrounds.php
==============================================================================
--- branches/art-hub/views/backgrounds.php (original)
+++ branches/art-hub/views/backgrounds.php Sun Jun 15 22:23:56 2008
@@ -24,7 +24,12 @@
exit;
}
-$p = new Paginator ($total_backgrounds, 10, $_GET['page'] * 10);
+/* get the current page and ensure a default value is set */
+$cur_page = $_GET['page'];
+if (!is_numeric ($cur_page))
+ $cur_page = 1;
+
+$p = new Paginator ($total_backgrounds, 10, $cur_page * 10);
if ($category == "gnome")
$d_category = "GNOME";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]