Make ShowRawCssJs hook emit deprecated warnings
[lhc/web/wiklou.git] / includes / page / Article.php
index 770ae31..4fdbdea 100644 (file)
@@ -623,9 +623,11 @@ class Article implements Page {
 
                                                # Allow extensions do their own custom view for certain pages
                                                $outputDone = true;
-                                       } elseif ( !ContentHandler::runLegacyHooks( 'ArticleViewCustom',
-                                                       [ $this->fetchContentObject(), $this->getTitle(), $outputPage ] ) ) {
-
+                                       } elseif ( !ContentHandler::runLegacyHooks(
+                                               'ArticleViewCustom',
+                                               [ $this->fetchContentObject(), $this->getTitle(), $outputPage ],
+                                               '1.21'
+                                       ) ) {
                                                # Allow extensions do their own custom view for certain pages
                                                $outputDone = true;
                                        }
@@ -798,8 +800,9 @@ class Article implements Page {
                        // Give hooks a chance to customise the output
                        if ( ContentHandler::runLegacyHooks(
                                'ShowRawCssJs',
-                               [ $this->mContentObject, $this->getTitle(), $outputPage ] )
-                       ) {
+                               [ $this->mContentObject, $this->getTitle(), $outputPage ],
+                               '1.24'
+                       ) ) {
                                // If no legacy hooks ran, display the content of the parser output, including RL modules,
                                // but excluding metadata like categories and language links
                                $po = $this->mContentObject->getParserOutput( $this->getTitle() );
@@ -2114,7 +2117,7 @@ class Article implements Page {
         * @deprecated since 1.21: use doEditContent() instead.
         */
        public function doEdit( $text, $summary, $flags = 0, $baseRevId = false, $user = null ) {
-               ContentHandler::deprecated( __METHOD__, '1.21' );
+               wfDeprecated( __METHOD__, '1.21' );
                return $this->mPage->doEdit( $text, $summary, $flags, $baseRevId, $user );
        }
 
@@ -2154,18 +2157,6 @@ class Article implements Page {
                return $this->mPage->getLastPurgeTimestamp();
        }
 
-       /**
-        * Call to WikiPage function for backwards compatibility.
-        * @see WikiPage::doQuickEditContent
-        */
-       public function doQuickEditContent(
-               Content $content, User $user, $comment = '', $minor = false, $serialFormat = null
-       ) {
-               return $this->mPage->doQuickEditContent(
-                       $content, $user, $comment, $minor, $serialFormat
-               );
-       }
-
        /**
         * Call to WikiPage function for backwards compatibility.
         * @see WikiPage::doViewUpdates
@@ -2508,6 +2499,7 @@ class Article implements Page {
 
        /**
         * Call to WikiPage function for backwards compatibility.
+        * @deprecated since 1.21, use prepareContentForEdit
         * @see WikiPage::prepareTextForEdit
         */
        public function prepareTextForEdit( $text, $revid = null, User $user = null ) {