Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
domainepublic
alternc
Commits
0729df43
Commit
0729df43
authored
Mar 27, 2014
by
Alan Garcia
Browse files
Cosmetics
parent
8e93341c
Changes
2
Hide whitespace changes
Inline
Side-by-side
bureau/class/m_bro.php
View file @
0729df43
...
...
@@ -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
"
);
}
...
...
bureau/class/m_dom.php
View file @
0729df43
...
...
@@ -646,9 +646,9 @@ class m_dom {
* appelle lors de l'installation d'un nouveau domaine.</p>
*
* @param string $dom nom fqdn du domaine installer
* @param
integer
$dns 1 ou 0 pour hberger 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 hberger 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.
*/
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment