Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter cr0wley

    (@cr0wley)

    Still, I’ve managed to bodge something in that works; from line 370:

    if ( isset( $_GET[‘apage’] ) )
    $page = (int) $_GET[‘apage’];
    else
    $page = 1;

    if ($page < 2)
    $page = 1;

    $start = ( $page – 1 ) * 50;
    $end = $start + 50;

    Would anyone with a more elegant hand care to tidy that up and maybe stick it in the Akismet CVS?

    Thread Starter cr0wley

    (@cr0wley)

    Scratch that, I see what’s going on. If the page number is 2, the code decreases that by 1, but it doesn’t return the parameter as 1, it returns as null so you end up with ‘edit-comments.php?page=akismet-admin&apage=’
    The select statement doesn’t like having the apage variable fed to it as null; if it’s not set it sets it to 1, but if it’s fed it uses (that-1) * 50 for the start and start+50 for the end. Null is like 0, so (0-1)*50=-50
    It’s damn same my php skills aren’t up to scratch, otherwise I’d be able to understand lines 388 and 458 of akismet.php better

    Thread Starter cr0wley

    (@cr0wley)

    Cheers for that mate, I’ll have to look up the LIMIT function and check the valid syntax. It may be that my comment table is poorly

    Forum: Plugins
    In reply to: [Released] WP-Ban 1.00 Beta

    Please take care with this plugin – It would appear that my (dynamic) IP has been ‘banned’ from a site and now I cannot reach the administrator to let him know as any link below the top level simply returns ‘You are banned.’ It’s most frustrating from a reader’s perspective

Viewing 4 replies - 1 through 4 (of 4 total)