getSkin() ; $sc = "Special:Categories" ; # List all existant categories. # Note: this list could become *very large* $r = "
    \n" ; $sql = "SELECT cur_title FROM cur WHERE cur_namespace=".Namespace::getCategory() ; $res = wfQuery ( $sql, DB_READ ) ; while ( $x = wfFetchObject ( $res ) ) { $title =& Title::makeTitle( NS_CATEGORY, $x->cur_title ); $r .= "
  1. " ; $r .= $sk->makeKnownLinkObj ( $title, $title->getText() ) ; $r .= "
  2. \n" ; } wfFreeResult ( $res ) ; $r .= "
\n" ; $r .= "
\n" ; # Links to category pages that haven't been created. # FIXME: This could be slow if there are a lot, but the title index should # make it reasonably snappy since we're using an index. $cat = wfStrencode( $wgLang->getNsText( NS_CATEGORY ) ); $sql = "SELECT DISTINCT bl_to FROM brokenlinks WHERE bl_to LIKE \"{$cat}:%\"" ; $res = wfQuery ( $sql, DB_READ ) ; $r .= "
    \n" ; while ( $x = wfFetchObject ( $res ) ) { $title = Title::newFromDBkey( $x->bl_to ); $r .= "
  1. " ; $r .= $sk->makeBrokenLinkObj( $title, $title->getText() ) ; $r .= "
  2. \n" ; } wfFreeResult ( $res ) ; $r .= "
\n" ; $wgOut->addHTML ( $r ) ; } ?>