- }
-
-
- foreach($this->deps as $s=>$status) {
- if (isset($this->dumped[$s])) {
- continue;
- }
- list($tbl, $key, $val) = explode(':', $s);
- $dd = DB_DataObject::factory($tbl);
- if ($dd->get($key,$val)) {
- fwrite($this->fh, $this->toInsert($dd));
+ $do = DB_DataObject::factory($tbl);
+ $tbl = $do->tableName();
+ $keys = $do->keys();
+ $key = $keys[0];
+ $do->whereAddIn($keys[0] , array_keys($ar), 'int');
+ $do->find();
+ $archivePaths = method_exists($do,'archivePaths');
+ $listThumbs = method_exists($do,'listThumbs');
+ while ($do->fetch()) {
+
+ if ($archivePaths) {
+ $ct = $do->archivePaths();
+ if ($ct) {
+ $this->childfiles[] = $ct;
+ }
+ }
+ if ($listThumbs) {
+ $ct = $do->listThumbs();
+ if($ct) {
+ $this->childthumbs[] = $ct;
+ }
+ }
+ $id = $do->$key;
+
+ fwrite($fh, "DELETE FROM `$tbl` WHERE `$key` = $id;\n"); // we assume id's and nice column names...