From: <var...@us...> - 2010-06-17 14:09:39
|
Revision: 7546 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7546&view=rev Author: vargenau Date: 2010-06-17 14:09:32 +0000 (Thu, 17 Jun 2010) Log Message: ----------- Remove unused TableUnifiedDiffFormatter Modified Paths: -------------- trunk/lib/diff.php trunk/lib/editpage.php Modified: trunk/lib/diff.php =================================================================== --- trunk/lib/diff.php 2010-06-17 13:50:31 UTC (rev 7545) +++ trunk/lib/diff.php 2010-06-17 14:09:32 UTC (rev 7546) @@ -176,63 +176,6 @@ } } -/** - * HTML table-based unified diff formatter. - * - * This class formats a diff into a table-based - * unified diff format. (Similar to what was produced - * by previous versions of PhpWiki.) - * - * Within groups of changed lines, diffs are highlit - * at the character-diff level. - */ -class TableUnifiedDiffFormatter extends HtmlUnifiedDiffFormatter -{ - function TableUnifiedDiffFormatter($context_lines = 4) { - $this->HtmlUnifiedDiffFormatter($context_lines); - } - - function _start_diff() { - $this->_top = HTML::table(array('width' => '100%', - 'class' => 'diff', - 'cellspacing' => 1, - 'cellpadding' => 1, - 'border' => 1)); - } - - function _start_block($header) { - $this->_block = HTML::table(array('width' => '100%', - 'class' => 'block', - 'cellspacing' => 0, - 'cellpadding' => 1, - 'border' => 0), - HTML::tr(HTML::td(array('colspan' => 2), - HTML::tt($header)))); - } - - function _end_block() { - $this->_top->pushContent(HTML::tr(HTML::td($this->_block))); - unset($this->_block); - } - - function _lines($lines, $class, $prefix = false, $elem = false) { - if (!$prefix) - $prefix = HTML::raw(' '); - $prefix = HTML::td(array('class' => 'prefix', - 'width' => "1%"), $prefix); - foreach ($lines as $line) { - if (! trim($line)) - $line = HTML::raw(' '); - elseif ($elem) - $line = new HtmlElement($elem, $line); - $this->_block->pushContent(HTML::tr(array('valign' => 'top'), - $prefix, - HTML::td(array('class' => $class), - $line))); - } - } -} - ///////////////////////////////////////////////////////////////// function PageInfoRow ($label, $rev, &$request, $is_current = false) Modified: trunk/lib/editpage.php =================================================================== --- trunk/lib/editpage.php 2010-06-17 13:50:31 UTC (rev 7545) +++ trunk/lib/editpage.php 2010-06-17 14:09:32 UTC (rev 7546) @@ -527,10 +527,8 @@ ']')); } else { - // New CSS formatted unified diffs (ugly in NS4). + // New CSS formatted unified diffs $fmt = new HtmlUnifiedDiffFormatter; - // Use this for old table-formatted diffs. - //$fmt = new TableUnifiedDiffFormatter; $html->pushContent($fmt->format($diff)); } return $html; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |