X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fpage%2FArticle.php;h=6d370b02d0ad99c5398ed829613ed4ee2b60772e;hb=8d2157c9c28a15fe035c3442d2703c35f2b6c275;hp=ea920f12e6b9b9122cad17e10a7267aa4e45c411;hpb=978092f7844bcc69a8931f40bf51a057169829d1;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/page/Article.php b/includes/page/Article.php index ea920f12e6..6d370b02d0 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -333,7 +333,7 @@ class Article implements Page { function fetchContent() { // BC cruft! - ContentHandler::deprecated( __METHOD__, '1.21' ); + wfDeprecated( __METHOD__, '1.21' ); if ( $this->mContentLoaded && $this->mContent ) { return $this->mContent; @@ -1932,12 +1932,13 @@ class Article implements Page { /** * Check if the page can be cached + * @param integer $mode One of the HTMLFileCache::MODE_* constants (since 1.28) * @return bool */ - public function isFileCacheable() { + public function isFileCacheable( $mode = HTMLFileCache::MODE_NORMAL ) { $cacheable = false; - if ( HTMLFileCache::useFileCache( $this->getContext() ) ) { + if ( HTMLFileCache::useFileCache( $this->getContext(), $mode ) ) { $cacheable = $this->mPage->getId() && !$this->mRedirectedFrom && !$this->getTitle()->isRedirect(); // Extension may have reason to disable file caching on some pages. @@ -2108,6 +2109,8 @@ class Article implements Page { /** * Call to WikiPage function for backwards compatibility. * @see WikiPage::doEdit + * + * @deprecated since 1.21: use doEditContent() instead. */ public function doEdit( $text, $summary, $flags = 0, $baseRevId = false, $user = null ) { ContentHandler::deprecated( __METHOD__, '1.21' ); @@ -2138,8 +2141,16 @@ class Article implements Page { * Call to WikiPage function for backwards compatibility. * @see WikiPage::doPurge */ - public function doPurge() { - return $this->mPage->doPurge(); + public function doPurge( $flags = WikiPage::PURGE_ALL ) { + return $this->mPage->doPurge( $flags ); + } + + /** + * Call to WikiPage function for backwards compatibility. + * @see WikiPage::getLastPurgeTimestamp + */ + public function getLastPurgeTimestamp() { + return $this->mPage->getLastPurgeTimestamp(); } /** @@ -2325,9 +2336,10 @@ class Article implements Page { /** * Call to WikiPage function for backwards compatibility. * @see WikiPage::getText + * @deprecated since 1.21 use WikiPage::getContent() instead */ public function getText( $audience = Revision::FOR_PUBLIC, User $user = null ) { - ContentHandler::deprecated( __METHOD__, '1.21' ); + wfDeprecated( __METHOD__, '1.21' ); return $this->mPage->getText( $audience, $user ); }