From badfb9b13f3b66df76f82cc2d01a26f7bb1c827f Mon Sep 17 00:00:00 2001 From: Mark Holmquist Date: Tue, 5 Mar 2013 15:32:52 -0800 Subject: [PATCH] Return empty string for trail/prefix if disabled This is necessary so Parsoid can know when the API doesn't have the linktrail/ prefix feature and when the API is actually telling us that the trail/prefix is/are disabled. Bug: 41151 Change-Id: If0895d507fe1b473e42bceb135d4030106ded442 --- includes/api/ApiQuerySiteinfo.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/api/ApiQuerySiteinfo.php b/includes/api/ApiQuerySiteinfo.php index ac13589b07..596fd0661a 100644 --- a/includes/api/ApiQuerySiteinfo.php +++ b/includes/api/ApiQuerySiteinfo.php @@ -139,11 +139,15 @@ class ApiQuerySiteinfo extends ApiQueryBase { if ( $wgContLang->linkPrefixExtension() ) { $data['linkprefix'] = wfMessage( 'linkprefix' )->inContentLanguage()->text(); + } else { + $data['linkprefix'] = ''; } $linktrail = $wgContLang->linkTrail(); if ( $linktrail ) { $data['linktrail'] = $linktrail; + } else { + $data['linktrail'] = ''; } $git = SpecialVersion::getGitHeadSha1( $GLOBALS['IP'] ); -- 2.20.1