mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 00:54:15 +01:00
fixed a few small bugs
This commit is contained in:
parent
24945c4b3b
commit
2bdc3cd5bd
@ -335,7 +335,7 @@
|
||||
|
||||
if ($phpgw_info["server"]["template_set"] == "user_choice" && isset($phpgw_info["user"]["preferences"]["template_set"])){
|
||||
$phpgw_info["server"]["template_set"] = $phpgw_info["user"]["preferences"]["template_set"];
|
||||
}elseif ($phpgw_info["server"]["template_set"] == "user_choice" || empty($phpgw_info["server"]["template_set"])){
|
||||
}elseif ($phpgw_info["server"]["template_set"] == "user_choice" || !isset($phpgw_info["server"]["template_set"])){
|
||||
$phpgw_info["server"]["template_set"] = "default";
|
||||
}
|
||||
|
||||
|
@ -235,23 +235,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
function move_uploaded_file($fromfile, $tofile, $from_absolute = "") {
|
||||
global $phpgw_info;
|
||||
if ($from_absolute){
|
||||
$frompath = $fromfile;
|
||||
}else{
|
||||
$frompath = $this->getabsolutepath($fromfile);
|
||||
}
|
||||
$topath = $this->getabsolutepath($tofile);
|
||||
umask(000);
|
||||
//if (!$this->move_uploaded_file($fromfile, $topath)) {
|
||||
if (!$this->mv($fromfile, $topath)) {
|
||||
return False;
|
||||
}else{
|
||||
return True;
|
||||
}
|
||||
}
|
||||
|
||||
function cp($fromfile, $tofile, $from_absolute = "") {
|
||||
global $phpgw_info;
|
||||
if ($from_absolute){
|
||||
@ -273,10 +256,15 @@
|
||||
return $this->cp($fromfile, $tofile);
|
||||
}
|
||||
|
||||
function mv($fromfile, $tofile) {
|
||||
function mv($fromfile, $tofile, $from_absolute = False) {
|
||||
global $phpgw_info;
|
||||
$frompath = $this->getabsolutepath($fromfile);
|
||||
if ($from_absolute){
|
||||
$frompath = $fromfile;
|
||||
}else{
|
||||
$frompath = $this->getabsolutepath($fromfile);
|
||||
}
|
||||
$topath = $this->getabsolutepath($tofile);
|
||||
umask(000);
|
||||
if (!copy($frompath, $topath)) {
|
||||
return False;
|
||||
}else{
|
||||
@ -288,9 +276,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
function move($fromfile, $tofile) {
|
||||
function move($fromfile, $tofile, $from_absolute) {
|
||||
umask(000);
|
||||
return $this->mv($fromfile, $tofile);
|
||||
return $this->mv($fromfile, $tofile, $from_absolute);
|
||||
}
|
||||
|
||||
function rm($file) {
|
||||
|
Loading…
Reference in New Issue
Block a user