diff --git a/phpgwapi/inc/phpgw_common.inc.php b/phpgwapi/inc/phpgw_common.inc.php index f3019841fd..fb7527ec11 100644 --- a/phpgwapi/inc/phpgw_common.inc.php +++ b/phpgwapi/inc/phpgw_common.inc.php @@ -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"; } diff --git a/phpgwapi/inc/phpgw_vfs.inc.php b/phpgwapi/inc/phpgw_vfs.inc.php index 96d2bb5593..0bf12e9fd4 100644 --- a/phpgwapi/inc/phpgw_vfs.inc.php +++ b/phpgwapi/inc/phpgw_vfs.inc.php @@ -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) {