PDA

View Full Version : [fixed] $Perpage


DexterII
Fri 12th Jul '02, 5:25am
I've found in the URL if you change the postsperpage or results perpage ... the 'perpage' variable to like 2000 it really stalls the server because if in a post with like 2000 replies it gets them all. Perhaps putting something like


Made a better example :)


<?php

$perpage=$HTTP_GET_VARS['perpage'];

if ($perpage > $perpagelimit) {
$perpage=$perpagelimit;
}

?>



Kinda bad example but I hope ya get the point....

Jake Bunce
Fri 12th Jul '02, 6:04am
indeed. there should be a check for that.

Joshua Clinard
Tue 16th Jul '02, 11:02am
Maybe this should be moved to the Troubleshooting and Problems forum, or the Bug Reports forum.

Joshua Clinard
Thu 18th Jul '02, 5:26pm
If any mod sees this, would you mind moving it to the bugs forum if it can be confirmed?

Thanks. That was quick!

Scott MacVicar
Thu 18th Jul '02, 5:36pm
I guess you can check to see if its greater than $maxposts and if it is then run through the code checking their profile for it.

Open showthread.php and change
if ($perpage < 1) {

to

if ($perpage < 1 or $perpage > $maxposts) {