/**
 *
 */
function wfSpecialSpecialpages()
{
    global $wgOut, $wgUser;
    $wgOut->setRobotpolicy('index,nofollow');
    $sk = $wgUser->getSkin();
    /** Pages available to all */
    wfSpecialSpecialpages_gen(SpecialPage::getRegularPages(), 'spheading', $sk);
    /** Restricted special pages */
    wfSpecialSpecialpages_gen(SpecialPage::getRestrictedPages(), 'restrictedpheading', $sk);
}
/**
 *
 */
function wfSpecialSpecialpages()
{
    global $wgOut, $wgUser, $wgMessageCache;
    $wgMessageCache->loadAllMessages();
    $wgOut->setRobotpolicy('noindex,nofollow');
    # Is this really needed?
    $sk = $wgUser->getSkin();
    /** Pages available to all */
    wfSpecialSpecialpages_gen(SpecialPage::getRegularPages(), 'spheading', $sk);
    /** Restricted special pages */
    wfSpecialSpecialpages_gen(SpecialPage::getRestrictedPages(), 'restrictedpheading', $sk);
}
Exemple #3
0
 /**
  * show a drop-down box of special pages
  */
 function specialPagesList()
 {
     global $wgUser, $wgContLang, $wgServer, $wgRedirectScript;
     $pages = array_merge(SpecialPage::getRegularPages(), SpecialPage::getRestrictedPages());
     foreach ($pages as $name => $page) {
         $pages[$name] = $page->getDescription();
     }
     $go = wfMsg('go');
     $sp = wfMsg('specialpages');
     $spp = $wgContLang->specialPage('Specialpages');
     $s = '<form id="specialpages" method="get" ' . 'action="' . htmlspecialchars("{$wgServer}{$wgRedirectScript}") . "\">\n";
     $s .= "<select name=\"wpDropdown\">\n";
     $s .= "<option value=\"{$spp}\">{$sp}</option>\n";
     foreach ($pages as $name => $desc) {
         $p = $wgContLang->specialPage($name);
         $s .= "<option value=\"{$p}\">{$desc}</option>\n";
     }
     $s .= "</select>\n";
     $s .= "<input type='submit' value=\"{$go}\" name='redirect' />\n";
     $s .= "</form>\n";
     return $s;
 }