Changeset 14661
- Timestamp:
- 01/28/08 11:05:33 (10 months ago)
- Files:
-
- trunk/midcom/midcom.core/support/find_orphans.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/midcom/midcom.core/support/find_orphans.php
r14660 r14661 23 23 //die($_MIDGARD['sitegroup']); 24 24 25 echo "Starting...\n"; 25 26 foreach ($_MIDGARD['schema']['types'] as $type => $arr) 26 27 { … … 79 80 if (is_orphan($type, $up_value, $parent_value)) 80 81 { 81 echo " {$type} #{$object_id} is an orphan (up: #{$up_value}, parent: #{$parent_value}) \n";82 echo " {$type} #{$object_id} is an orphan (up: #{$up_value}, parent: #{$parent_value})"; 82 83 $orphans++; 84 $obj = new $type($object_id); 85 echo " deleting, "; 86 $obj->delete(); 87 echo mgd_errstr() . "\n"; 83 88 } 84 89 } … … 86 91 echo " {$orphans} orphans out of " . count($objects) . " {$type} objects\n"; 87 92 } 93 echo "Done.\n"; 88 94 89 95 function is_orphan($class, $up_value, $parent_value)
