Merge "Surround edit notices with appropriate classes"
[lhc/web/wiklou.git] / includes / api / ApiParse.php
index d25c87a..83d2cbc 100644 (file)
@@ -87,7 +87,7 @@ class ApiParse extends ApiBase {
                if ( !is_null( $oldid ) || !is_null( $pageid ) || !is_null( $page ) ) {
                        if ( !is_null( $oldid ) ) {
                                // Don't use the parser cache
-                               $rev = Revision::newFromID( $oldid );
+                               $rev = Revision::newFromId( $oldid );
                                if ( !$rev ) {
                                        $this->dieUsage( "There is no revision ID $oldid", 'missingrev' );
                                }
@@ -267,7 +267,7 @@ class ApiParse extends ApiBase {
                                // Link flags are ignored for now, but may in the future be
                                // included in the result.
                                $linkFlags = array();
-                               wfRunHooks( 'LanguageLinks', array( $titleObj, &$langlinks, &$linkFlags ) );
+                               Hooks::run( 'LanguageLinks', array( $titleObj, &$langlinks, &$linkFlags ) );
                        }
                } else {
                        $langlinks = false;
@@ -376,7 +376,7 @@ class ApiParse extends ApiBase {
                                $this->dieUsage( "generatexml is only supported for wikitext content", "notwikitext" );
                        }
 
-                       $wgParser->startExternalParse( $titleObj, $popts, OT_PREPROCESS );
+                       $wgParser->startExternalParse( $titleObj, $popts, Parser::OT_PREPROCESS );
                        $dom = $wgParser->preprocessToDom( $this->content->getNativeData() );
                        if ( is_callable( array( $dom, 'saveXML' ) ) ) {
                                $xml = $dom->saveXML();
@@ -419,7 +419,6 @@ class ApiParse extends ApiBase {
         * @return ParserOptions
         */
        protected function makeParserOptions( WikiPage $pageObj, array $params ) {
-               wfProfileIn( __METHOD__ );
 
                $popts = $pageObj->makeParserOptions( $this->getContext() );
                $popts->enableLimitReport( !$params['disablepp'] );
@@ -427,8 +426,6 @@ class ApiParse extends ApiBase {
                $popts->setIsSectionPreview( $params['sectionpreview'] );
                $popts->setEditSection( !$params['disableeditsection'] );
 
-               wfProfileOut( __METHOD__ );
-
                return $popts;
        }
 
@@ -721,7 +718,7 @@ class ApiParse extends ApiBase {
                );
        }
 
-       public function getExamplesMessages() {
+       protected function getExamplesMessages() {
                return array(
                        'action=parse&page=Project:Sandbox'
                                => 'apihelp-parse-example-page',