Cosmetics
This commit is contained in:
parent
8e93341cd3
commit
0729df438e
|
@ -200,7 +200,7 @@ class m_bro {
|
|||
function filelist($dir="", $showdirsize = false) {
|
||||
global $db,$cuid,$err;
|
||||
$db->query("UPDATE browser SET lastdir='$dir' WHERE uid='$cuid';");
|
||||
$absolute=$this->convertabsolute($dir,0);
|
||||
$absolute=$this->convertabsolute($dir,false);
|
||||
if (!$absolute || !file_exists($absolute)) {
|
||||
$err->raise('bro',_("This directory do not exist"));
|
||||
return false;
|
||||
|
@ -391,7 +391,7 @@ class m_bro {
|
|||
function CreateDir($dir,$file) {
|
||||
global $db,$cuid,$err;
|
||||
$file=ssla($file);
|
||||
$absolute=$this->convertabsolute($dir."/".$file,0);
|
||||
$absolute=$this->convertabsolute($dir."/".$file,false);
|
||||
#echo "$absolute";
|
||||
if ($absolute && (!file_exists($absolute))) {
|
||||
if (!mkdir($absolute,00777,true)) {
|
||||
|
@ -420,7 +420,7 @@ class m_bro {
|
|||
function CreateFile($dir,$file) {
|
||||
global $db,$err,$cuid;
|
||||
$file=ssla($file);
|
||||
$absolute=$this->convertabsolute($dir."/".$file,0);
|
||||
$absolute=$this->convertabsolute($dir."/".$file,false);
|
||||
if (!$absolute || file_exists($absolute)) {
|
||||
$err->raise("bro",_("File or folder name is incorrect"));
|
||||
return false;
|
||||
|
@ -448,7 +448,7 @@ class m_bro {
|
|||
function DeleteFile($file_list,$R) {
|
||||
global $err, $mem;
|
||||
$root=realpath(getuserpath());
|
||||
$absolute=$this->convertabsolute($R,0);
|
||||
$absolute=$this->convertabsolute($R,false);
|
||||
if (!$absolute && strpos($root,$absolute) === 0 && strlen($absolute) > (strlen($root)+1) ) {
|
||||
$err->raise("bro",_("File or folder name is incorrect"));
|
||||
return false;
|
||||
|
@ -474,7 +474,7 @@ class m_bro {
|
|||
*/
|
||||
function RenameFile($R,$old,$new) {
|
||||
global $err;
|
||||
$absolute=$this->convertabsolute($R,0);
|
||||
$absolute=$this->convertabsolute($R,false);
|
||||
if (!$absolute) {
|
||||
$err->raise("bro",_("File or folder name is incorrect"));
|
||||
return false;
|
||||
|
@ -508,7 +508,7 @@ class m_bro {
|
|||
*/
|
||||
function MoveFile($d,$old,$new) {
|
||||
global $err;
|
||||
$old=$this->convertabsolute($old,0);
|
||||
$old=$this->convertabsolute($old,false);
|
||||
if (!$old) {
|
||||
$err->raise("bro",_("File or folder name is incorrect"));
|
||||
return false;
|
||||
|
@ -517,7 +517,7 @@ class m_bro {
|
|||
if ($new[0] != '/') {
|
||||
$new = $old . '/' . $new;
|
||||
}
|
||||
$new = $this->convertabsolute($new,0);
|
||||
$new = $this->convertabsolute($new,false);
|
||||
|
||||
if (!$new) {
|
||||
$err->raise("bro",_("File or folder name is incorrect"));
|
||||
|
@ -548,7 +548,7 @@ class m_bro {
|
|||
*/
|
||||
function ChangePermissions($R,$d,$perm,$verbose=false) {
|
||||
global $err;
|
||||
$absolute=$this->convertabsolute($R,0);
|
||||
$absolute=$this->convertabsolute($R,false);
|
||||
if (!$absolute) {
|
||||
$err->raise("bro",_("File or folder name is incorrect"));
|
||||
return false;
|
||||
|
@ -591,7 +591,7 @@ class m_bro {
|
|||
*/
|
||||
function UploadFile($R) {
|
||||
global $_FILES,$err,$cuid,$action;
|
||||
$absolute=$this->convertabsolute($R,0);
|
||||
$absolute=$this->convertabsolute($R,false);
|
||||
if (!$absolute) {
|
||||
$err->raise("bro",_("File or folder name is incorrect"));
|
||||
return false;
|
||||
|
@ -647,11 +647,11 @@ class m_bro {
|
|||
*/
|
||||
function ExtractFile($file, $dest=null) {
|
||||
global $err,$cuid,$mem,$action;
|
||||
$file = $this->convertabsolute($file,0);
|
||||
$file = $this->convertabsolute($file,false);
|
||||
if (is_null($dest)) {
|
||||
$dest = dirname($file);
|
||||
} else {
|
||||
$dest = $this->convertabsolute($dest,0);
|
||||
$dest = $this->convertabsolute($dest,false);
|
||||
}
|
||||
if (!$file || !$dest) {
|
||||
$err->raise("bro",_("File or folder name is incorrect"));
|
||||
|
@ -696,12 +696,12 @@ class m_bro {
|
|||
*/
|
||||
function CopyFile($d,$old,$new) {
|
||||
global $err;
|
||||
$old=$this->convertabsolute($old,0);
|
||||
$old=$this->convertabsolute($old,false);
|
||||
if (!$old) {
|
||||
$err->raise("bro",_("File or folder name is incorrect"));
|
||||
return false;
|
||||
}
|
||||
$new=$this->convertabsolute($new,0);
|
||||
$new=$this->convertabsolute($new,false);
|
||||
if (!$new) {
|
||||
$err->raise("bro",_("File or folder name is incorrect"));
|
||||
return false;
|
||||
|
@ -757,7 +757,7 @@ class m_bro {
|
|||
* @return string Le code HTML ainsi obtenu.
|
||||
*/
|
||||
function PathList($path,$action, $justparent=false) {
|
||||
$path=$this->convertabsolute($path,1);
|
||||
$path=$this->convertabsolute($path,true);
|
||||
$a=explode("/",$path);
|
||||
if (!is_array($a)) $a=array($a);
|
||||
$c='';
|
||||
|
@ -789,7 +789,7 @@ class m_bro {
|
|||
*/
|
||||
function content($R,$file) {
|
||||
global $err;
|
||||
$absolute=$this->convertabsolute($R,0);
|
||||
$absolute=$this->convertabsolute($R,false);
|
||||
if (!strpos($file,"/")) {
|
||||
$absolute.="/".$file;
|
||||
if (file_exists($absolute)) {
|
||||
|
@ -987,7 +987,7 @@ class m_bro {
|
|||
*/
|
||||
function save($file,$R,$texte) {
|
||||
global $err;
|
||||
$absolute=$this->convertabsolute($R,0);
|
||||
$absolute=$this->convertabsolute($R,false);
|
||||
if (!strpos($file,"/")) {
|
||||
$absolute.="/".$file;
|
||||
if (file_exists($absolute)) {
|
||||
|
@ -1015,7 +1015,7 @@ class m_bro {
|
|||
header("Content-Disposition: attachment; filename=".$mem->user["login"].".Z");
|
||||
header("Content-Type: application/x-Z");
|
||||
header("Content-Transfer-Encoding: binary");
|
||||
$d=escapeshellarg(".".$this->convertabsolute($dir,1));
|
||||
$d=escapeshellarg(".".$this->convertabsolute($dir,true));
|
||||
set_time_limit(0);
|
||||
passthru("/bin/tar -cZ -C ".getuserpath()."/".$mem->user["login"]."/ $d");
|
||||
}
|
||||
|
@ -1033,7 +1033,7 @@ class m_bro {
|
|||
header("Content-Disposition: attachment; filename=".$mem->user["login"].".tgz");
|
||||
header("Content-Type: application/x-tgz");
|
||||
header("Content-Transfer-Encoding: binary");
|
||||
$d=escapeshellarg(".".$this->convertabsolute($dir,1));
|
||||
$d=escapeshellarg(".".$this->convertabsolute($dir,true));
|
||||
set_time_limit(0);
|
||||
passthru("/bin/tar -cz -C ".getuserpath()."/ $d");
|
||||
}
|
||||
|
@ -1051,7 +1051,7 @@ class m_bro {
|
|||
header("Content-Disposition: attachment; filename=".$mem->user["login"].".tar.bz2");
|
||||
header("Content-Type: application/x-bzip2");
|
||||
header("Content-Transfer-Encoding: binary");
|
||||
$d=escapeshellarg(".".$this->convertabsolute($dir,1));
|
||||
$d=escapeshellarg(".".$this->convertabsolute($dir,true));
|
||||
set_time_limit(0);
|
||||
passthru("/bin/tar -cj -C ".getuserpath()."/ $d");
|
||||
}
|
||||
|
|
|
@ -646,9 +646,9 @@ class m_dom {
|
|||
* appellée lors de l'installation d'un nouveau domaine.</p>
|
||||
*
|
||||
* @param string $dom nom fqdn du domaine à installer
|
||||
* @param integer $dns 1 ou 0 pour héberger le DNS du domaine ou pas.
|
||||
* @param integer $noerase 1 ou 0 pour rendre le domaine inamovible ou non
|
||||
* @param integer $force 1 ou 0, si 1, n'effectue pas les tests de DNS.
|
||||
* @param boolean $dns 1 ou 0 pour héberger le DNS du domaine ou pas.
|
||||
* @param boolean $noerase 1 ou 0 pour rendre le domaine inamovible ou non
|
||||
* @param boolean $force 1 ou 0, si 1, n'effectue pas les tests de DNS.
|
||||
* force ne devrait être utilisé que par le super-admin.
|
||||
$ @return boolean Retourne FALSE si une erreur s'est produite, TRUE sinon.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue