$GLOBALS['phpgw']->vfs->cp(array('from' => $_FILES['upload_file']['tmp_name'][$i], 'to' => $_FILES['upload_file']['name'][$i], 'relatives' => array(RELATIVE_NONE | VFS_REAL, RELATIVE_ALL))); $GLOBALS['phpgw']->vfs->set_attributes(array('string' => $_FILES['upload_file']['name'][$i], 'relatives' => array(RELATIVE_ALL), 'attributes' => array('mime_type' => $_FILES['upload_file']['type'][$i], 'comment' => stripslashes($upload_comment[$i])))); html_text_summary(lang('Created %1', $disppath . '/' . $_FILES['upload_file']['name'][$i]), $_FILES['upload_file']['size'][$i]); } } elseif ($_FILES['upload_file']['name'][$i]) { $GLOBALS['phpgw']->vfs->touch(array('string' => $_FILES['upload_file']['name'][$i], 'relatives' => array(RELATIVE_ALL))); $GLOBALS['phpgw']->vfs->set_attributes(array('string' => $_FILES['upload_file']['name'][$i], 'relatives' => array(RELATIVE_ALL), 'attributes' => array('mime_type' => $_FILES['upload_file']['type'][$i], 'comment' => $upload_comment[$i]))); html_text_summary(lang('Created %1', $disppath . '/' . $_FILES['upload_file']['name'][$i]), $file_size[$i]); } } html_break(2); html_link_back(); } elseif ($comment_files) { while (list($file) = each($comment_files)) { if ($badchar = bad_chars($comment_files[$file], False, True)) { echo $GLOBALS['phpgw']->common->error_list(array(html_text_italic($file, 1) . html_encode(': ' . lang('Comments cannot contain "%1"', $badchar), 1))); continue; } $GLOBALS['phpgw']->vfs->set_attributes(array('string' => $file, 'relatives' => array(RELATIVE_ALL), 'attributes' => array('comment' => stripslashes($comment_files[$file])))); html_text_summary(lang('Updated comment for %1', $path . '/' . $file)); } html_break(2); html_link_back(); } elseif ($renamefiles) { while (list($from, $to) = each($renamefiles)) { if ($badchar = bad_chars($to, True, True)) { echo $GLOBALS['phpgw']->common->error_list(array(html_encode(lang('File names cannot contain "%1"', $badchar), 1))); continue; } if (ereg("/", $to) || ereg("\\\\", $to)) { echo $GLOBALS['phpgw']->common->error_list(array(lang("File names cannot contain \\ or /")));
function fail($string) { /* html_table_row_begin(); html_table_col_begin();*/ echo "<h3>{$string} "; /* html_table_col_end(); html_table_col_begin();*/ echo " <b>FAILED!</b></h3>"; /* html_table_col_end(); html_table_row_end(); */ } $phpgw_info["flags"] = array("currentapp" => "filemanager", "noheader" => False, "noappheader" => False, "enable_vfs_class" => True); include "../../header.inc.php"; html_text('VFS_DAV tests:'); html_break(1); html_text_italic(PHP_OS . " - " . $phpgw_info["server"]["db_type"] . " - " . PHP_VERSION . " - " . $phpgw->vfs->basedir); html_break(1); //html_table_begin(); $sep = SEP; $user = $phpgw->vfs->working_lid; $homedir = $phpgw->vfs->fakebase . "/" . $user; $realhomedir = preg_replace("|/|", $sep, $homedir); $filesdir = $phpgw->vfs->basedir; $currentapp = $phpgw_info["flags"]["currentapp"]; $time1 = time(); echo ' override locks : '; print_r($phpgw->vfs->override_locks); ### # write test $phpgw->vfs->cd(); $testfile = 'sdhdsjjkldggfsbhgbnirooaqojsdkljajklvagbytoi-test';