Add Special:Randomrootpage (from RandomRootPage extension)
authorTim Hollmann <me@tim-hollmann.de>
Fri, 15 Jan 2016 23:17:05 +0000 (00:17 +0100)
committerKunal Mehta <legoktm@member.fsf.org>
Mon, 18 Jan 2016 22:12:32 +0000 (14:12 -0800)
Imported RandomRootPage extension as SpecialRandomrootpage, including
its aliases and localization messages.

Bug: T109809
Change-Id: I7252ae9f4a8f1822b023cc4f0d3a732af48d84d3

19 files changed:
autoload.php
includes/specialpage/SpecialPageFactory.php
includes/specials/SpecialRandomrootpage.php [new file with mode: 0644]
languages/i18n/en.json
languages/i18n/qqq.json
languages/messages/MessagesAr.php
languages/messages/MessagesArz.php
languages/messages/MessagesBgn.php
languages/messages/MessagesDe.php
languages/messages/MessagesDiq.php
languages/messages/MessagesEn.php
languages/messages/MessagesEt.php
languages/messages/MessagesFa.php
languages/messages/MessagesKo.php
languages/messages/MessagesMk.php
languages/messages/MessagesNl.php
languages/messages/MessagesVi.php
languages/messages/MessagesZh_hans.php
languages/messages/MessagesZh_hant.php

index 1a7c724..037fa5d 100644 (file)
@@ -1212,6 +1212,7 @@ $wgAutoloadLocalClasses = array(
        'SpecialProtectedtitles' => __DIR__ . '/includes/specials/SpecialProtectedtitles.php',
        'SpecialRandomInCategory' => __DIR__ . '/includes/specials/SpecialRandomInCategory.php',
        'SpecialRandomredirect' => __DIR__ . '/includes/specials/SpecialRandomredirect.php',
+       'SpecialRandomrootpage' => __DIR__ . '/includes/specials/SpecialRandomrootpage.php',
        'SpecialRecentChanges' => __DIR__ . '/includes/specials/SpecialRecentchanges.php',
        'SpecialRecentChangesLinked' => __DIR__ . '/includes/specials/SpecialRecentchangeslinked.php',
        'SpecialRedirect' => __DIR__ . '/includes/specials/SpecialRedirect.php',
index 2bb92bc..2e764ba 100644 (file)
@@ -135,6 +135,7 @@ class SpecialPageFactory {
                'Randompage' => 'RandomPage',
                'RandomInCategory' => 'SpecialRandomInCategory',
                'Randomredirect' => 'SpecialRandomredirect',
+               'Randomrootpage' => 'SpecialRandomrootpage',
 
                // High use pages
                'Mostlinkedcategories' => 'MostlinkedCategoriesPage',
diff --git a/includes/specials/SpecialRandomrootpage.php b/includes/specials/SpecialRandomrootpage.php
new file mode 100644 (file)
index 0000000..31a290d
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+
+/**
+ * Implements Special:Randomrootpage
+ *
+ * Copyright © 2008 Hojjat (aka Huji)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup SpecialPage
+ */
+
+class SpecialRandomrootpage extends RandomPage {
+
+       public function __construct() {
+               parent::__construct( 'Randomrootpage' );
+               $dbr = wfGetDB( DB_SLAVE );
+               $this->extra[] = 'page_title NOT ' . $dbr->buildLike( $dbr->anyString(), '/', $dbr->anyString() );
+       }
+
+       // Don't select redirects
+       public function isRedirect() {
+               return false;
+       }
+}
index 4f38497..515bee1 100644 (file)
        "sessionmanager-tie": "Cannot combine multiple request authentication types: $1.",
        "sessionprovider-generic": "$1 sessions",
        "sessionprovider-mediawiki-session-cookiesessionprovider": "cookie-based sessions",
-       "sessionprovider-nocookies": "Cookies may be disabled. Ensure you have cookies enabled and start again."
+       "sessionprovider-nocookies": "Cookies may be disabled. Ensure you have cookies enabled and start again.",
+       "randomrootpage": "Random root page"
 }
index 685d3ac..3eb1703 100644 (file)
        "sessionmanager-tie": "Used as an error message when multiple session sources are tied in priority.\n\nParameters:\n* $1 - List of dession type descriptions, from messages like {{msg-mw|sessionprovider-mediawiki-session-cookiesessionprovider}}.",
        "sessionprovider-generic": "Used to create a generic session type description when one isn't provided via the proper message. Should be phrased to make sense when added to a message such as {{msg-mw|cannotloginnow-text}}.\n\nParameters:\n* $1 - PHP classname.",
        "sessionprovider-mediawiki-session-cookiesessionprovider": "Description of the sessions provided by the CookieSessionProvider class, which use HTTP cookies. Should be phrased to make sense when added to a message such as {{msg-mw|cannotloginnow-text}}.",
-       "sessionprovider-nocookies": "Used to inform the user that sessions may be missing due to lack of cookies."
+       "sessionprovider-nocookies": "Used to inform the user that sessions may be missing due to lack of cookies.",
+       "randomrootpage": "{{doc-special|RandomRootPage}}"
 }
index 5441237..8afa04b 100644 (file)
@@ -380,6 +380,7 @@ $specialPageAliases = array(
        'Randompage'                => array( 'عشوائي', 'صفحة_عشوائية' ),
        'RandomInCategory'          => array( 'عشوائي_في_تصنيف' ),
        'Randomredirect'            => array( 'تحويلة_عشوائية' ),
+       'Randomrootpage'            => array( 'صفحة_جذر_عشوائية' ),
        'Recentchanges'             => array( 'أحدث_التغييرات' ),
        'Recentchangeslinked'       => array( 'أحدث_التغييرات_الموصولة', 'تغييرات_مرتبطة' ),
        'Redirect'                  => array( 'تحويل' ),
index e2078ad..99b7db5 100644 (file)
@@ -109,6 +109,7 @@ $specialPageAliases = array(
        'Randompage'                => array( 'عشوائى', 'صفحه_عشوائيه' ),
        'RandomInCategory'          => array( 'عشوائى_جوه_تصنيف' ),
        'Randomredirect'            => array( 'تحويله_عشوائيه' ),
+       'Randomrootpage'            => array( 'صفحه_جدر_عشوائيه' ),
        'Recentchanges'             => array( 'اخر_تعديلات' ),
        'Recentchangeslinked'       => array( 'اجدد_التغييرات_اللى_معمول_ليها_لينك', 'تغييرات_مرتبطه' ),
        'Redirect'                  => array( 'تحويل' ),
index 45a13bf..1f74047 100644 (file)
@@ -113,6 +113,7 @@ $specialPageAliases = array(
        'Randompage'                => array( 'تسادوپین_وّرق' ),
        'RandomInCategory'          => array( 'تسادوپی_بئ_تهری_تا' ),
        'Randomredirect'            => array( 'تسادوپین_تغیرمیسر' ),
+       'Randomrootpage'            => array( 'تسادوپین_پایگ_ئی_وّرق' ),
        'Recentchanges'             => array( 'آخیرئین_تغیران' ),
        'Recentchangeslinked'       => array( 'مربوتین_تغیران' ),
        'Redirect'                  => array( 'تغیرمسیر' ),
index b5c1475..c31d745 100644 (file)
@@ -112,6 +112,7 @@ $specialPageAliases = array(
        'Randompage'                => array( 'Zufällige_Seite' ),
        'RandomInCategory'          => array( 'Zufällig_in_Kategorie' ),
        'Randomredirect'            => array( 'Zufällige_Weiterleitung' ),
+       'Randomrootpage'            => array( 'Zufällige_Stammseite' ),
        'Recentchanges'             => array( 'Letzte_Änderungen' ),
        'Recentchangeslinked'       => array( 'Änderungen_an_verlinkten_Seiten' ),
        'Redirect'                  => array( 'Weiterleitung' ),
index 6adf6f1..69ccb44 100644 (file)
@@ -125,6 +125,7 @@ $specialPageAliases = array(
        'Randompage'                => array( 'Raştameye', 'PelaRaştameyiye' ),
        'RandomInCategory'          => array( 'KategoriyaRaştameyiye' ),
        'Randomredirect'            => array( 'SerberdışoRaştameye' ),
+       'Randomrootpage'            => array( 'RaştamayePerraréçi' ),
        'Recentchanges'             => array( 'VurnayışêPeyêni' ),
        'Recentchangeslinked'       => array( 'GıreyêVurnayışêPeyênan' ),
        'Redirect'                  => array( 'Serberdış' ),
index 165fef1..2a1f85b 100644 (file)
@@ -463,6 +463,7 @@ $specialPageAliases = array(
        'Randompage'                => array( 'Random', 'RandomPage' ),
        'RandomInCategory'          => array( 'RandomInCategory' ),
        'Randomredirect'            => array( 'RandomRedirect' ),
+       'Randomrootpage'            => array( 'RandomRootpage' ),
        'Recentchanges'             => array( 'RecentChanges' ),
        'Recentchangeslinked'       => array( 'RecentChangesLinked', 'RelatedChanges' ),
        'Redirect'                  => array( 'Redirect' ),
index b8ef360..912b33d 100644 (file)
@@ -101,6 +101,7 @@ $specialPageAliases = array(
        'Randompage'                => array( 'Juhuslik_artikkel' ),
        'RandomInCategory'          => array( 'Juhuslik_kategoorias' ),
        'Randomredirect'            => array( 'Juhuslik_ümbersuunamine' ),
+       'Randomrootpage'            => array( 'Juhuslik_juurlehekülg' ),
        'Recentchanges'             => array( 'Viimased_muudatused' ),
        'Recentchangeslinked'       => array( 'Seotud_muudatused' ),
        'Redirect'                  => array( 'Ümbersuunamine' ),
index fa359fc..57fdc4e 100644 (file)
@@ -112,6 +112,7 @@ $specialPageAliases = array(
        'Randompage'                => array( 'صفحهٔ_تصادفی' ),
        'RandomInCategory'          => array( 'تصادفی_در_رده' ),
        'Randomredirect'            => array( 'تغییرمسیر_تصادفی' ),
+       'Randomrootpage'            => array( 'صفحهٔ_پایهٔ_تصادفی' ),
        'Recentchanges'             => array( 'تغییرات_اخیر' ),
        'Recentchangeslinked'       => array( 'تغییرات_مرتبط' ),
        'Redirect'                  => array( 'تغییرمسیر' ),
index 0da2291..2099614 100644 (file)
@@ -146,6 +146,7 @@ $specialPageAliases = array(
        'Randompage'                => array( '임의문서' ),
        'RandomInCategory'          => array( '분류안의임의문서' ),
        'Randomredirect'            => array( '임의넘겨주기' ),
+       'Randomrootpage'            => array( '임의최상위문서', '임의루트문서' ),
        'Recentchanges'             => array( '최근바뀜' ),
        'Recentchangeslinked'       => array( '링크최근바뀜' ),
        'Redirect'                  => array( '넘겨주기' ),
index 3c7b31d..d94518d 100644 (file)
@@ -166,6 +166,7 @@ $specialPageAliases = array(
        'Randompage'                => array( 'Случајна', 'СлучајнаСтраница' ),
        'RandomInCategory'          => array( 'СлучајнаВоКатегорија' ),
        'Randomredirect'            => array( 'СлучајноПренасочување' ),
+       'Randomrootpage'            => array( 'СлучајнаОсновнаСтраница' ),
        'Recentchanges'             => array( 'СкорешниПромени' ),
        'Recentchangeslinked'       => array( 'ПоврзаниПромени' ),
        'Redirect'                  => array( 'Пренасочување' ),
index 27af255..9ac713e 100644 (file)
@@ -342,6 +342,7 @@ $specialPageAliases = array(
        'Randompage'                => array( 'Willekeurig', 'WillekeurigePagina' ),
        'RandomInCategory'          => array( 'WillekeurigeUitCategorie' ),
        'Randomredirect'            => array( 'WillekeurigeDoorverwijzing' ),
+       'Randomrootpage'            => array( 'WillekeurigeHoofdpagina' ),
        'Recentchanges'             => array( 'RecenteWijzigingen' ),
        'Recentchangeslinked'       => array( 'RecenteWijzigingenGelinkt', 'VerwanteWijzigingen' ),
        'Redirect'                  => array( 'Doorverwijzen' ),
index 56ee88c..94743c9 100644 (file)
@@ -132,6 +132,7 @@ $specialPageAliases = array(
        'Randompage'                => array( 'Ngẫu_nhiên' ),
        'RandomInCategory'          => array( 'Ngẫu_nhiên_trong_thể_loại' ),
        'Randomredirect'            => array( 'Đổi_hướng_ngẫu_nhiên' ),
+       'Randomrootpage'            => array( 'Trang_gốc_ngẫu_nhiên' ),
        'Recentchanges'             => array( 'Thay_đổi_gần_đây' ),
        'Recentchangeslinked'       => array( 'Thay_đổi_liên_quan' ),
        'Redirect'                  => array( 'Đổi_hướng' ),
index 57c9a61..33af7af 100644 (file)
@@ -206,6 +206,7 @@ $specialPageAliases = array(
        'Randompage'                => array( '随机', '随机页面' ),
        'RandomInCategory'          => array( '分类内随机' ),
        'Randomredirect'            => array( '随机重定向', '随机重定向页' ),
+       'Randomrootpage'            => array( '随机根页面' ),
        'Recentchanges'             => array( '最近更改' ),
        'Recentchangeslinked'       => array( '最近链出更改', '相关更改' ),
        'Redirect'                  => array( '重定向' ),
index 1f6bcfa..20fd54a 100644 (file)
@@ -190,6 +190,7 @@ $specialPageAliases = array(
        'Randompage'                => array( '隨機頁面' ),
        'RandomInCategory'          => array( '隨機分類頁面', '於分類中隨機' ),
        'Randomredirect'            => array( '隨機重新導向', '隨機重定向頁面' ),
+       'Randomrootpage'            => array( '隨機根頁面' ),
        'Recentchanges'             => array( '最近變更', '最近更改' ),
        'Recentchangeslinked'       => array( '已連結的最近變更', '相關變更', '連出更改' ),
        'Redirect'                  => array( '重新導向', '重定向' ),