Changeset 2088
- Timestamp:
- 01/22/08 04:23:26 (11 months ago)
- Files:
-
- alternc/trunk/bureau/class/m_bro.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
alternc/trunk/bureau/class/m_bro.php
r2087 r2088 391 391 * bien ĂȘtre un fichier d'upload. 392 392 * @param string $R Dossier dans lequel on upload le fichier 393 * @returns the path where the file resides or false if upload failed 393 394 */ 394 395 function UploadFile($R) { … … 406 407 move_uploaded_file($_FILES['userfile']['tmp_name'], $absolute."/".$_FILES['userfile']['name']); 407 408 } else { 408 $err->log("bro","uploadfile","Tentative d'attaque : ".$_FILES['userfile']['tmp_name']); 409 } 410 } 409 $err->log("bro","uploadfile","Tentative d'attaque : ".$_FILES['userfile']['tmp_name']); 410 return false; 411 } 412 } 413 return $absolute."/".$_FILES['userfile']['name']; 411 414 } 412 415 … … 414 417 * Extract an archive by using GNU and non-GNU tools 415 418 * @param string $file is the full or relative path to the archive 416 * @param string $dest is the path of the extract destination 419 * @param string $dest is the path of the extract destination, the 420 * same directory as the archive by default 417 421 * @return boolean != 0 on error 418 422 */ 419 function ExtractFile($file, $dest= "./")423 function ExtractFile($file, $dest=null) 420 424 { 421 425 global $err; 422 426 static $i=0, $ret; 423 427 $file = $this->convertabsolute($file,0); 424 $dest = $this->convertabsolute($dest,0); 428 if (is_null($dest)) { 429 $dest = dirname($file); 430 } else { 431 $dest = $this->convertabsolute($dest,0); 432 } 425 433 if (!$file || !$dest) { 426 434 $err->raise("bro",1);
