Merge "ParserOutput::addLanguageLink needs a string"
[lhc/web/wiklou.git] / includes / ChangesList.php
index 6b7e99c..f8dbf3b 100644 (file)
@@ -435,6 +435,7 @@ class ChangesList extends ContextSource {
                                return Linker::commentBlock( $rc->mAttribs['rc_comment'], $rc->getTitle() );
                        }
                }
+               return '';
        }
 
        /**
@@ -862,6 +863,8 @@ class EnhancedChangesList extends ChangesList {
                # Other properties
                $unpatrolled = false;
                $isnew = false;
+               $allBots = true;
+               $allMinors = true;
                $curId = $currentRevision = 0;
                # Some catalyst variables...
                $namehidden = true;
@@ -895,7 +898,13 @@ class EnhancedChangesList extends ChangesList {
                                $currentRevision = $rcObj->mAttribs['rc_this_oldid'];
                        }
 
-                       $bot = $rcObj->mAttribs['rc_bot'];
+                       if( !$rcObj->mAttribs['rc_bot'] ) {
+                               $allBots = false;
+                       }
+                       if( !$rcObj->mAttribs['rc_minor'] ) {
+                               $allMinors = false;
+                       }
+
                        $userlinks[$u]++;
                }
 
@@ -922,10 +931,10 @@ class EnhancedChangesList extends ChangesList {
 
                # Main line
                $r .= '<td class="mw-enhanced-rc">' . $this->recentChangesFlags( array(
-                       'newpage' => $isnew,
-                       'minor' => false,
-                       'unpatrolled' => $unpatrolled,
-                       'bot' => $bot ,
+                       'newpage' => $isnew, # show, when one have this flag
+                       'minor' => $allMinors, # show only, when all have this flag
+                       'unpatrolled' => $unpatrolled, # show, when one have this flag
+                       'bot' => $allBots, # show only, when all have this flag
                ) );
 
                # Timestamp