Update docs for return and exception info
[lhc/web/wiklou.git] / includes / RecentChange.php
index 4a7bafd..debec69 100644 (file)
@@ -162,17 +162,6 @@ class RecentChange {
                return $this->mTitle;
        }
 
-       /**
-        * @return bool|Title
-        */
-       public function getMovedToTitle() {
-               if( $this->mMovedToTitle === false ) {
-                       $this->mMovedToTitle = Title::makeTitle( $this->mAttribs['rc_moved_to_ns'],
-                               $this->mAttribs['rc_moved_to_title'] );
-               }
-               return $this->mMovedToTitle;
-       }
-
        /**
         * Get the User object of the person who performed this change.
         *
@@ -246,7 +235,7 @@ class RecentChange {
                        if ( wfRunHooks( 'AbortEmailNotification', array($editor, $title) ) ) {
                                # @todo FIXME: This would be better as an extension hook
                                $enotif = new EmailNotification();
-                               $status = $enotif->notifyOnPageChange( $editor, $title,
+                               $enotif->notifyOnPageChange( $editor, $title,
                                        $this->mAttribs['rc_timestamp'],
                                        $this->mAttribs['rc_comment'],
                                        $this->mAttribs['rc_minor'],
@@ -421,8 +410,6 @@ class RecentChange {
                        'rc_this_oldid' => $newId,
                        'rc_last_oldid' => $oldId,
                        'rc_bot'        => $bot ? 1 : 0,
-                       'rc_moved_to_ns' => 0,
-                       'rc_moved_to_title' => '',
                        'rc_ip'         => self::checkIPAddress( $ip ),
                        'rc_patrolled'  => intval($patrol),
                        'rc_new'        => 0,  # obsolete
@@ -481,8 +468,6 @@ class RecentChange {
                        'rc_this_oldid'     => $newId,
                        'rc_last_oldid'     => 0,
                        'rc_bot'            => $bot ? 1 : 0,
-                       'rc_moved_to_ns'    => 0,
-                       'rc_moved_to_title' => '',
                        'rc_ip'             => self::checkIPAddress( $ip ),
                        'rc_patrolled'      => intval($patrol),
                        'rc_new'            => 1, # obsolete
@@ -570,8 +555,6 @@ class RecentChange {
                        'rc_this_oldid' => 0,
                        'rc_last_oldid' => 0,
                        'rc_bot'        => $user->isAllowed( 'bot' ) ? $wgRequest->getBool( 'bot', true ) : 0,
-                       'rc_moved_to_ns' => 0,
-                       'rc_moved_to_title' => '',
                        'rc_ip'         => self::checkIPAddress( $ip ),
                        'rc_patrolled'  => 1,
                        'rc_new'        => 0, # obsolete
@@ -624,8 +607,6 @@ class RecentChange {
                        'rc_this_oldid' => $row->rev_id,
                        'rc_last_oldid' => isset($row->rc_last_oldid) ? $row->rc_last_oldid : 0,
                        'rc_bot'        => 0,
-                       'rc_moved_to_ns'        => 0,
-                       'rc_moved_to_title'     => '',
                        'rc_ip' => '',
                        'rc_id' => $row->rc_id,
                        'rc_patrolled' => $row->rc_patrolled,
@@ -734,10 +715,10 @@ class RecentChange {
                } else {
                        $comment = self::cleanupForIRC( $this->mAttribs['rc_comment'] );
                        $flag = '';
-                       if ( !$this->mAttribs['rc_patrolled'] && ( $wgUseRCPatrol || $this->mAttribs['rc_new'] && $wgUseNPPatrol ) ) {
+                       if ( !$this->mAttribs['rc_patrolled'] && ( $wgUseRCPatrol || $this->mAttribs['rc_type'] == RC_NEW && $wgUseNPPatrol ) ) {
                                $flag .= '!';
                        }
-                       $flag .= ( $this->mAttribs['rc_new'] ? "N" : "" ) . ( $this->mAttribs['rc_minor'] ? "M" : "" ) . ( $this->mAttribs['rc_bot'] ? "B" : "" );
+                       $flag .= ( $this->mAttribs['rc_type'] == RC_NEW ? "N" : "" ) . ( $this->mAttribs['rc_minor'] ? "M" : "" ) . ( $this->mAttribs['rc_bot'] ? "B" : "" );
                }
 
                if ( $wgRC2UDPInterwikiPrefix === true && $wgLocalInterwiki !== false ) {