3 function wfSpecialCategories()
5 global $wgUser, $wgOut , $wgLang ;
6 global $article , $category ;
7 $sk = $wgUser->getSkin() ;
8 $sc = "Special:Categories" ;
11 $cat = ucfirst ( wfMsg ( "category" ) ) ;
12 $sql = "SELECT cur_title FROM cur WHERE cur_title LIKE \"{$cat}:%\"" ;
13 $res = wfQuery ( $sql ) ;
14 while ( $x = wfFetchObject ( $res ) )
16 $t = explode ( ":" , $x->cur_title
, 2 ) ;
19 $r .= $sk->makeKnownLink ( $x->cur_title
, $t ) ;
22 wfFreeResult ( $res ) ;
26 $sql = "SELECT DISTINCT bl_to FROM brokenlinks WHERE bl_to LIKE \"{$cat}:%\"" ;
27 $res = wfQuery ( $sql ) ;
29 while ( $x = wfFetchObject ( $res ) )
31 $t = explode ( ":" , $x->bl_to
, 2 ) ;
34 $r .= $sk->makeBrokenLink ( $x->bl_to
, $t ) ;
37 wfFreeResult ( $res ) ;
40 $wgOut->addHTML ( $r ) ;