Merge "DifferenceEngine: Don't display empty header row"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 26 Jun 2013 22:13:06 +0000 (22:13 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 26 Jun 2013 22:13:06 +0000 (22:13 +0000)
includes/diff/DifferenceEngine.php

index 916ab38..975d490 100644 (file)
@@ -994,11 +994,13 @@ class DifferenceEngine extends ContextSource {
                                $colspan = 1;
                                $multiColspan = 2;
                        }
-                       $header .= "
-                       <tr style='vertical-align: top;'>
-                       <td colspan='$colspan' class='diff-otitle'>{$otitle}</td>
-                       <td colspan='$colspan' class='diff-ntitle'>{$ntitle}</td>
-                       </tr>";
+                       if ( $otitle || $ntitle ) {
+                               $header .= "
+                               <tr style='vertical-align: top;'>
+                               <td colspan='$colspan' class='diff-otitle'>{$otitle}</td>
+                               <td colspan='$colspan' class='diff-ntitle'>{$ntitle}</td>
+                               </tr>";
+                       }
                }
 
                if ( $multi != '' ) {