Moving check for "$rc_type == RC_LOG" before check for special pages since log entrie...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 18 Dec 2008 19:45:58 +0000 (19:45 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 18 Dec 2008 19:45:58 +0000 (19:45 +0000)
includes/ChangesList.php

index f8b8d30..c1aade6 100644 (file)
@@ -438,7 +438,7 @@ class EnhancedChangesList extends ChangesList {
                $curIdEq = 'curid=' . $rc_cur_id;
 
                # If it's a new day, add the headline and flush the cache
-               $date = $wgLang->date( $rc_timestamp, true);
+               $date = $wgLang->date( $rc_timestamp, true );
                $ret = '';
                if( $date != $this->lastdate ) {
                        # Process current cache
@@ -462,22 +462,12 @@ class EnhancedChangesList extends ChangesList {
                        $msg = ( $rc_type == RC_MOVE ) ? "1movedto2" : "1movedto2_redir";
                        $clink = wfMsg( $msg, $this->skin->makeKnownLinkObj( $rc->getTitle(), '', 'redirect=no' ),
                          $this->skin->makeKnownLinkObj( $rc->getMovedToTitle(), '' ) );
-               // Log entries (old format) and special pages
-               } elseif( $rc_namespace == NS_SPECIAL ) {
-                       list( $specialName, $logtype ) = SpecialPage::resolveAliasWithSubpage( $rc_title );
-                       if ( $specialName == 'Log' ) {
-                               # Log updates, etc
-                               $logname = LogPage::logName( $logtype );
-                               $clink = '(' . $this->skin->makeKnownLinkObj( $rc->getTitle(), $logname ) . ')';
-                       } else {
-                               wfDebug( "Unexpected special page in recentchanges\n" );
-                               $clink = '';
-                       }
                // New unpatrolled pages
                } else if( $rc->unpatrolled && $rc_type == RC_NEW ) {
                        $clink = $this->skin->makeKnownLinkObj( $rc->getTitle(), '', "rcid={$rc_id}" );
                // Log entries
                } else if( $rc_type == RC_LOG ) {
+                       var_dump( $rc_log_type );
                        if( $rc_log_type ) {
                                $logtitle = SpecialPage::getTitleFor( 'Log', $rc_log_type );
                                $clink = '(' . $this->skin->makeKnownLinkObj( $logtitle, LogPage::logName($rc_log_type) ) . ')';
@@ -485,6 +475,17 @@ class EnhancedChangesList extends ChangesList {
                                $clink = $this->skin->makeLinkObj( $rc->getTitle(), '' );
                        }
                        $watched = false;
+               // Log entries (old format) and special pages
+               } elseif( $rc_namespace == NS_SPECIAL ) {
+                       list( $specialName, $logtype ) = SpecialPage::resolveAliasWithSubpage( $rc_title );
+                       if ( $specialName == 'Log' ) {
+                               # Log updates, etc
+                               $logname = LogPage::logName( $logtype );
+                               $clink = '(' . $this->skin->makeKnownLinkObj( $rc->getTitle(), $logname ) . ')';
+                       } else {
+                               wfDebug( "Unexpected special page in recentchanges\n" );
+                               $clink = '';
+                       }
                // Edits
                } else {
                        $clink = $this->skin->makeKnownLinkObj( $rc->getTitle(), '' );