Changeset 121 for pro-bachkim-filespace/sourcecode/application
- Timestamp:
- Sep 12, 2014 7:24:12 PM (11 years ago)
- Location:
- pro-bachkim-filespace/sourcecode/application
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-bachkim-filespace/sourcecode/application/libraries/vservices.php
r66 r121 52 52 $this->_curlObj->post($aryParams); 53 53 return $this->_curlObj->execute(); 54 } 55 56 public function createDir ($dirName, $parentId) { 57 $this->_curlObj->create($this->_apiUrl. 'space/mkdir'); 58 $this->_curlObj->option(CURLOPT_BUFFERSIZE, 10); 59 $this->_curlObj->options(array(CURLOPT_BUFFERSIZE => 10)); 60 61 $post = array('userid' => $this->_userId, 'parent_id' => $parentId, 'name' => $dirName); 62 $this->_curlObj->post($post); 63 return $this->_curlObj->execute(); 64 } 65 66 public function deleteDir ($dirId) { 67 $this->_curlObj->create($this->_apiUrl. 'space/delete'); 68 $this->_curlObj->option(CURLOPT_BUFFERSIZE, 10); 69 $this->_curlObj->options(array(CURLOPT_BUFFERSIZE => 10)); 70 71 $post = array('userid' => $this->_userId, 'type' => 'folder', 'id' => $dirId); 72 $this->_curlObj->post($post); 73 return $this->_curlObj->execute(); 74 } 75 54 } 55 76 56 public function __destruct() { 77 57 -
pro-bachkim-filespace/sourcecode/application/modules/ajax/controllers/privatecontent.php
r70 r121 144 144 $data = $this->input->post('data',TRUE); 145 145 146 $xmlData = $this->vservices->actionExecute('copy',array('data' => $data, 'destination' => $destination == 0 ? -1:$destination)); 147 $this->xml->parse($xmlData); 148 149 $aryNewDirs = isset($this->xml->data->folderdata) ? json_decode($this->xml->data->folderdata->_value) : array(); 150 $aryNewFiles = isset($this->xml->data->filedata) ? json_decode($this->xml->data->filedata->_value) : array(); 151 146 152 $aryData = array(); 147 $aryData['RESULT'] = json_decode($data); 148 $aryError = array('err' => '', 'errCode' => 0); 149 $aryData['ERROR'] = $aryError; 153 $aryData['RESULT'] = array('DIRECTORIES' => $aryNewDirs, 'FILES' => $aryNewFiles); 154 $aryData['ERROR'] = array('err' => $this->xml->data->_param['err'], 'errCode' => (int)$this->xml->data->_param['errCode']);; 150 155 echo json_encode($aryData); 151 152 156 } 153 157 … … 157 161 } 158 162 159 /* End of file directory.php */160 /* Location: ./application/modules/ajax/controllers/ directory.php */163 /* End of file privatecontent.php */ 164 /* Location: ./application/modules/ajax/controllers/privatecontent.php */
Note: See TracChangeset
for help on using the changeset viewer.