Skip to content

Commit

Permalink
DEVELOPER_DEBUG messages to help you diagnose broken prev/next links …
Browse files Browse the repository at this point in the history
…in XMDBD files.
  • Loading branch information
tjhunt committed Aug 15, 2008
1 parent 530d986 commit 2a683cf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/xmldb/xmldb_object.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ function checkPreviousNextValues(&$arr) {
}
}
if ($counter != 1) {
debugging('The number of tables with previous not set is different from 1', DEBUG_DEVELOPER);
$result = false;
}
}
Expand All @@ -252,6 +253,7 @@ function checkPreviousNextValues(&$arr) {
}
}
if ($counter != 1) {
debugging('The number of tables with next not set is different from 1', DEBUG_DEVELOPER);
$result = false;
}
}
Expand All @@ -261,6 +263,7 @@ function checkPreviousNextValues(&$arr) {
if ($element->getPrevious()) {
$i = $this->findObjectInArray($element->getPrevious(), $arr);
if ($i === NULL) {
debugging('Table ' . $element->getName() . ' says PREVIOUS="' . $element->getPrevious() . '" but that other table does not exist.', DEBUG_DEVELOPER);
$result = false;
}
}
Expand All @@ -272,6 +275,7 @@ function checkPreviousNextValues(&$arr) {
if ($element->getNext()) {
$i = $this->findObjectInArray($element->getNext(), $arr);
if ($i === NULL) {
debugging('Table ' . $element->getName() . ' says NEXT="' . $element->getNext() . '" but that other table does not exist.', DEBUG_DEVELOPER);
$result = false;
}
}
Expand All @@ -283,6 +287,7 @@ function checkPreviousNextValues(&$arr) {
foreach($arr as $element) {
if (in_array($element->getPrevious(), $existarr)) {
$result = false;
debugging('Table ' . $element->getName() . ' says PREVIOUS="' . $element->getPrevious() . '" but another table has already said that!', DEBUG_DEVELOPER);
} else {
$existarr[] = $element->getPrevious();
}
Expand All @@ -294,6 +299,7 @@ function checkPreviousNextValues(&$arr) {
foreach($arr as $element) {
if (in_array($element->getNext(), $existarr)) {
$result = false;
debugging('Table ' . $element->getName() . ' says NEXT="' . $element->getNext() . '" but another table has already said that!', DEBUG_DEVELOPER);
} else {
$existarr[] = $element->getNext();
}
Expand Down

0 comments on commit 2a683cf

Please sign in to comment.