fix some doxygen warnings
[lhc/web/wiklou.git] / includes / LogEventsList.php
index 075860a..6d26410 100644 (file)
@@ -239,18 +239,7 @@ class LogEventsList {
                                'action=unblock&ip=' . urlencode( $row->log_title ) ) . ')';
                // Show change protection link
                } else if( self::typeAction($row,'protect',array('modify','protect','unprotect')) ) {
-                       if( $row->log_type == 'protect' && count($paramArray) == 3 ) {
-                               $revert .= " [{$paramArray[0]}]"; // the restrictions
-                               if( $paramArray[1] != 'infinity' ) {
-                                       $revert .= ' (' . wfMsgForContent( 'protect-expiring', 
-                                               $wgContLang->timeanddate( $paramArray[1], false, false ) ).')';
-                               }
-                               if( $paramArray[2] ) {
-                                       $revert .= ' ['.wfMsg('protect-summary-cascade').']';
-                               }
-                       }
-                       $revert = $revert ? "$revert " : "";
-                       $revert .= '(' .  $this->skin->makeKnownLinkObj( $title, $this->message['hist'], 
+                       $revert .= ' (' .  $this->skin->makeKnownLinkObj( $title, $this->message['hist'], 
                                'action=history&offset=' . urlencode($row->log_timestamp) ) . ')';
                        if( $wgUser->isAllowed('protect') && $row->log_action != 'unprotect' ) {
                                $revert .= ' (' .  $this->skin->makeKnownLinkObj( $title, $this->message['protect_change'], 
@@ -290,10 +279,22 @@ class LogEventsList {
                                $revert = '(' . $this->skin->makeKnownLinkObj( $revdel, $this->message['revdel-restore'], 
                                        'target=' . $title->getPrefixedUrl() . $logParams ) . ')';
                        }
+               // Self-created users
+               } else if( self::typeAction($row,'newusers','create2') ) {
+                       if( isset( $paramArray[0] ) ) {
+                               $revert = $this->skin->userToolLinks( $paramArray[0], $title->getDBkey(), true );
+                       } else {
+                               # Fall back to a blue contributions link
+                               $revert = $this->skin->userToolLinks( 1, $title->getDBkey() );
+                       }
+                       if( $time < '20080129000000' ) {
+                               # Suppress $comment from old entries (before 2008-01-29), not needed and can contain incorrect links
+                               $comment = '';
+                       }
+               // Do nothing. The implementation is handled by the hook modifiying the passed-by-ref parameters.
                } else {
                        wfRunHooks( 'LogLine', array( $row->log_type, $row->log_action, $title, $paramArray,
                                &$comment, &$revert, $row->log_timestamp ) );
-                       // Do nothing. The implementation is handled by the hook modifiying the passed-by-ref parameters.
                }
                // Event description
                if( self::isDeleted($row,LogPage::DELETED_ACTION) ) {
@@ -394,6 +395,7 @@ class LogEventsList {
                } else {
                        $out->addWikiMsg( 'logempty' );
                }
+               return $pager->getNumRows();
        }
 
         /**