mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-04 12:30:04 +01:00
Reversed arguments to set_attributes (). Empty files should work now
This commit is contained in:
parent
0f7534e79f
commit
95ef1ee9c5
@ -166,7 +166,7 @@ elseif (preg_match ("|^$fakebase\/(.*)$|U", $path, $matches))
|
|||||||
$phpgw->vfs->mkdir ($path, array (RELATIVE_NONE));
|
$phpgw->vfs->mkdir ($path, array (RELATIVE_NONE));
|
||||||
|
|
||||||
$group_id = $phpgw->accounts->name2id ($matches[1]);
|
$group_id = $phpgw->accounts->name2id ($matches[1]);
|
||||||
$phpgw->vfs->set_attributes ($path, array ("owner_id" => $group_id, "createdby_id" => $group_id), array (RELATIVE_NONE));
|
$phpgw->vfs->set_attributes ($path, array (RELATIVE_NONE), array ("owner_id" => $group_id, "createdby_id" => $group_id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -209,7 +209,7 @@ if ($path == $fakebase)
|
|||||||
if (!$phpgw->vfs->file_exists ("$fakebase/$group_array[account_name]", array (RELATIVE_NONE)))
|
if (!$phpgw->vfs->file_exists ("$fakebase/$group_array[account_name]", array (RELATIVE_NONE)))
|
||||||
{
|
{
|
||||||
$phpgw->vfs->mkdir ("$fakebase/$group_array[account_name]", array (RELATIVE_NONE));
|
$phpgw->vfs->mkdir ("$fakebase/$group_array[account_name]", array (RELATIVE_NONE));
|
||||||
$phpgw->vfs->set_attributes ("$fakebase/$group_array[account_name]", array ("owner_id" => $group_array["account_id"], "createdby_id" => $group_array["account_id"]), array (RELATIVE_NONE));
|
$phpgw->vfs->set_attributes ("$fakebase/$group_array[account_name]", array (RELATIVE_NONE), array ("owner_id" => $group_array["account_id"], "createdby_id" => $group_array["account_id"]));
|
||||||
}
|
}
|
||||||
|
|
||||||
$files_array[] = $phpgw->vfs->ls ("$fakebase/$group_array[account_name]", array (RELATIVE_NONE), False, False, True);
|
$files_array[] = $phpgw->vfs->ls ("$fakebase/$group_array[account_name]", array (RELATIVE_NONE), False, False, True);
|
||||||
@ -620,13 +620,13 @@ if (!$op && !$delete && !$createdir && !$renamefiles && !$move && !$copy && !$ed
|
|||||||
###
|
###
|
||||||
|
|
||||||
html_break (1);
|
html_break (1);
|
||||||
|
html_form_input ("submit", "go", "Go to:");
|
||||||
|
|
||||||
html_form_input ("submit", "copy", "Copy to:");
|
html_form_input ("submit", "copy", "Copy to:");
|
||||||
|
|
||||||
html_form_input ("submit", "move", "Move to:");
|
html_form_input ("submit", "move", "Move to:");
|
||||||
html_form_select_begin ("todir");
|
html_form_select_begin ("todir");
|
||||||
|
|
||||||
html_form_input ("submit", "go", "Go to:");
|
|
||||||
|
|
||||||
html_break (1);
|
html_break (1);
|
||||||
|
|
||||||
###
|
###
|
||||||
@ -843,10 +843,12 @@ if ($edit)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($content = $phpgw->vfs->read ($fileman_decoded))
|
if ($phpgw->vfs->file_exists ($fileman_decoded, array (RELATIVE_ALL)))
|
||||||
{
|
{
|
||||||
if ($edit_file)
|
if ($edit_file)
|
||||||
$content = stripslashes ($$edit_file);
|
$content = stripslashes ($$edit_file);
|
||||||
|
else
|
||||||
|
$content = $phpgw->vfs->read ($fileman_decoded);
|
||||||
|
|
||||||
html_table_begin ("100%");
|
html_table_begin ("100%");
|
||||||
html_form_begin ("$appname/index.php?path=$path");
|
html_form_begin ("$appname/index.php?path=$path");
|
||||||
@ -918,7 +920,7 @@ elseif ($op == "upload")
|
|||||||
|
|
||||||
if ($fileinfo["deleteable"] != "N")
|
if ($fileinfo["deleteable"] != "N")
|
||||||
{
|
{
|
||||||
$phpgw->vfs->set_attributes ($file_name[$i], array ("owner_id" => $userinfo["username"], "modifiedby_id" => $userinfo["username"], "modified" => $now, "size" => $file_size[$i], mime_type => $file_type[$i], "deleteable" => "Y", "comment" => $comment[$i]), array (RELATIVE_ALL));
|
$phpgw->vfs->set_attributes ($file_name[$i], array (RELATIVE_ALL), array ("owner_id" => $userinfo["username"], "modifiedby_id" => $userinfo["username"], "modified" => $now, "size" => $file_size[$i], mime_type => $file_type[$i], "deleteable" => "Y", "comment" => $comment[$i]));
|
||||||
$phpgw->vfs->cp ($file[$i], "$file_name[$i]", array (RELATIVE_NONE|VFS_REAL, RELATIVE_ALL));
|
$phpgw->vfs->cp ($file[$i], "$file_name[$i]", array (RELATIVE_NONE|VFS_REAL, RELATIVE_ALL));
|
||||||
|
|
||||||
html_text_summary ("Replaced $disppath/$file_name[$i]", $file_size[$i]);
|
html_text_summary ("Replaced $disppath/$file_name[$i]", $file_size[$i]);
|
||||||
@ -937,11 +939,18 @@ elseif ($op == "upload")
|
|||||||
}
|
}
|
||||||
|
|
||||||
$phpgw->vfs->cp ($file[$i], $file_name[$i], array (RELATIVE_NONE|VFS_REAL, RELATIVE_ALL));
|
$phpgw->vfs->cp ($file[$i], $file_name[$i], array (RELATIVE_NONE|VFS_REAL, RELATIVE_ALL));
|
||||||
$phpgw->vfs->set_attributes ($file_name[$i], array ("mime_type" => $file_type[$i], "comment" => $comment[$i]), array (RELATIVE_ALL));
|
$phpgw->vfs->set_attributes ($file_name[$i], array (RELATIVE_ALL), array ("mime_type" => $file_type[$i], "comment" => $comment[$i]));
|
||||||
|
|
||||||
html_text_summary ("Created $disppath/$file_name[$i]", $file_size[$i]);
|
html_text_summary ("Created $disppath/$file_name[$i]", $file_size[$i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
elseif ($file_name[$i])
|
||||||
|
{
|
||||||
|
$phpgw->vfs->touch ($file_name[$i], array (RELATIVE_ALL));
|
||||||
|
$phpgw->vfs->set_attributes ($file_name[$i], array (RELATIVE_ALL), array ("mime_type" => $file_type[$i], "comment" => $comment[$i]));
|
||||||
|
|
||||||
|
html_text_summary ("Created $disppath/$file_name[$i]", $file_size[$i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
html_break (2);
|
html_break (2);
|
||||||
@ -956,7 +965,7 @@ elseif ($comment_files)
|
|||||||
{
|
{
|
||||||
while (list ($file) = each ($comment_files))
|
while (list ($file) = each ($comment_files))
|
||||||
{
|
{
|
||||||
$phpgw->vfs->set_attributes ($file, array ("comment" => $comment_files[$file]));
|
$phpgw->vfs->set_attributes ($file, array (RELATIVE_ALL), array ("comment" => $comment_files[$file]));
|
||||||
|
|
||||||
html_text_summary ("Updated comment for $path/$file");
|
html_text_summary ("Updated comment for $path/$file");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user