summaryrefslogtreecommitdiff
path: root/inc/DifferenceEngine.php
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2013-02-17 19:30:55 +0000
committerChristopher Smith <chris@jalakai.co.uk>2013-02-17 19:30:55 +0000
commit3a4ea35cfcc40e754577cb6a1e41442d14b6a0a6 (patch)
treec854a05d275961f35206219c057dfb3e15d7558a /inc/DifferenceEngine.php
parent333ef4f3bdb4c2b3332744e3f894d9990d3c24e8 (diff)
downloadrpg-3a4ea35cfcc40e754577cb6a1e41442d14b6a0a6.tar.gz
rpg-3a4ea35cfcc40e754577cb6a1e41442d14b6a0a6.tar.bz2
replace remaining hardcoded 'colspan' values with ->colspan
Diffstat (limited to 'inc/DifferenceEngine.php')
-rw-r--r--inc/DifferenceEngine.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/inc/DifferenceEngine.php b/inc/DifferenceEngine.php
index f6ed9aa13..e0fbf8e03 100644
--- a/inc/DifferenceEngine.php
+++ b/inc/DifferenceEngine.php
@@ -1037,6 +1037,7 @@ class UnifiedDiffFormatter extends DiffFormatter {
*
*/
class TableDiffFormatter extends DiffFormatter {
+ var $colspan = 2;
function __construct() {
$this->leading_context_lines = 2;
@@ -1061,8 +1062,8 @@ class TableDiffFormatter extends DiffFormatter {
global $lang;
$l1 = $lang['line'].' '.$xbeg;
$l2 = $lang['line'].' '.$ybeg;
- $r = '<tr><td '.HTMLDiff::css('diff-blockheader').' colspan="2">'.$l1.":</td>\n".
- '<td '.HTMLDiff::css('diff-blockheader').' colspan="2">'.$l2.":</td>\n".
+ $r = '<tr><td '.HTMLDiff::css('diff-blockheader').' colspan="'.$this->colspan.'">'.$l1.":</td>\n".
+ '<td '.HTMLDiff::css('diff-blockheader').' colspan="'.$this->colspan.'">'.$l2.":</td>\n".
"</tr>\n";
return $r;
}
@@ -1094,7 +1095,7 @@ class TableDiffFormatter extends DiffFormatter {
}
function emptyLine() {
- return '<td colspan="2">&#160;</td>';
+ return '<td colspan="'.$this->colspan.'">&#160;</td>';
}
function contextLine($line) {
@@ -1173,7 +1174,7 @@ class InlineDiffFormatter extends DiffFormatter {
$xbeg .= "," . $xlen;
if ($ylen != 1)
$ybeg .= "," . $ylen;
- $r = '<tr><td colspan="2" '.HTMLDiff::css('diff-blockheader').'>@@ '.$lang['line']." -$xbeg +$ybeg @@";
+ $r = '<tr><td colspan="'.$this->colspan.'" '.HTMLDiff::css('diff-blockheader').'>@@ '.$lang['line']." -$xbeg +$ybeg @@";
$r .= ' <span '.HTMLDiff::css('diff-deletedline').'><del>'.$lang['deleted'].'</del></span>';
$r .= ' <span '.HTMLDiff::css('diff-addedline').'>'.$lang['created'].'</span>';
$r .= "</td></tr>\n";