Пример #1
0
 public function export()
 {
     $qb = midcom_db_page::new_query_builder();
     $qb->add_constraint('up', '=', 0);
     $rootdirs = $qb->execute();
     foreach ($rootdirs as $rootdir) {
         if ($rootdir->can_do('midgard:update')) {
             $this->read_page($rootdir, $this->root_dir);
         }
     }
 }
Пример #2
0
 private function delete_missing_folders($foldernames, $page_id)
 {
     if (!$this->delete_missing) {
         return;
     }
     $qb = midcom_db_page::new_query_builder();
     $qb->add_constraint('up', '=', $page_id);
     if (!empty($foldernames)) {
         $qb->add_constraint('name', 'NOT IN', $foldernames);
     }
     $folders = $qb->execute();
     foreach ($folders as $folder) {
         $folder->delete();
     }
 }