From: Mark Holmquist Date: Tue, 5 Mar 2013 23:32:52 +0000 (-0800) Subject: Return empty string for trail/prefix if disabled X-Git-Tag: 1.31.0-rc.0~20472^2 X-Git-Url: http://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=badfb9b13f3b66df76f82cc2d01a26f7bb1c827f;p=lhc%2Fweb%2Fwiklou.git 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 --- 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'] );