Skip to content

Commit afb189f

Browse files
committed
Updated List Diff, after testing against lists in cdpaccess.
Hardcoded an array, diffOrderIndex, to as the indexes are now created depending on the lists it's diffing.
1 parent ea171c0 commit afb189f

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

lib/Caxy/HtmlDiff/ListDiff.php

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace Caxy\HtmlDiff;
44

5+
error_reporting(E_ALL);
6+
57
class ListDiff extends HtmlDiff
68
{
79
/**
@@ -125,7 +127,7 @@ protected function diffListContent()
125127
protected function indexContent()
126128
{
127129
$this->contentIndex = array();
128-
$this->diffOrderIndex = array();
130+
$this->diffOrderIndex = array('new' => array(), 'old' => array());
129131
foreach ($this->list as $type => $list) {
130132

131133
$this->contentIndex[$type] = array();
@@ -406,6 +408,8 @@ protected function buildChildLists()
406408
*/
407409
protected function diff()
408410
{
411+
//$this->dump($this->diffOrderIndex, "diff order index");
412+
//$this->dump($this->list, "list");
409413
// Add the opening parent node from listType. So if ol, <ol>, etc.
410414
$this->content = $this->addListTypeWrapper();
411415

@@ -455,6 +459,25 @@ protected function diff()
455459
$this->content .= $this->addListTypeWrapper(false);
456460
}
457461

462+
protected function dump($asset, $string = '')
463+
{
464+
ini_set('xdebug.var_display_max_depth', 5);
465+
ini_set('xdebug.var_display_max_children', 2000);
466+
ini_set('xdebug.var_display_max_data', 1024);
467+
468+
if ($string) {
469+
$trueString = "======================= " . $string;
470+
var_dump(strtoupper($trueString));
471+
}
472+
473+
var_dump($asset);
474+
475+
if (isset($trueString)) {
476+
$trueString .= " ========= END END END";
477+
var_dump(strtoupper($trueString));
478+
}
479+
}
480+
458481
protected function getArrayByColumnValue($parentArray, $column, $value, $allMatches = false)
459482
{
460483
$returnArray = array();

0 commit comments

Comments
 (0)