diff --git a/views/bootstrap/class.ObjectCheck.php b/views/bootstrap/class.ObjectCheck.php index d3d995408..98836ff20 100644 --- a/views/bootstrap/class.ObjectCheck.php +++ b/views/bootstrap/class.ObjectCheck.php @@ -35,6 +35,28 @@ class SeedDMS_View_ObjectCheck extends SeedDMS_Bootstrap_Style { /* Don't do folderlist check for root folder */ if($path != ':') { + /* If the path contains a folder id twice, the a cyclic relation + * exists. + */ + $tmparr = explode(':', $path); + array_shift($tmparr); + if(count($tmparr) != count(array_unique($tmparr))) { + print "\n"; + print "getID()."\">"; + print "getID()."\">"; + print htmlspecialchars($path); + print ""; + + $owner = $folder->getOwner(); + print "".htmlspecialchars($owner->getFullName()).""; + print "Folder path contains cyclic relation"; + if($repair) { + print "".getMLText('repaired')."\n"; + } else { + print "\n"; + } + print "\n"; + } $folderList = $folder->getFolderList(); /* Check the folder */ if($folderList != $path) {