$tables = array( 'revision', 'user' );
$fields = array(
- 'rev_user as user_id',
- 'rev_user_text AS user_name',
+ 'user_id' => 'rev_user',
+ 'user_name' => 'rev_user_text',
$realNameField,
- 'MAX(rev_timestamp) AS timestamp',
+ 'timestamp' => 'MAX(rev_timestamp)',
);
$conds = array( 'rev_page' => $this->getId() );
wfDebug( __METHOD__ . ": invalid username\n" );
} elseif ( User::isIP( $shortTitle ) ) {
// An anonymous user
- $other->setNewtalk( true );
+ $other->setNewtalk( true, $revision );
} elseif ( $other->isLoggedIn() ) {
- $other->setNewtalk( true );
+ $other->setNewtalk( true, $revision );
} else {
wfDebug( __METHOD__ . ": don't need to notify a nonexistent user\n" );
}
* Deletes the article with database consistency, writes logs, purges caches
*
* @param $reason string delete reason for deletion log
- * @param $suppress int bitfield
- * Revision::DELETED_TEXT
- * Revision::DELETED_COMMENT
- * Revision::DELETED_USER
- * Revision::DELETED_RESTRICTED
+ * @param $suppress boolean suppress all revisions and log the deletion in
+ * the suppression log instead of the deletion log
* @param $id int article ID
* @param $commit boolean defaults to true, triggers transaction end
* @param &$error Array of errors to append to
* Back-end article deletion
* Deletes the article with database consistency, writes logs, purges caches
*
+ * @since 1.19
+ *
* @param $reason string delete reason for deletion log
- * @param $suppress int bitfield
- * Revision::DELETED_TEXT
- * Revision::DELETED_COMMENT
- * Revision::DELETED_USER
- * Revision::DELETED_RESTRICTED
- * @param $id int article ID
+ * @param $suppress boolean suppress all revisions and log the deletion in
+ * the suppression log instead of the deletion log
* @param $commit boolean defaults to true, triggers transaction end
* @param &$error Array of errors to append to
* @param $user User The deleting user
array( /* WHERE */
'rc_cur_id' => $current->getPage(),
'rc_user_text' => $current->getUserText(),
- "rc_timestamp > '{$s->rev_timestamp}'",
+ 'rc_timestamp > ' . $dbw->addQuotes( $s->rev_timestamp ),
), __METHOD__
);
}
);
$summary = wfMsgReplaceArgs( $summary, $args );
+ # Truncate for whole multibyte characters.
+ $summary = $wgContLang->truncate( $summary, 255 );
+
# Save
$flags = EDIT_UPDATE;