X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=api.php;h=fe13263921325359393fde1ed37c79e52ebd4894;hb=cbf0404caa43b18059abe91c74c2d536286a83b6;hp=db9de75156e9502a8548fdf9a7258ba42b33d8ad;hpb=d69b967481649acbf8fa3d4e60df821bd24fda01;p=lhc%2Fweb%2Fwiklou.git diff --git a/api.php b/api.php index db9de75156..fe13263921 100644 --- a/api.php +++ b/api.php @@ -44,7 +44,7 @@ if ( !$wgRequest->checkUrlExtension() ) { // PATH_INFO can be used for stupid things. We don't support it for api.php at // all, so error out if it's present. if ( isset( $_SERVER['PATH_INFO'] ) && $_SERVER['PATH_INFO'] != '' ) { - $correctUrl = wfAppendQuery( wfScript( 'api' ), $wgRequest->getQueryValues() ); + $correctUrl = wfAppendQuery( wfScript( 'api' ), $wgRequest->getQueryValuesOnly() ); $correctUrl = wfExpandUrl( $correctUrl, PROTO_CANONICAL ); header( "Location: $correctUrl", true, 301 ); echo 'This endpoint does not support "path info", i.e. extra text between "api.php"' @@ -61,10 +61,9 @@ $wgTitle = Title::makeTitle( NS_SPECIAL, 'Badtitle/dummy title for API calls set RequestContext::getMain()->setTitle( $wgTitle ); try { - /* Construct an ApiMain with the arguments passed via the URL. What we get back - * is some form of an ApiMain, possibly even one that produces an error message, - * but we don't care here, as that is handled by the constructor. - */ + // Construct an ApiMain with the arguments passed via the URL. What we get back + // is some form of an ApiMain, possibly even one that produces an error message, + // but we don't care here, as that is handled by the constructor. $processor = new ApiMain( RequestContext::getMain(), true ); // Last chance hook before executing the API