Changeset 1462

Show
Ignore:
Timestamp:
05/08/06 18:29:32 (2 years ago)
Author:
mbonetti
Message:

fix for author pages returning too many elements

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/rss/author.php

    r1190 r1462  
    2828require_once ('init.php'); 
    2929 
    30 $a =  preg_replace("/[^A-Za-z0-9\.]/","%",rss_real_escape_string($_REQUEST['author'])); 
    31  
     30$a =trim(sanitize($_REQUEST['author'], RSS_SANITIZER_WORDS)); 
    3231list ($ra) = rss_fetch_row(rss_query( 
    3332    "select distinct(author) from " .getTable('item')  
    34     ." where author like '%$a%'" 
     33    ." where author like '$a'" 
    3534)); 
    3635 
     
    4342$GLOBALS['rss']->feedList = new FeedList(false); 
    4443$authorItems = new ItemList(); 
    45 $sqlWhere = " i.author like '%$a%' "; 
    46 $authorItems->populate($sqlWhere); 
     44$sqlWhere = " i.author like '$a' "; 
     45$numItems = getConfig('rss.output.frontpage.numitems'); 
     46$authorItems->populate($sqlWhere, 0, $numItems); 
    4747$authorItems->setTitle($t); 
    4848$authorItems->setRenderOptions(IL_NO_COLLAPSE|IL_TITLE_NO_ESCAPE);