From: Aaron Schulz Date: Sun, 20 Apr 2008 14:24:10 +0000 (+0000) Subject: * Clean up IRC feed X-Git-Tag: 1.31.0-rc.0~48169 X-Git-Url: https://git.cyclocoop.org/?a=commitdiff_plain;h=165cfc590a46ebaed255c8558646a00f08c881e2;p=lhc%2Fweb%2Fwiklou.git * Clean up IRC feed * Remove some unused vars --- diff --git a/includes/RecentChange.php b/includes/RecentChange.php index 845b4294a2..cb906fd0f3 100644 --- a/includes/RecentChange.php +++ b/includes/RecentChange.php @@ -426,7 +426,7 @@ class RecentChange } # A log entry is different to an edit in that previous revisions are not kept - public static function notifyLog( $timestamp, &$title, &$user, $comment, $ip='', + public static function notifyLog( $timestamp, &$title, &$user, $actionComment, $ip='', $type, $action, $target, $logComment, $params, $newId=0 ) { global $wgRequest; @@ -469,11 +469,7 @@ class RecentChange $rc->mExtra = array( 'prefixedDBkey' => $title->getPrefixedDBkey(), 'lastTimestamp' => 0, - 'logType' => $type, - 'logAction' => $action, - 'logComment' => $logComment, - 'logTarget' => $target, - 'logParams' => $params + 'actionComment' => $actionComment, // the comment appended to the action, passed from LogPage ); $rc->save(); } @@ -566,7 +562,7 @@ class RecentChange $titleObj =& $this->getTitle(); if ( $rc_type == RC_LOG ) { - $title = MWNamespace::getCanonicalName( $titleObj->getNamespace() ) . $titleObj->getText(); + $title = MWNamespace::getCanonicalName( NS_SPECIAL ) . "Log/$rc_log_type"; } else { $title = $titleObj->getPrefixedText(); } @@ -605,9 +601,8 @@ class RecentChange $user = $this->cleanupForIRC( $rc_user_text ); if ( $rc_type == RC_LOG ) { - $logTargetText = $logTarget->getPrefixedText(); - $comment = $this->cleanupForIRC( str_replace( $logTargetText, "\00302$logTargetText\00310", $rc_comment ) ); - $flag = $logAction; + $comment = $this->cleanupForIRC( str_replace( $title, "\00302$title\00310", $actionComment ) ); + $flag = $rc_log_action; } else { $comment = $this->cleanupForIRC( $rc_comment ); $flag = ($rc_minor ? "M" : "") . ($rc_new ? "N" : "");