예제 #1
0
파일: page.php 프로젝트: nemein/openpsa
 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
파일: page.php 프로젝트: nemein/openpsa
 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();
     }
 }