*/
protected $mTouched = '19700101000000';
+ /**
+ * @var string
+ */
+ protected $mLinksUpdated = '19700101000000';
+
/**
* @var int|null
*/
$this->mRedirectTarget = null; // Title object if set
$this->mLastRevision = null; // Latest revision
$this->mTouched = '19700101000000';
+ $this->mLinksUpdated = '19700101000000';
$this->mTimestamp = '';
$this->mIsRedirect = false;
$this->mLatest = false;
'page_is_new',
'page_random',
'page_touched',
+ 'page_links_updated',
'page_latest',
'page_len',
);
$this->mId = intval( $data->page_id );
$this->mCounter = intval( $data->page_counter );
$this->mTouched = wfTimestamp( TS_MW, $data->page_touched );
+ $this->mLinksUpdated = wfTimestampOrNull( TS_MW, $data->page_links_updated );
$this->mIsRedirect = intval( $data->page_is_redirect );
$this->mLatest = intval( $data->page_latest );
// Bug 37225: $latest may no longer match the cached latest Revision object.
return $this->mTouched;
}
+ /**
+ * Get the page_links_updated field
+ * @return string|null containing GMT timestamp
+ */
+ public function getLinksTimestamp() {
+ if ( !$this->mDataLoaded ) {
+ $this->loadPageData();
+ }
+ return $this->mLinksUpdated;
+ }
+
/**
* Get the page_latest field
* @return integer rev_id of current revision
// rd_fragment and rd_interwiki were added later, populate them if empty
if ( $row && !is_null( $row->rd_fragment ) && !is_null( $row->rd_interwiki ) ) {
- return $this->mRedirectTarget = Title::makeTitle(
+ $this->mRedirectTarget = Title::makeTitle(
$row->rd_namespace, $row->rd_title,
$row->rd_fragment, $row->rd_interwiki );
+ return $this->mRedirectTarget;
}
// This page doesn't have an entry in the redirect table
- return $this->mRedirectTarget = $this->insertRedirect();
+ $this->mRedirectTarget = $this->insertRedirect();
+ return $this->mRedirectTarget;
}
/**
$user = is_null( $user ) ? $wgUser : $user;
//XXX: check $user->getId() here???
+ // Use a sane default for $serialization_format, see bug 57026
+ if ( $serialization_format === null ) {
+ $serialization_format = $content->getContentHandler()->getDefaultFormat();
+ }
+
if ( $this->mPreparedEdit
&& $this->mPreparedEdit->newContent
&& $this->mPreparedEdit->newContent->equals( $content )
return Status::newFatal( 'readonlytext', wfReadOnlyReason() );
}
+ $this->loadPageData( 'fromdbmaster' );
$restrictionTypes = $this->mTitle->getRestrictionTypes();
-
$id = $this->getId();
if ( !$cascade ) {
return $this->doUpdateRestrictions( $limit, $expiry, $cascade, $reason, $user )->isOK();
}
- /**
- * @deprecated since 1.18
- */
- public function quickEdit( $text, $comment = '', $minor = 0 ) {
- wfDeprecated( __METHOD__, '1.18' );
- global $wgUser;
- $this->doQuickEdit( $text, $wgUser, $comment, $minor );
- }
-
- /**
- * @deprecated since 1.18
- */
- public function viewUpdates() {
- wfDeprecated( __METHOD__, '1.18' );
- global $wgUser;
- $this->doViewUpdates( $wgUser );
- }
-
- /**
- * @deprecated since 1.18
- * @param $oldid int
- * @return bool
- */
- public function useParserCache( $oldid ) {
- wfDeprecated( __METHOD__, '1.18' );
- global $wgUser;
- return $this->isParserCacheUsed( ParserOptions::newFromUser( $wgUser ), $oldid );
- }
-
/**
* Returns a list of updates to be performed when this page is deleted. The updates should remove any information
* about this page from secondary data stores such as links tables.