Thomas Lecavelier wrote:
The log show statusnet try to get an offset of -20 because $this->page
was set to -1...
I attach a patch against gito...@0.9.x which fix the problem in the
prepare function, fallingback page to 1 if it's under 1.
Please disregard my previous patch and consider this one: toying with
statusnet 0.9.1 I understant that args['page'] sometimes receive QSN
values, so instead of patching every action, the best is to patch action
class.
Of course, if I'm misleading, don't hesitate to explain what I don't get.
Have a good day.
Thomas.
>From 99b580829241246c409bbdafc7c1ead7f817238e Mon Sep 17 00:00:00 2001
From: Thomas Lecavelier <tho...@lecavelier.name>
Date: Fri, 2 Apr 2010 14:36:58 +0200
Subject: [PATCH] Armor Action#args['page'] against non number and values under 1
---
lib/action.php | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/lib/action.php b/lib/action.php
index 09113a5..b278965 100644
--- a/lib/action.php
+++ b/lib/action.php
@@ -83,6 +83,9 @@ class Action extends HTMLOutputter // lawsuit
function prepare($argarray)
{
$this->args =& common_copy_args($argarray);
+ if (array_key_exists('page', $this->args) && ($this->args['page']+0) < 1) {
+ $this->args['page'] = 1;
+ }
return true;
}
--
1.7.0
_______________________________________________
StatusNet-dev mailing list
StatusNet-dev@lists.status.net
http://lists.status.net/mailman/listinfo/statusnet-dev