From: Aaron Schulz Date: Sun, 16 Mar 2008 20:59:59 +0000 (+0000) Subject: Load extra RC fields X-Git-Tag: 1.31.0-rc.0~49063 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=4490d3eea8aaeffd714de94eff29778cdb683b12;p=lhc%2Fweb%2Fwiklou.git Load extra RC fields --- diff --git a/includes/RecentChange.php b/includes/RecentChange.php index 4c8fe1b83e..d05f5fc6e6 100644 --- a/includes/RecentChange.php +++ b/includes/RecentChange.php @@ -25,6 +25,11 @@ * rc_patrolled boolean whether or not someone has marked this edit as patrolled * rc_old_len integer byte length of the text before the edit * rc_new_len the same after the edit + * rc_deleted partial deletion + * rc_logid the log_id value for this log entry (or zero) + * rc_log_type the log type (or null) + * rc_log_action the log action (or null) + * rc_params log params * * mExtra: * prefixedDBkey prefixed db key, used by external app via msg queue @@ -291,7 +296,12 @@ class RecentChange 'rc_patrolled' => 0, 'rc_new' => 0, # obsolete 'rc_old_len' => $oldSize, - 'rc_new_len' => $newSize + 'rc_new_len' => $newSize, + 'rc_deleted' => 0, + 'rc_logid' => 0, + 'rc_log_type' => null, + 'rc_log_action' => '', + 'rc_params' => '' ); $rc->mExtra = array( @@ -338,9 +348,14 @@ class RecentChange 'rc_moved_to_title' => '', 'rc_ip' => $ip, 'rc_patrolled' => 0, - 'rc_new' => 1, # obsolete + 'rc_new' => 1, # obsolete 'rc_old_len' => 0, - 'rc_new_len' => $size + 'rc_new_len' => $size, + 'rc_deleted' => 0, + 'rc_logid' => 0, + 'rc_log_type' => null, + 'rc_log_action' => '', + 'rc_params' => '' ); $rc->mExtra = array( @@ -387,6 +402,11 @@ class RecentChange 'rc_patrolled' => 1, 'rc_old_len' => NULL, 'rc_new_len' => NULL, + 'rc_deleted' => 0, + 'rc_logid' => 0, # notifyMove not used anymore + 'rc_log_type' => null, + 'rc_log_action' => '', + 'rc_params' => '' ); $rc->mExtra = array( @@ -405,10 +425,9 @@ class RecentChange RecentChange::notifyMove( $timestamp, $oldTitle, $newTitle, $user, $comment, $ip, true ); } - # A log entry is different to an edit in that previous revisions are - # not kept + # A log entry is different to an edit in that previous revisions are not kept public static function notifyLog( $timestamp, &$title, &$user, $comment, $ip='', - $type, $action, $target, $logComment, $params ) + $type, $action, $target, $logComment, $params, $newId=0 ) { global $wgRequest; @@ -423,14 +442,14 @@ class RecentChange $rc->mAttribs = array( 'rc_timestamp' => $timestamp, 'rc_cur_time' => $timestamp, - 'rc_namespace' => $title->getNamespace(), - 'rc_title' => $title->getDBkey(), + 'rc_namespace' => $target->getNamespace(), + 'rc_title' => $target->getDBkey(), 'rc_type' => RC_LOG, 'rc_minor' => 0, - 'rc_cur_id' => $title->getArticleID(), + 'rc_cur_id' => $target->getArticleID(), 'rc_user' => $user->getID(), 'rc_user_text' => $user->getName(), - 'rc_comment' => $comment, + 'rc_comment' => $logComment, 'rc_this_oldid' => 0, 'rc_last_oldid' => 0, 'rc_bot' => $user->isAllowed( 'bot' ) ? $wgRequest->getBool( 'bot' , true ) : 0, @@ -441,6 +460,11 @@ class RecentChange 'rc_new' => 0, # obsolete 'rc_old_len' => NULL, 'rc_new_len' => NULL, + 'rc_deleted' => 0, + 'rc_logid' => $newId, + 'rc_log_type' => $type, + 'rc_log_action' => $action, + 'rc_params' => $params ); $rc->mExtra = array( 'prefixedDBkey' => $title->getPrefixedDBkey(), @@ -487,6 +511,11 @@ class RecentChange 'rc_new' => $row->page_is_new, # obsolete 'rc_old_len' => $row->rc_old_len, 'rc_new_len' => $row->rc_new_len, + 'rc_deleted' => $row->rc_deleted, + 'rc_logid' => $row->rc_logid, + 'rc_log_type' => $row->rc_log_type, + 'rc_log_action' => $row->rc_log_action, + 'rc_params' => $row->rc_params ); $this->mExtra = array();