Various additions and fixes
[mediawiki.git] / includes / SpecialSpecialpages.php
blob0488a27bf55000cb1efc5e9b0acee3bf79443c5b
1 <?
3 function wfSpecialSpecialpages()
5 global $wgUser, $wgOut, $wgLang;
7 $wgOut->setRobotpolicy( "index,nofollow" );
9 $sk = $wgUser->getSkin();
10 $validSP = $wgLang->getValidSpecialPages();
11 $wgOut->addHTML( "<h2>" . wfMsg( "spheading" ) . "</h2>\n<ul>" );
13 foreach ( $validSP as $name => $desc ) {
14 if ( "" == $desc ) { continue; }
15 $link = $sk->makeKnownLink( $wgLang->specialPage( $name ), $desc );
16 $wgOut->addHTML( "<li>{$link}</li>\n" );
18 $wgOut->addHTML( "</ul>\n" );
20 if ( $wgUser->isSysop() ) {
21 $sysopSP = $wgLang->getSysopSpecialPages();
22 $wgOut->addHTML( "<h2>" . wfMsg( "sysopspheading" ) . "</h2>\n<ul>" );
24 foreach ( $sysopSP as $name => $desc ) {
25 if ( "" == $desc ) { continue; }
26 $link = $sk->makeKnownLink( $wgLang->specialPage( $name ), $desc );
27 $wgOut->addHTML( "<li>{$link}</li>\n" );
29 $wgOut->addHTML( "</ul>\n" );
32 if ( $wgUser->isDeveloper() ) {
33 $devSP = $wgLang->getDeveloperSpecialPages();
34 $wgOut->addHTML( "<h2>" . wfMsg( "developerspheading" ) .
35 "</h2>\n<ul>" );
37 foreach ( $devSP as $name => $desc ) {
38 if ( "" == $desc ) { continue; }
39 $link = $sk->makeKnownLink( $wgLang->specialPage( $name ), $desc );
40 $wgOut->addHTML( "<li>{$link}</li>\n" );
42 $wgOut->addHTML( "</ul>\n" );