From: Kunal Mehta Date: Sat, 21 Jun 2014 06:09:18 +0000 (-0700) Subject: ApiParse: Add disableeditsection parameter X-Git-Tag: 1.31.0-rc.0~15289^2 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=933df271bed6978521340f6e583c7a8d09e6a26d;p=lhc%2Fweb%2Fwiklou.git ApiParse: Add disableeditsection parameter To disable edit section links in the parser output Bug: 62723 Change-Id: I499c4bb0cd85964e78db3362e13a8033a2e9aed0 --- diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php index a276117387..86ce1f179c 100644 --- a/includes/api/ApiParse.php +++ b/includes/api/ApiParse.php @@ -436,6 +436,7 @@ class ApiParse extends ApiBase { $popts->enableLimitReport( !$params['disablepp'] ); $popts->setIsPreview( $params['preview'] || $params['sectionpreview'] ); $popts->setIsSectionPreview( $params['sectionpreview'] ); + $popts->setEditSection( !$params['disableeditsection'] ); wfProfileOut( __METHOD__ ); @@ -748,6 +749,7 @@ class ApiParse extends ApiBase { 'uselang' => null, 'section' => null, 'disablepp' => false, + 'disableeditsection' => false, 'generatexml' => false, 'preview' => false, 'sectionpreview' => false, @@ -816,6 +818,7 @@ class ApiParse extends ApiBase { 'uselang' => 'Which language to parse the request in', 'section' => 'Only retrieve the content of this section number', 'disablepp' => 'Disable the PP Report from the parser output', + 'disableeditsection' => 'Disable edit section links from the parser output', 'generatexml' => "Generate XML parse tree (requires contentmodel=$wikitext)", 'preview' => 'Parse in preview mode', 'sectionpreview' => 'Parse in section preview mode (enables preview mode too)',