[dokuwiki] Re: Task 3 finished, patch attached

On Mon, 23 May 2005 22:23:50 +0200
Andreas Gohr <andi@xxxxxxxxxxxxxx> wrote:

> If I understood correctly from skimming the code you call getRecents with -1 
> to get all changes. This is IMHO a bad idea because it means to create a 
> possibly very large array even if only 20 entries are needed. I think it 
> would be better to give an additional optional $first parameter to 
> getRecents, add it to $num, and after the loop remove the first $first 
> entries from the array again before returning it.
> 
> Maybe the button texts should be changed to "older" and "newer"?
> 
> The $first parameter isn't sanitized! It runs amok if I add some bogus data. 
> Try ?do=recent&first=foo to see what I mean. Some is_int or alike should do.

I did the changes. Here is a patch for the patch ;-) You know what I mean.

  Best Regrads
    Matthias

Other related posts: