From: Roan Kattouw Date: Mon, 4 Feb 2008 17:53:07 +0000 (+0000) Subject: (bug 12905) Created [[Special:API]] which just 302s to $wgScriptPath/api.php X-Git-Tag: 1.31.0-rc.0~49619 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=bb766e491f48f541e4f10e933f3c3108bf31e226;p=lhc%2Fweb%2Fwiklou.git (bug 12905) Created [[Special:API]] which just 302s to $wgScriptPath/api.php --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index c2230b6136..27956e74cb 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -155,6 +155,7 @@ 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 3be70ee099..af58c4749f 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -152,6 +152,7 @@ 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; @@ -848,3 +849,19 @@ 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; + $wgOut->redirect("$wgScriptPath/api.php?$par"); + } +}