From 307a7b6433a4e9eeab173215e0791314b07a8240 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 4 Feb 2008 21:57:50 +0000 Subject: [PATCH] Revert r30537, 30539 (Special:API redirect) Even if this has no security issues, it seems pretty broken and limited. The API likes to use characters which are illegal in page titles, so you couldn't pass them on from this special page. I don't recommend reapplying this. --- RELEASE-NOTES | 1 - includes/SpecialPage.php | 20 -------------------- 2 files changed, 21 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index c3d136e667..14bd2c52f6 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -155,7 +155,6 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 10365) Localization of Special:Version * When installing using Postgres, the Pl/Pgsql language is now checked for and installed when at the superuser level. -* Added [[Special:API]] shortcut to api.php === Bug fixes in 1.12 === diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index ac05c68b4d..3be70ee099 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -152,7 +152,6 @@ class SpecialPage 'Listadmins' => array( 'SpecialRedirectToSpecial', 'Listadmins', 'Listusers', 'sysop' ), 'MergeHistory' => array( 'SpecialPage', 'MergeHistory', 'mergehistory' ), 'Listbots' => array( 'SpecialRedirectToSpecial', 'Listbots', 'Listusers', 'bot' ), - 'API' => array( 'SpecialAPI' ), ); static public $mAliases; @@ -849,22 +848,3 @@ class SpecialMycontributions extends UnlistedSpecialPage { return SpecialPage::getTitleFor( 'Contributions', $wgUser->getName() ); } } - -/** - * Shortcut to api.php - * - * Unfortunately we can't use SpecialRedirectToSpecial here - */ -class SpecialAPI extends UnlistedSpecialPage { - function __construct() { - parent::__construct('API'); - } - - function execute($par) { - global $wgScriptPath, $wgOut; - if($par != '') - $wgOut->redirect("$wgScriptPath/api.php?$par"); - else - $wgOut->redirect("$wgScriptPath/api.php"); - } -} -- 2.20.1