fixed a few small bugs

This commit is contained in:
seek3r 2001-01-07 09:57:34 +00:00
parent 24945c4b3b
commit 2bdc3cd5bd
2 changed files with 10 additions and 22 deletions

View File

@ -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";
}

View File

@ -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;
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) {