Merge "Add CollationFa"
[lhc/web/wiklou.git] / includes / Revision.php
index 208652f..81bba55 100644 (file)
@@ -20,6 +20,7 @@
  * @file
  */
 use MediaWiki\Linker\LinkTarget;
+use MediaWiki\MediaWikiServices;
 
 /**
  * @todo document
@@ -86,6 +87,7 @@ class Revision implements IDBAccessObject {
        const DELETED_USER = 4;
        const DELETED_RESTRICTED = 8;
        const SUPPRESSED_USER = 12; // convenience
+       const SUPPRESSED_ALL = 15; // convenience
 
        // Audience options for accessors
        const FOR_PUBLIC = 1;
@@ -1129,7 +1131,7 @@ class Revision implements IDBAccessObject {
         *
         * @return string The content model id associated with this revision,
         *     see the CONTENT_MODEL_XXX constants.
-        **/
+        */
        public function getContentModel() {
                if ( !$this->mContentModel ) {
                        $title = $this->getTitle();
@@ -1153,7 +1155,7 @@ class Revision implements IDBAccessObject {
         *
         * @return string The content format id associated with this revision,
         *     see the CONTENT_FORMAT_XXX constants.
-        **/
+        */
        public function getContentFormat() {
                if ( !$this->mContentFormat ) {
                        $handler = $this->getContentHandler();
@@ -1902,7 +1904,7 @@ class Revision implements IDBAccessObject {
         * @since 1.28
         */
        public static function newKnownCurrent( IDatabase $db, $pageId, $revId ) {
-               $cache = ObjectCache::getMainWANInstance();
+               $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
                return $cache->getWithSetCallback(
                        // Page/rev IDs passed in from DB to reflect history merges
                        $cache->makeGlobalKey( 'revision', $db->getWikiID(), $pageId, $revId ),