Change-Id: Ib7e4c3ef2b2dbc0807c3823992d2164d2c68c8cb
if ( $rt->isExternal() ) {
if ( $rt->isLocal() ) {
// Offsite wikis need an HTTP redirect.
if ( $rt->isExternal() ) {
if ( $rt->isLocal() ) {
// Offsite wikis need an HTTP redirect.
// This can be hard to reverse and may produce loops,
// so they may be disabled in the site configuration.
$source = $this->mTitle->getFullURL( 'redirect=no' );
// This can be hard to reverse and may produce loops,
// so they may be disabled in the site configuration.
$source = $this->mTitle->getFullURL( 'redirect=no' );
if ( $rt->isSpecialPage() ) {
// Gotta handle redirects to special pages differently:
if ( $rt->isSpecialPage() ) {
// Gotta handle redirects to special pages differently:
- // Fill the HTTP response "Location" header and ignore
- // the rest of the page we're on.
- //
- // Some pages are not valid targets
+ // Fill the HTTP response "Location" header and ignore the rest of the page we're on.
+ // Some pages are not valid targets.
if ( $rt->isValidRedirectTarget() ) {
return $rt->getFullURL();
} else {
if ( $rt->isValidRedirectTarget() ) {
return $rt->getFullURL();
} else {
}
$revisionId = $revision->insertOn( $dbw );
}
$revisionId = $revision->insertOn( $dbw );
// We check for conflicts by comparing $oldid with the current latest revision ID.
$ok = $this->updateRevisionOn( $dbw, $revision, $oldid, $oldIsRedirect );
// We check for conflicts by comparing $oldid with the current latest revision ID.
$ok = $this->updateRevisionOn( $dbw, $revision, $oldid, $oldIsRedirect );
$bitfield = 'rev_deleted';
}
$bitfield = 'rev_deleted';
}
- // For now, shunt the revision data into the archive table.
- // Text is *not* removed from the text table; bulk storage
- // is left intact to avoid breaking block-compression or
- // immutable storage schemes.
- //
- // For backwards compatibility, note that some older archive
- // table entries will have ar_text and ar_flags fields still.
- //
- // In the future, we may keep revisions and mark them with
- // the rev_deleted field, which is reserved for this purpose.
+ /**
+ * For now, shunt the revision data into the archive table.
+ * Text is *not* removed from the text table; bulk storage
+ * is left intact to avoid breaking block-compression or
+ * immutable storage schemes.
+ *
+ * For backwards compatibility, note that some older archive
+ * table entries will have ar_text and ar_flags fields still.
+ *
+ * In the future, we may keep revisions and mark them with
+ * the rev_deleted field, which is reserved for this purpose.
+ */
$row = array(
'ar_namespace' => 'page_namespace',
$row = array(
'ar_namespace' => 'page_namespace',