Changeset 1735

Show
Ignore:
Timestamp:
06/16/07 09:14:18 (16 months ago)
Author:
mbonetti
Message:

fix for author names with multiple successive escaped characters, which
would issue 404's

Location:
trunk/gregarius
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/author.php

    r1656 r1735  
    2929 
    3030$a = trim(sanitize($_REQUEST['author'], RSS_SANITIZER_WORDS)); 
    31 list ($ra) = rss_fetch_row(rss_query( 
    32     "select distinct(author) from " .getTable('item')  
    33     ." where author  like '%$a'" 
    34 )); 
     31$sql = "select distinct(author) from " .getTable('item')  
     32    ." where author  like '%$a'"; 
     33 
     34list ($ra) = rss_fetch_row(rss_query($sql)); 
    3535 
    3636if (!$ra) { 
  • trunk/gregarius/cls/wrappers/item.php

    r1730 r1735  
    213213function rss_item_author() { 
    214214    if (($a = $GLOBALS['rss'] -> currentItem -> author) != null) { 
    215         $ea = preg_replace('/[^a-zA-Z0-9]+/','_',$a); 
     215        $ea = preg_replace('/[^a-zA-Z0-9]/','_',$a); 
    216216        if (getConfig('rss.output.usemodrewrite')) { 
    217217            $a = "<a href=\"".getPath() ."author/$ea\">$a</a>";