X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fpage%2FArticle.php;h=6d370b02d0ad99c5398ed829613ed4ee2b60772e;hb=8d2157c9c28a15fe035c3442d2703c35f2b6c275;hp=b36217ec18c91f898f4e899cdef7335b9b2af558;hpb=c84ba4d86420d7af918e572e2cd4613d7be185b3;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/page/Article.php b/includes/page/Article.php index b36217ec18..6d370b02d0 100644 --- a/includes/page/Article.php +++ b/includes/page/Article.php @@ -99,9 +99,7 @@ class Article implements Page { */ public static function newFromID( $id ) { $t = Title::newFromID( $id ); - # @todo FIXME: Doesn't inherit right - return $t == null ? null : new self( $t ); - # return $t == null ? null : new static( $t ); // PHP 5.3 + return $t == null ? null : new static( $t ); } /** @@ -335,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; @@ -1934,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. @@ -2110,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' ); @@ -2335,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 ); }