Changeset 1854 for sandbox/filemanager/inc
- Timestamp:
- 12/16/09 16:05:13 (15 years ago)
- Location:
- sandbox/filemanager/inc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/filemanager/inc/class.uifilemanager.inc.php
r1846 r1854 348 348 echo "<script src='".$GLOBALS['phpgw_info']['flags']['currentapp']."/js/drag_area.js'></script>"; 349 349 echo "<script src='".$GLOBALS['phpgw_info']['flags']['currentapp']."/js/handler.js'></script>"; 350 350 351 include('load_lang.php'); 351 352 -
sandbox/filemanager/inc/class.vfs_functions.inc.php
r1844 r1854 26 26 'rename'=>True, 27 27 'delete'=>True, 28 'archive'=>True, 28 29 'summary' => True 29 30 ); … … 244 245 foreach($this->fileman as $filename) 245 246 { 246 if($this->verifyLock($filename,RELATIVE_ALL) && $this->bo->vfs->delete(array('string' => $filename))) 247 if($this->verifyLock($filename,RELATIVE_ALL) && $this->bo->vfs->rm(array( 248 'string' => $this->path.'/'.$filename, 249 'relatives' => array (RELATIVE_NONE) 250 ))) 247 251 { 248 252 echo $filename.":"; … … 254 258 } 255 259 } 260 } 261 function archive(){ 262 foreach($this->fileman as $filename) 263 { 264 if(!$this->verifyLock($filename,RELATIVE_ALL)) 265 { 266 echo "locked:".$filename; 267 return False; 268 } 269 $command .= " ".escapeshellarg($filename); 270 } 271 $zipFileName=$GLOBALS['phpgw_info']['user']['account_lid'].date("Ymd").".zip"; 272 $zipFilePath=ini_get("session.save_path")."/".$zipFileName; 273 $command = $zipFilePath.$command; 274 275 if (strlen($this->pswd) > 0){ 276 $command = " -P ".(base64_decode($this->pswd) ^ $this->path)." ".$command; 277 } 278 279 exec("cd ".$this->bo->vfs->basedir.$this->path.";".escapeshellcmd("nice -n19 zip -9 ".$command)."; history -c"); 280 281 $this->bo->vfs->cp(array( 282 'from'=> $zipFilePath, 283 'to'=> $zipFileName, 284 'relatives' => array(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL) 285 )); 286 $this->bo->vfs->set_attributes(array( 287 'string'=> $zipFileName, 288 'relatives' => array(RELATIVE_ALL), 289 'attributes'=> array( 290 'mime_type' => "application/zip" 291 ) 292 )); 293 exec("rm -f ".escapeshellcmd(escapeshellarg($zipFilePath))); 294 $this->delete(); 256 295 } 257 296 function editComment()
Note: See TracChangeset
for help on using the changeset viewer.