* @file
*/
use MediaWiki\Linker\LinkTarget;
+use MediaWiki\MediaWikiServices;
/**
* @todo document
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;
*
* @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();
*
* @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();
* @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 ),