API: (bug 17239) Added prop=displaytitle to action=parse
authorRoan Kattouw <catrope@users.mediawiki.org>
Sat, 31 Jan 2009 16:29:15 +0000 (16:29 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Sat, 31 Jan 2009 16:29:15 +0000 (16:29 +0000)
RELEASE-NOTES
includes/api/ApiParse.php

index e111b80..7f9976c 100644 (file)
@@ -139,6 +139,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 17182) Fix pretty printer so URLs with parentheses in them are
   autolinked correctly
 * (bug 17224) Added siprop=rightsinfo to meta=siteinfo
+* (bug 17239) Added prop=displaytitle to action=parse
 
 === Languages updated in 1.15 ===
 
index 50b19e2..eb599a3 100644 (file)
@@ -151,6 +151,8 @@ class ApiParse extends ApiBase {
                        $result_array['externallinks'] = array_keys($p_result->getExternalLinks());
                if(isset($prop['sections']))
                        $result_array['sections'] = $p_result->getSections();
+               if(isset($prop['displaytitle']))
+                       $result_array['displaytitle'] = $p_result->getDisplayTitle();
                if(!is_null($oldid))
                        $result_array['revid'] = $oldid;
 
@@ -223,7 +225,7 @@ class ApiParse extends ApiBase {
                        'redirects' => false,
                        'oldid' => null,
                        'prop' => array(
-                               ApiBase :: PARAM_DFLT => 'text|langlinks|categories|links|templates|images|externallinks|sections|revid',
+                               ApiBase :: PARAM_DFLT => 'text|langlinks|categories|links|templates|images|externallinks|sections|revid|displaytitle',
                                ApiBase :: PARAM_ISMULTI => true,
                                ApiBase :: PARAM_TYPE => array(
                                        'text',
@@ -234,7 +236,8 @@ class ApiParse extends ApiBase {
                                        'images',
                                        'externallinks',
                                        'sections',
-                                       'revid'
+                                       'revid',
+                                       'displaytitle',
                                )
                        ),
                        'pst' => false,