Changeset 1722 for trunk

Show
Ignore:
Timestamp:
06/03/07 12:28:44 (18 months ago)
Author:
mbonetti
Message:

a couple fixes in tag-related rendering

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/tags.php

    r1721 r1722  
    3232    $twhere = ""; 
    3333    foreach ($tags as $tag) { 
     34        $tag = rss_real_escape_string($tag); 
    3435        $twhere .= "t.tag='$tag' or "; 
    3536    } 
     
    3738 
    3839    $sql = "select fid,tid,m.tdate from ".getTable('metatag') ." m " 
    39   ."inner join " . getTable('tag') . " t on t.id = m.tid  where m.ttype = 'item'" 
    40     ." and ($twhere)"; 
     40        ."inner join " . getTable('tag') . " t on t.id = m.tid  where m.ttype = 'item'" 
     41        ." and ($twhere)"; 
    4142 
    4243    //echo $sql; 
     
    115116            $relPlus = array_key_exists($rtag, $taggedItems->allTags); 
    116117            if ($relPlus) { 
    117                 $relLbl .= "&nbsp;[<a "."title=\"$cnt ". ($cnt > 1 ? __('items') : __('item'))." ". ($cnt > 1 || $cnt == 0 ? __('tagged') : __('tagged'))." '".$hrTag." ".__('and')." $rtag'\" "."href=\"".getPath()."". (getConfig('rss.output.usemodrewrite') ? "tag/$rtag" : "tags.php?tag=$rtag").""."+".$urlTag."\">+</a>]"; 
     118                $relLbl .= sprintf( 
     119                    '&nbsp;[<a title="%d %s %s \'%s %s %s"\' href="%s+%s">+</a>]', 
     120                    $cnt,  
     121                    $cnt > 1 ? __('items') : __('item'), 
     122                    $cnt > 1 || $cnt == 0 ? __('tagged') : __('tagged'), 
     123                    htmlspecialchars($hrTag,ENT_QUOTES), 
     124                    __('and'), 
     125                    htmlspecialchars($rtag,ENT_QUOTES), 
     126                    getPath(getConfig('rss.output.usemodrewrite') ? "tag/$rtag" : "tags.php?tag=$rtag"), 
     127                    htmlspecialchars($urlTag,ENT_QUOTES) 
     128                    ); 
     129                 
     130                "&nbsp;[<a "."title=\"$cnt " 
     131                . ($cnt > 1 ? __('items') : __('item'))." ". ($cnt > 1 || $cnt == 0 ? __('tagged') : __('tagged'))." '" 
     132                .htmlspecialchars($hrTag,ENT_QUOTES)." ".__('and')." ".htmlspecialchars($rtag,ENT_QUOTES)."'\" " 
     133                ."href=\"".getPath()."" 
     134                    . (getConfig('rss.output.usemodrewrite') ? "tag/$rtag" : "tags.php?tag=$rtag")."" 
     135                    ."+".$urlTag."\">+</a>]"; 
    118136            } 
    119137            $idx = ($relPlus ? $taggedItems->allTags[$rtag] : 0);