r11167 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r11166‎ | r11167 | r11168 >
Date:23:40, 30 September 2005
Author:avar
Status:old
Tags:
Comment:
* Removing Special:RandomFA
Modified paths:
  • /trunk/phase3/includes/SpecialPage.php (modified) (history)
  • /trunk/phase3/includes/SpecialRandomFA.php (deleted) (history)
  • /trunk/phase3/languages/Language.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialRandomFA.php
@@ -1,48 +0,0 @@
2 -<?php
3 -/**
4 - * @package MediaWiki
5 - * @subpackage SpecialPage
6 - */
7 -
8 -/**
9 - * Constructor
10 - */
11 -function wfSpecialRandomFA() {
12 - global $wgOut, $wgTitle, $wgArticle, $wgContLang;
13 - $fname = 'wfSpecialRandomFA';
14 -
15 - $dbr =& wfGetDB( DB_SLAVE );
16 - $use_index = $dbr->useIndexClause( 'page_random' );
17 - extract( $dbr->tableNames( 'page', 'pagelinks' ) );
18 -
19 - $randstr = wfRandom();
20 - $ft = Title::newFromText( wfMsgForContent( 'featuredtemplate' ) );
21 - if ( is_null( $ft ) ) {
22 - $title = Title::newFromText( wfMsgForContent( 'mainpage' ) );
23 - $wgOut->redirect( $title->getFullUrl() );
24 - return;
25 - }
26 - $template = $dbr->addQuotes( $ft->getDBkey() );
27 - $sql = "
28 - SELECT page_title, page_random
29 - FROM $pagelinks
30 - LEFT JOIN $page $use_index ON page_id = pl_from
31 - WHERE pl_title = $template AND pl_namespace = " . NS_TEMPLATE . " AND page_namespace = " . NS_TALK . " AND page_random > $randstr
32 - ORDER BY page_random
33 - ";
34 - $sql = $dbr->limitResult($sql, 1, 0);
35 - $res = $dbr->query( $sql, $fname );
36 -
37 - $title = null;
38 - if ( $s = $dbr->fetchObject( $res ) ) {
39 - $title =& Title::makeTitle( NS_MAIN, $s->page_title );
40 - }
41 - if ( is_null( $title ) ) {
42 - # That's not supposed to happen :)
43 - $title = Title::newFromText( wfMsgForContent( 'mainpage' ) );
44 - }
45 - $wgOut->reportTime(); # for logfile
46 - $wgOut->redirect( $title->getFullUrl() );
47 -}
48 -
49 -?>
Index: trunk/phase3/includes/SpecialPage.php
@@ -36,7 +36,6 @@
3737 'Listusers' => new SpecialPage( 'Listusers' ),
3838 'Statistics' => new SpecialPage( 'Statistics' ),
3939 'Random' => new SpecialPage( 'Randompage' ),
40 - 'RandomFA' => new SpecialPage( 'RandomFA' ),
4140 'Lonelypages' => new SpecialPage( 'Lonelypages' ),
4241 'Uncategorizedpages'=> new SpecialPage( 'Uncategorizedpages' ),
4342 'Uncategorizedcategories'=> new SpecialPage( 'Uncategorizedcategories' ),
Index: trunk/phase3/languages/Language.php
@@ -1106,7 +1106,6 @@
11071107 'maintenancebacklink' => 'Back to Maintenance Page',
11081108 'disambiguations' => 'Disambiguation pages',
11091109 'disambiguationspage' => 'Template:disambig',
1110 -'featuredtemplate' => 'Template:Featured',
11111110 'disambiguationstext' => "The following pages link to a <i>disambiguation page</i>. They should link to the appropriate topic instead.<br />A page is treated as disambiguation if it is linked from $1.<br />Links from other namespaces are <i>not</i> listed here.",
11121111 'doubleredirects' => 'Double redirects',
11131112 'doubleredirectstext' => "Each row contains links to the first and second redirect, as well as the first line of the second redirect text, usually giving the \"real\" target page, which the first redirect should point to.",

Status & tagging log