Changeset 856
- Timestamp:
- Mar 30, 2015 5:14:31 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/www/deploy/api/platform/modules/space/actions/actions.class.php
r855 r856 80 80 rmdir($path); 81 81 } 82 82 83 83 private function CopySpaceDir($sourceObj, $destination, $userId, &$aryNewTree) { 84 84 $dirId = $sourceObj->id; 85 85 86 $c = new Criteria(); 86 87 $c->add(TblspacecategoryPeer::CAT_ID, $dirId); 87 88 $c->add(TblspacecategoryPeer::CAT_USER, $userId); 88 89 $currentDir = TblspacecategoryPeer::doSelectOne($c); 89 90 90 91 $newDirID = $this->CreateSpaceDir($currentDir->getCatName(), $destination, $userId); 91 92 $c = new Criteria(); 92 93 $newDir = new stdClass(); 94 $newDir->id = $newDirID; 95 $newDir->name = $sourceObj->name; 96 $newDir->parentID = $destination; 97 98 $aryNewTree['DIRECTORIES'][] = $newDir; 99 100 if (isset($sourceObj->childDirs)) { 101 $aryChidlDirs = $sourceObj->childDirs; 102 foreach ($aryChidlDirs as $key => $dir) { 103 104 105 106 /*$c = new Criteria(); 107 $c->add(TblspacecategoryPeer::CAT_ID, $dir->id); 108 $c->add(TblspacecategoryPeer::CAT_USER, $userId); 109 $currentDir = TblspacecategoryPeer::doSelectOne($c); 110 $newChildDirID = $this->CreateSpaceDir($currentDir->getCatName(), $newDirID, $userId); 111 112 $newDir = new stdClass(); 113 $newDir->id = $newChildDirID; 114 $newDir->name = $dir->name; 115 $newDir->parentID = $newDirID; 116 117 $aryNewTree['DIRECTORIES'][] = $newDir; */ 118 119 //$this->CopySpaceDir($dir, $newDirID, $userId, $aryNewTree); 120 } 121 } 122 123 124 /* $c = new Criteria(); 93 125 $c->add(TblspacecategoryPeer::CAT_ID, $newDirID); 94 126 $c->add(TblspacecategoryPeer::CAT_USER, $userId); … … 98 130 $newDir->id = $newDirID; 99 131 $newDir->name = $newCat->getCatName(); 100 $newDir->parentID = $newCat->getCatParent(); 101 102 $aryNewTree['DIRECTORIES'][] = $newDir;103 104 if (isset($sourceObj->files)) {132 $newDir->parentID = $newCat->getCatParent(); */ 133 134 //$aryNewTree['DIRECTORIES'][] = $newDir; 135 136 /* if (isset($sourceObj->files)) { 105 137 $aryChidlFiles = $sourceObj->files; 106 138 foreach ($aryChidlFiles as $key => $file) { … … 114 146 $this->CopySpaceDir($dir, $newDirID, $userId, $aryNewTree); 115 147 } 116 } 148 } */ 117 149 } 118 150 … … 336 368 $aryNewTree = array('DIRECTORIES' => array(), 'FILES' => array(),); 337 369 $aryTreeObj = json_decode($data); 338 339 370 if (is_array($aryTreeObj)) { 340 371 foreach ($aryTreeObj as $key => $treeObj) {
Note: See TracChangeset
for help on using the changeset viewer.