Changeset 2080
- Timestamp:
- 01/22/08 03:19:54 (9 months ago)
- Files:
-
- alternc/trunk/bureau/class/m_bro.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
alternc/trunk/bureau/class/m_bro.php
r2078 r2080 425 425 $file = $this->convertabsolute($file,0); 426 426 $dest = $this->convertabsolute($dest,0); 427 if (!$file || !$dest) { 428 $err->raise("bro",1); 429 return false; 430 } 427 431 if ($i == 0) { 428 432 #TODO new version of tar supports `tar xf ...` so there is no … … 475 479 } 476 480 481 /* 482 * XXX: Disabled functionality until audit is completed 483 */ 484 /* 477 485 if (substr($src, 0, 7) == "http://") { 478 486 $filename = basename($src); … … 524 532 } 525 533 } 534 */ 526 535 527 536 // Last step // Copy -R 528 $src = addslashes($src); 529 $dest = addslashes($dest); 537 $src = escapeshellarg($this->convertabsolute($src)); 538 $dest = escapeshellarg($this->convertabsolute($dest)); 539 if (!$src || !$dest) { 540 $err->raise("bro",1); 541 return false; 542 } 543 /* XXX: UNIX-specific because of that slash */ 530 544 $array = explode('/', $dest); 531 545 $dir = ""; … … 534 548 @mkdir($dest); 535 549 } 536 #TODO write a recursive copy function(?)537 exec("cp -R f '$src'/* '$dest'", $void, $ret);550 #TODO write a recursive copy function(?) 551 exec("cp -Rpf '$src'/* '$dest'", $void, $ret); 538 552 if ($ret) { 539 $error = _("Errors happened while copying the source to destination."); 540 return false; 541 } 542 543 $error = _("The web application has been successfully installed."); 553 $err->raise("bro","Errors happened while copying the source to destination."); 554 return false; 555 } 556 544 557 return true; 545 558 }
