[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: phpwebhosting index.php,1.30,1.31 test.php,1.6,1
From: |
Jason Wies <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: phpwebhosting index.php,1.30,1.31 test.php,1.6,1.7 |
Date: |
Wed, 16 Jan 2002 01:32:21 -0500 |
Update of /cvsroot/phpgroupware/phpwebhosting
In directory subversions:/tmp/cvs-serv30992
Modified Files:
index.php test.php
Log Message:
Convert to arrayized VFS calls, more precise output in test.php
Index: index.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpwebhosting/index.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -r1.30 -r1.31
*** index.php 2 Jan 2002 14:33:04 -0000 1.30
--- index.php 16 Jan 2002 06:32:19 -0000 1.31
***************
*** 19,23 ****
}
-
$to_decode = array
(
--- 19,22 ----
***************
*** 91,95 ****
if ($execute && $command_line)
{
! if ($result = $GLOBALS['phpgw']->vfs->command_line (stripslashes
($command_line)))
{
$messages = html_text_bold ('Command sucessfully run', 1);
--- 90,94 ----
if ($execute && $command_line)
{
! if ($result = $GLOBALS['phpgw']->vfs->command_line (array
('command_line' => stripslashes ($command_line))))
{
$messages = html_text_bold ('Command sucessfully run', 1);
***************
*** 124,128 ****
$path = $GLOBALS['phpgw']->vfs->pwd ();
! if (!$path || $GLOBALS['phpgw']->vfs->pwd (False) == '')
{
$path = $GLOBALS['homedir'];
--- 123,127 ----
$path = $GLOBALS['phpgw']->vfs->pwd ();
! if (!$path || $GLOBALS['phpgw']->vfs->pwd (array ('full' => False)) ==
'')
{
$path = $GLOBALS['homedir'];
***************
*** 130,135 ****
}
! $GLOBALS['phpgw']->vfs->cd (False, False, array (RELATIVE_NONE));
! $GLOBALS['phpgw']->vfs->cd ($path, False, array (RELATIVE_NONE));
$pwd = $GLOBALS['phpgw']->vfs->pwd ();
--- 129,134 ----
}
! $GLOBALS['phpgw']->vfs->cd (array ('string' => False, 'relatives' => array
(RELATIVE_NONE), 'relative' => False));
! $GLOBALS['phpgw']->vfs->cd (array ('string' => $path, 'relatives' => array
(RELATIVE_NONE), 'relative' => False));
$pwd = $GLOBALS['phpgw']->vfs->pwd ();
***************
*** 166,171 ****
<p>
<b>phpGW debug:</b><br>
! real getabsolutepath: " .
$GLOBALS['phpgw']->vfs->getabsolutepath (False, False, False) . "<br>
! fake getabsolutepath: " .
$GLOBALS['phpgw']->vfs->getabsolutepath (False) . "<br>
appsession: " . $GLOBALS['phpgw']->session->appsession
('vfs','') . "<br>
pwd: " . $GLOBALS['phpgw']->vfs->pwd () . "<br>";
--- 165,170 ----
<p>
<b>phpGW debug:</b><br>
! real getabsolutepath: " .
$GLOBALS['phpgw']->vfs->getabsolutepath (array ('target' => False, 'mask' =>
False, 'fake' => False)) . "<br>
! fake getabsolutepath: " .
$GLOBALS['phpgw']->vfs->getabsolutepath (array ('target' => False)) . "<br>
appsession: " . $GLOBALS['phpgw']->session->appsession
('vfs','') . "<br>
pwd: " . $GLOBALS['phpgw']->vfs->pwd () . "<br>";
***************
*** 205,209 ****
}
! if ($path != $GLOBALS['homedir'] && $path != $GLOBALS['fakebase'] && $path !=
'/' && !$GLOBALS['phpgw']->vfs->acl_check ($path, array (RELATIVE_NONE),
PHPGW_ACL_READ))
{
echo $GLOBALS['phpgw']->common->error_list (array ('You do not have
access to '.$path));
--- 204,216 ----
}
! if ($path != $GLOBALS['homedir']
! && $path != $GLOBALS['fakebase']
! && $path != '/'
! && !$GLOBALS['phpgw']->vfs->acl_check (array (
! 'string' => $path,
! 'relatives' => array (RELATIVE_NONE),
! 'operation' => PHPGW_ACL_READ
! ))
! )
{
echo $GLOBALS['phpgw']->common->error_list (array ('You do not have
access to '.$path));
***************
*** 221,240 ****
###
! if (($path == $GLOBALS['homedir']) && !$GLOBALS['phpgw']->vfs->file_exists
($GLOBALS['homedir'], array (RELATIVE_NONE)))
! {
! // $GLOBALS['phpgw']->vfs->override_acl = 1;
! $GLOBALS['phpgw']->vfs->mkdir ($GLOBALS['homedir'], array
(RELATIVE_NONE));
! // $GLOBALS['phpgw']->vfs->override_acl = 0;
}
elseif (preg_match ('|^'.$GLOBALS['fakebase'].'\/(.*)$|U', $path, $matches))
{
! if (!$GLOBALS['phpgw']->vfs->file_exists ($path, array (RELATIVE_NONE)))
{
! // $GLOBALS['phpgw']->vfs->override_acl = 1;
! $GLOBALS['phpgw']->vfs->mkdir ($path, array (RELATIVE_NONE));
! // $GLOBALS['phpgw']->vfs->override_acl = 0;
$group_id = $GLOBALS['phpgw']->accounts->name2id ($matches[1]);
! $GLOBALS['phpgw']->vfs->set_attributes ($path, array
(RELATIVE_NONE), array ('owner_id' => $group_id, 'createdby_id' => $group_id));
}
}
--- 228,260 ----
###
! if (($path == $GLOBALS['homedir'])
! && !$GLOBALS['phpgw']->vfs->file_exists (array (
! 'string' => $GLOBALS['homedir'],
! 'relatives' => array (RELATIVE_NONE)
! ))
! )
! {
! $GLOBALS['phpgw']->vfs->override_acl = 1;
! $GLOBALS['phpgw']->vfs->mkdir (array ('string' => $GLOBALS['homedir'],
'relatives' => array (RELATIVE_NONE)));
! $GLOBALS['phpgw']->vfs->override_acl = 0;
}
elseif (preg_match ('|^'.$GLOBALS['fakebase'].'\/(.*)$|U', $path, $matches))
{
! if (!$GLOBALS['phpgw']->vfs->file_exists (array ('string' => $path,
'relatives' => array (RELATIVE_NONE))))
{
! $GLOBALS['phpgw']->vfs->override_acl = 1;
! $GLOBALS['phpgw']->vfs->mkdir (array ('string' => $path,
'relatives' => array (RELATIVE_NONE)));
! $GLOBALS['phpgw']->vfs->override_acl = 0;
$group_id = $GLOBALS['phpgw']->accounts->name2id ($matches[1]);
! $GLOBALS['phpgw']->vfs->set_attributes (array (
! 'string' => $path,
! 'relatives' => array (RELATIVE_NONE),
! 'attributes' => array (
! 'owner_id' => $group_id,
! 'createdby_id' =>
$group_id
! )
! )
! );
}
}
***************
*** 246,250 ****
if ($path != $GLOBALS['homedir'] && $path != '/' && $path !=
$GLOBALS['fakebase'])
{
! if (!$GLOBALS['phpgw']->vfs->file_exists ($path, array (RELATIVE_NONE)))
{
echo $GLOBALS['phpgw']->common->error_list (array ('Directory
'.$path.' does not exist'));
--- 266,270 ----
if ($path != $GLOBALS['homedir'] && $path != '/' && $path !=
$GLOBALS['fakebase'])
{
! if (!$GLOBALS['phpgw']->vfs->file_exists (array ('string' => $path,
'relatives' => array (RELATIVE_NONE))))
{
echo $GLOBALS['phpgw']->common->error_list (array ('Directory
'.$path.' does not exist'));
***************
*** 261,265 ****
if ($update || rand (0, 19) == 4)
{
! $GLOBALS['phpgw']->vfs->update_real ($path, array (RELATIVE_NONE));
}
--- 281,285 ----
if ($update || rand (0, 19) == 4)
{
! $GLOBALS['phpgw']->vfs->update_real (array ('string' => $path,
'relatives' => array (RELATIVE_NONE)));
}
***************
*** 295,304 ****
if ($path == $GLOBALS['fakebase'])
{
! if (!$GLOBALS['phpgw']->vfs->file_exists ($GLOBALS['homedir'], array
(RELATIVE_NONE)))
{
! $GLOBALS['phpgw']->vfs->mkdir ($GLOBALS['homedir'], array
(RELATIVE_NONE));
}
! $ls_array = $GLOBALS['phpgw']->vfs->ls ($GLOBALS['homedir'], array
(RELATIVE_NONE), False, False, True);
$files_array[] = $ls_array[0];
$numoffiles++;
--- 315,330 ----
if ($path == $GLOBALS['fakebase'])
{
! if (!$GLOBALS['phpgw']->vfs->file_exists (array ('string' =>
$GLOBALS['homedir'], 'relatives' => array (RELATIVE_NONE))))
{
! $GLOBALS['phpgw']->vfs->mkdir (array ('string' =>
$GLOBALS['homedir'], 'relatives' => array (RELATIVE_NONE)));
}
! $ls_array = $GLOBALS['phpgw']->vfs->ls (array (
! 'string' => $GLOBALS['homedir'],
! 'relatives' => array (RELATIVE_NONE),
! 'checksubdirs' => False,
! 'nofiles' => True
! )
! );
$files_array[] = $ls_array[0];
$numoffiles++;
***************
*** 318,328 ****
}
! if (!$GLOBALS['phpgw']->vfs->file_exists
($GLOBALS['fakebase'].'/'.$group_array['account_name'], array (RELATIVE_NONE)))
! {
! $GLOBALS['phpgw']->vfs->mkdir
($GLOBALS['fakebase'].'/'.$group_array['account_name'], array (RELATIVE_NONE));
! $GLOBALS['phpgw']->vfs->set_attributes
($GLOBALS['fakebase'].'/'.$group_array['account_name'], array (RELATIVE_NONE),
array ('owner_id' => $group_array['account_id'], 'createdby_id' =>
$group_array['account_id']));
! }
!
! $ls_array = $GLOBALS['phpgw']->vfs->ls
($GLOBALS['fakebase'].'/'.$group_array['account_name'], array (RELATIVE_NONE),
False, False, True);
$files_array[] = $ls_array[0];
--- 344,377 ----
}
! if (!$GLOBALS['phpgw']->vfs->file_exists (array (
! 'string' =>
$GLOBALS['fakebase'].'/'.$group_array['account_name'],
! 'relatives' => array (RELATIVE_NONE)
! ))
! )
! {
! $GLOBALS['phpgw']->vfs->mkdir (array (
! 'string' =>
$GLOBALS['fakebase'].'/'.$group_array['account_name'],
! 'relatives' => array (RELATIVE_NONE)
! )
! );
!
! $GLOBALS['phpgw']->vfs->set_attributes (array (
! 'string' =>
$GLOBALS['fakebase'].'/'.$group_array['account_name'],
! 'relatives' => array
(RELATIVE_NONE),
! 'attributes' => array (
! 'owner_id' =>
$group_array['account_id'],
! 'createdby_id'
=> $group_array['account_id']
! )
! )
! );
! }
!
! $ls_array = $GLOBALS['phpgw']->vfs->ls (array (
! 'string' =>
$GLOBALS['fakebase'].'/'.$group_array['account_name'],
! 'relatives' => array (RELATIVE_NONE),
! 'checksubdirs' => False,
! 'nofiles' => True
! )
! );
$files_array[] = $ls_array[0];
***************
*** 333,337 ****
else
{
! $ls_array = $GLOBALS['phpgw']->vfs->ls ($path, array (RELATIVE_NONE),
False, False, False, $sortby);
if ($phpwh_debug)
--- 382,393 ----
else
{
! $ls_array = $GLOBALS['phpgw']->vfs->ls (array (
! 'string' => $path,
! 'relatives' => array (RELATIVE_NONE),
! 'checksubdirs' => False,
! 'nofiles' => False,
! 'orderby' => $sortby
! )
! );
if ($phpwh_debug)
***************
*** 367,371 ****
$download_browser = CreateObject ('phpgwapi.browser');
$download_browser->content_header ($fileman[$i]);
! echo $GLOBALS['phpgw']->vfs->read ($fileman[$i]);
$GLOBALS['phpgw']->common->phpgw_exit ();
}
--- 423,427 ----
$download_browser = CreateObject ('phpgwapi.browser');
$download_browser->content_header ($fileman[$i]);
! echo $GLOBALS['phpgw']->vfs->read (array ('string' =>
$fileman[$i]));
$GLOBALS['phpgw']->common->phpgw_exit ();
}
***************
*** 374,396 ****
if ($op == 'view' && $file)
{
! // $ls_array = $GLOBALS['phpgw']->vfs->ls ($path.'/'.$file, array
(RELATIVE_ALL), False, False, True);
! // if ($ls_array[0]['mime_type'])
! // {
! // $mime_type = $ls_array[0]['mime_type'];
! // }
! // elseif ($GLOBALS['settings']['viewtextplain'])
! // {
! // $mime_type = 'text/plain';
! // }
!
! Header('Content-length:
'.$GLOBALS['phpgw']->vfs->get_size($path.'/'.$file,array(RELATIVE_ALL)));
! Header('Content-type:
'.$GLOBALS['phpgw']->vfs->file_type($path.'/'.$file,array(RELATIVE_ALL)));
! Header('Content-disposition: attachment; filename="'.$file.'"');
! echo $GLOBALS['phpgw']->vfs->read($path.'/'.$file,array(RELATIVE_ALL));
! flush();
! // header('Content-type: ' . $mime_type);
! // echo $GLOBALS['phpgw']->vfs->read ($path.'/'.$file);
$GLOBALS['phpgw']->common->phpgw_exit ();
}
--- 430,456 ----
if ($op == 'view' && $file)
{
! $ls_array = $GLOBALS['phpgw']->vfs->ls (array (
! 'string' => $path.'/'.$file,
! 'relatives' => array (RELATIVE_ALL),
! 'checksubdirs' => False,
! 'nofiles' => True
! )
! );
! if ($ls_array[0]['mime_type'])
! {
! $mime_type = $ls_array[0]['mime_type'];
! }
! elseif ($GLOBALS['settings']['viewtextplain'])
! {
! $mime_type = 'text/plain';
! }
! header('Content-type: ' . $mime_type);
! echo $GLOBALS['phpgw']->vfs->read (array (
! 'string' => $path.'/'.$file,
! 'relatives' => array (RELATIVE_NONE)
! )
! );
$GLOBALS['phpgw']->common->phpgw_exit ();
}
***************
*** 398,437 ****
if ($op == 'history' && $file)
{
! html_table_begin ();
! html_table_row_begin ();
! html_table_col_begin ();
! html_text_bold ('Date');
! html_table_col_end ();
! html_table_col_begin ();
! html_text_bold ('Version');
! html_table_col_end ();
! html_table_col_begin ();
! html_text_bold ('Who');
! html_table_col_end ();
! html_table_col_begin ();
! html_text_bold ('Operation');
! html_table_col_end ();
! html_table_row_end ();
! $journal_array = $GLOBALS['phpgw']->vfs->get_journal ($file, array
(RELATIVE_ALL));
! while (list ($num, $journal_entry) = each ($journal_array))
{
html_table_row_begin ();
html_table_col_begin ();
! html_text ($journal_entry['created'] . html_nbsp (3, 1));
html_table_col_end ();
html_table_col_begin ();
! html_text ($journal_entry['version'] . html_nbsp (3, 1));
html_table_col_end ();
html_table_col_begin ();
! html_text ($GLOBALS['phpgw']->accounts->id2name
($journal_entry['owner_id']) . html_nbsp (3, 1));
html_table_col_end ();
html_table_col_begin ();
! html_text ($journal_entry['comment']);
html_table_col_end ();
}
- html_table_end ();
- html_page_close ();
}
--- 458,510 ----
if ($op == 'history' && $file)
{
! $journal_array = $GLOBALS['phpgw']->vfs->get_journal (array (
! 'string' => $file,
! 'relatives' => array (RELATIVE_ALL)
! )
! );
! if (is_array ($journal_array))
{
+ html_table_begin ();
html_table_row_begin ();
html_table_col_begin ();
! html_text_bold ('Date');
html_table_col_end ();
html_table_col_begin ();
! html_text_bold ('Version');
html_table_col_end ();
html_table_col_begin ();
! html_text_bold ('Who');
html_table_col_end ();
html_table_col_begin ();
! html_text_bold ('Operation');
html_table_col_end ();
+ html_table_row_end ();
+
+ while (list ($num, $journal_entry) = each ($journal_array))
+ {
+ html_table_row_begin ();
+ html_table_col_begin ();
+ html_text ($journal_entry['created'] . html_nbsp (3,
1));
+ html_table_col_end ();
+ html_table_col_begin ();
+ html_text ($journal_entry['version'] . html_nbsp (3,
1));
+ html_table_col_end ();
+ html_table_col_begin ();
+ html_text ($GLOBALS['phpgw']->accounts->id2name
($journal_entry['owner_id']) . html_nbsp (3, 1));
+ html_table_col_end ();
+ html_table_col_begin ();
+ html_text ($journal_entry['comment']);
+ html_table_col_end ();
+ }
+
+ html_table_end ();
+ html_page_close ();
+ }
+ else
+ {
+ html_text_bold ('No version history for this file/directory');
}
}
***************
*** 446,450 ****
}
! if ($GLOBALS['phpgw']->vfs->file_exists ($createfile, array
(RELATIVE_ALL)))
{
echo $GLOBALS['phpgw']->common->error_list (array ('File
'.$createfile.' already exists. Please edit it or delete it first.'));
--- 519,527 ----
}
! if ($GLOBALS['phpgw']->vfs->file_exists (array (
! 'string' => $createfile,
! 'relatives' => array (RELATIVE_ALL)
! ))
! )
{
echo $GLOBALS['phpgw']->common->error_list (array ('File
'.$createfile.' already exists. Please edit it or delete it first.'));
***************
*** 454,458 ****
}
! if ($GLOBALS['phpgw']->vfs->touch ($createfile, array (RELATIVE_ALL)))
{
$fileman = array ();
--- 531,539 ----
}
! if ($GLOBALS['phpgw']->vfs->touch (array (
! 'string' => $createfile,
! 'relatives' => array (RELATIVE_ALL)
! ))
! )
{
$fileman = array ();
***************
*** 729,733 ****
{
$clickview =
$GLOBALS['filesdir'].$pwd.'/'.$files['name'];
! echo 'Setting clickview
= '.$clickview.'<br>'."\n";
}
else
--- 810,818 ----
{
$clickview =
$GLOBALS['filesdir'].$pwd.'/'.$files['name'];
!
! if ($phpwh_debug)
! {
! echo 'Setting
clickview = '.$clickview.'<br>'."\n";
! }
}
else
***************
*** 767,771 ****
html_table_col_begin ();
! $size = $GLOBALS['phpgw']->vfs->get_size
($files['directory'] . '/' . $files['name'], array (RELATIVE_NONE));
borkb ($size);
--- 852,861 ----
html_table_col_begin ();
! $size = $GLOBALS['phpgw']->vfs->get_size (array
(
! 'string' =>
$files['directory'] . '/' . $files['name'],
! 'relatives' => array
(RELATIVE_NONE)
! )
! );
!
borkb ($size);
***************
*** 972,978 ****
###
$dirs[] = array ('directory' => $GLOBALS['fakebase'], 'name' =>
$GLOBALS['userinfo']['account_lid']);
! $ls_array = $GLOBALS['phpgw']->vfs->ls ($GLOBALS['homedir'],
array (RELATIVE_NONE), True, 'Directory');
while (list ($num, $dir) = each ($ls_array))
{
--- 1062,1076 ----
###
+ $dirs = array ();
$dirs[] = array ('directory' => $GLOBALS['fakebase'], 'name' =>
$GLOBALS['userinfo']['account_lid']);
! $ls_array = $GLOBALS['phpgw']->vfs->ls (array (
! 'string' => $GLOBALS['homedir'],
! 'relatives' => array (RELATIVE_NONE),
! 'checksubdirs' => True,
! 'mime_type' => 'Directory'
! )
! );
!
while (list ($num, $dir) = each ($ls_array))
{
***************
*** 980,983 ****
--- 1078,1082 ----
}
+
###
# Then we get the directories in their membership's home
directories
***************
*** 998,1002 ****
$dirs[] = array ('directory' => $GLOBALS['fakebase'],
'name' => $group_array['account_name']);
! $ls_array = $phpgw->vfs->ls
($GLOBALS['fakebase'].'/'.$group_array[account_name], array (RELATIVE_NONE),
True, 'Directory');
while (list ($num, $dir) = each ($ls_array))
{
--- 1097,1107 ----
$dirs[] = array ('directory' => $GLOBALS['fakebase'],
'name' => $group_array['account_name']);
! $ls_array = $phpgw->vfs->ls (array (
! 'string' =>
$GLOBALS['fakebase'].'/'.$group_array['account_name'],
! 'relatives' => array
(RELATIVE_NONE),
! 'checksubdirs' => True,
! 'mime_type' => 'Directory'
! )
! );
while (list ($num, $dir) = each ($ls_array))
{
***************
*** 1026,1030 ****
###
! if ((($dir['directory'] . $dir['name']) != $path) &&
$GLOBALS['phpgw']->vfs->file_exists ($dir['directory'] . $dir['name'], array
(RELATIVE_NONE)))
{
html_form_option ($dir['directory'] .
$dir['name'], $dir['directory'] . $dir['name']);
--- 1131,1140 ----
###
! if ((($dir['directory'] . $dir['name']) != $path)
! && $GLOBALS['phpgw']->vfs->file_exists (array (
! 'string' =>
$dir['directory'] . $dir['name'],
! 'relatives' => array
(RELATIVE_NONE)
! ))
! )
{
html_form_option ($dir['directory'] .
$dir['name'], $dir['directory'] . $dir['name']);
***************
*** 1088,1092 ****
html_text (borkb ($GLOBALS['userinfo']['hdspace'] -
$usedspace, NULL, 1));
! $ls_array = $GLOBALS['phpgw']->vfs->ls ($path, array
(RELATIVE_NONE));
$i = count ($ls_array);
--- 1198,1207 ----
html_text (borkb ($GLOBALS['userinfo']['hdspace'] -
$usedspace, NULL, 1));
! $ls_array = $GLOBALS['phpgw']->vfs->ls (array (
! 'string' => $path,
! 'relatives' => array (RELATIVE_NONE)
! )
! );
!
$i = count ($ls_array);
***************
*** 1186,1190 ****
$content = $edit_file_content;
! if ($GLOBALS['phpgw']->vfs->write ($edit_file, array
(RELATIVE_ALL), $content))
{
html_text_bold ('Saved '.$path.'/'.$edit_file);
--- 1301,1310 ----
$content = $edit_file_content;
! if ($GLOBALS['phpgw']->vfs->write (array (
! 'string' => $edit_file,
! 'relatives' => array (RELATIVE_ALL),
! 'content' => $content
! ))
! )
{
html_text_bold ('Saved '.$path.'/'.$edit_file);
***************
*** 1211,1215 ****
continue;
! if ($GLOBALS['phpgw']->vfs->write ($fileman[$j], array
(RELATIVE_ALL), $content))
{
html_text_bold ('Saved
'.$path.'/'.$fileman[$j]);
--- 1331,1340 ----
continue;
! if ($GLOBALS['phpgw']->vfs->write (array (
! 'string' => $fileman[$j],
! 'relatives' => array (RELATIVE_ALL),
! 'content' => $content
! ))
! )
{
html_text_bold ('Saved
'.$path.'/'.$fileman[$j]);
***************
*** 1243,1247 ****
}
! if ($fileman[$j] && $GLOBALS['phpgw']->vfs->file_exists
($fileman[$j], array (RELATIVE_ALL)))
{
if ($edit_file)
--- 1368,1376 ----
}
! if ($fileman[$j] && $GLOBALS['phpgw']->vfs->file_exists (array (
! 'string' => $fileman[$j],
! 'relatives' => array
(RELATIVE_ALL)
! ))
! )
{
if ($edit_file)
***************
*** 1251,1255 ****
else
{
! $content = $GLOBALS['phpgw']->vfs->read
($fileman[$j]);
}
--- 1380,1384 ----
else
{
! $content = $GLOBALS['phpgw']->vfs->read (array
('string' => $fileman[$j]));
}
***************
*** 1307,1311 ****
###
! $ls_array = $GLOBALS['phpgw']->vfs->ls ($path . '/' .
$upload_file_name[$i], array (RELATIVE_NONE), False, False, True);
$fileinfo = $ls_array[0];
--- 1436,1447 ----
###
! $ls_array = $GLOBALS['phpgw']->vfs->ls (array (
! 'string' => $path . '/' .
$upload_file_name[$i],
! 'relatives' => array (RELATIVE_NONE),
! 'checksubdirs' => False,
! 'nofiles' => True
! )
! );
!
$fileinfo = $ls_array[0];
***************
*** 1323,1328 ****
if ($fileinfo['name'] && $fileinfo['deleteable'] != 'N')
{
! $GLOBALS['phpgw']->vfs->set_attributes
($upload_file_name[$i], array (RELATIVE_ALL), array ('owner_id' =>
$GLOBALS['userinfo']['username'], 'modifiedby_id' =>
$GLOBALS['userinfo']['username'], 'modified' => $now, 'size' =>
$upload_file_size[$i], 'mime_type' => $upload_file_type[$i], 'deleteable' =>
'Y', 'comment' => stripslashes ($upload_comment[$i])));
! $GLOBALS['phpgw']->vfs->cp ($upload_file[$i],
$upload_file_name[$i], array (RELATIVE_NONE|VFS_REAL, RELATIVE_ALL));
html_text_summary ('Replaced
'.$disppath.'/'.$upload_file_name[$i], $upload_file_size[$i]);
--- 1459,1483 ----
if ($fileinfo['name'] && $fileinfo['deleteable'] != 'N')
{
! $GLOBALS['phpgw']->vfs->set_attributes (array (
! 'string' =>
$upload_file_name[$i],
! 'relatives' => array
(RELATIVE_ALL),
! 'attributes' => array (
!
'owner_id' => $GLOBALS['userinfo']['username'],
!
'modifiedby_id' => $GLOBALS['userinfo']['username'],
!
'modified' => $now,
! 'size'
=> $upload_file_size[$i],
!
'mime_type' => $upload_file_type[$i],
!
'deleteable' => 'Y',
!
'comment' => stripslashes ($upload_comment[$i])
! )
! )
! );
!
! $GLOBALS['phpgw']->vfs->cp (array (
! 'from' => $upload_file[$i],
! 'to' =>
$upload_file_name[$i],
! 'relatives' => array
(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL)
! )
! );
html_text_summary ('Replaced
'.$disppath.'/'.$upload_file_name[$i], $upload_file_size[$i]);
***************
*** 1330,1335 ****
else
{
! $GLOBALS['phpgw']->vfs->cp ($upload_file[$i],
$upload_file_name[$i], array (RELATIVE_NONE|VFS_REAL, RELATIVE_ALL));
! $GLOBALS['phpgw']->vfs->set_attributes
($upload_file_name[$i], array (RELATIVE_ALL), array ('mime_type' =>
$upload_file_type[$i], 'comment' => stripslashes ($upload_comment[$i])));
html_text_summary ('Created
'.$disppath.'/'.$upload_file_name[$i], $upload_file_size[$i]);
--- 1485,1504 ----
else
{
! $GLOBALS['phpgw']->vfs->cp (array (
! 'from' => $upload_file[$i],
! 'to' =>
$upload_file_name[$i],
! 'relatives' => array
(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL)
! )
! );
!
! $GLOBALS['phpgw']->vfs->set_attributes (array (
! 'string' =>
$upload_file_name[$i],
! 'relatives' => array
(RELATIVE_ALL),
! 'attributes' => array (
!
'mime_type' => $upload_file_type[$i],
!
'comment' => stripslashes ($upload_comment[$i])
! )
! )
! );
html_text_summary ('Created
'.$disppath.'/'.$upload_file_name[$i], $upload_file_size[$i]);
***************
*** 1338,1343 ****
elseif ($upload_file_name[$i])
{
! $GLOBALS['phpgw']->vfs->touch ($upload_file_name[$i],
array (RELATIVE_ALL));
! $GLOBALS['phpgw']->vfs->set_attributes
($upload_file_name[$i], array (RELATIVE_ALL), array ('mime_type' =>
$upload_file_type[$i], 'comment' => $upload_comment[$i]));
html_text_summary ('Created
'.$disppath.'/'.$upload_file_name[$i], $file_size[$i]);
--- 1507,1525 ----
elseif ($upload_file_name[$i])
{
! $GLOBALS['phpgw']->vfs->touch (array (
! 'string' =>
$upload_file_name[$i],
! 'relatives' => array (RELATIVE_ALL)
! )
! );
!
! $GLOBALS['phpgw']->vfs->set_attributes (array (
! 'string' =>
$upload_file_name[$i],
! 'relatives' => array (RELATIVE_ALL),
! 'attributes' => array (
! 'mime_type' =>
$upload_file_type[$i],
! 'comment' =>
$upload_comment[$i]
! )
! )
! );
html_text_summary ('Created
'.$disppath.'/'.$upload_file_name[$i], $file_size[$i]);
***************
*** 1363,1367 ****
}
! $GLOBALS['phpgw']->vfs->set_attributes ($file, array
(RELATIVE_ALL), array ('comment' => stripslashes ($comment_files[$file])));
html_text_summary ('Updated comment for '.$path.'/'.$file);
--- 1545,1556 ----
}
! $GLOBALS['phpgw']->vfs->set_attributes (array (
! 'string' => $file,
! 'relatives' => array (RELATIVE_ALL),
! 'attributes' => array (
! 'comment' =>
stripslashes ($comment_files[$file])
! )
! )
! );
html_text_summary ('Updated comment for '.$path.'/'.$file);
***************
*** 1390,1394 ****
echo $GLOBALS['phpgw']->common->error_list (array
("File names cannot contain \\ or /"));
}
! elseif (!$GLOBALS['phpgw']->vfs->mv ($from, $to))
{
echo $GLOBALS['phpgw']->common->error_list (array
('Could not rename '.$disppath.'/'.$from.' to '.$disppath.'/'.$to));
--- 1579,1587 ----
echo $GLOBALS['phpgw']->common->error_list (array
("File names cannot contain \\ or /"));
}
! elseif (!$GLOBALS['phpgw']->vfs->mv (array (
! 'from' => $from,
! 'to' => $to
! ))
! )
{
echo $GLOBALS['phpgw']->common->error_list (array
('Could not rename '.$disppath.'/'.$from.' to '.$disppath.'/'.$to));
***************
*** 1412,1416 ****
while (list ($num, $file) = each ($fileman))
{
! if ($GLOBALS['phpgw']->vfs->mv ($file, $todir . '/' . $file,
array (RELATIVE_ALL, RELATIVE_NONE)))
{
$moved++;
--- 1605,1614 ----
while (list ($num, $file) = each ($fileman))
{
! if ($GLOBALS['phpgw']->vfs->mv (array (
! 'from' => $file,
! 'to' => $todir . '/' . $file,
! 'relatives' => array (RELATIVE_ALL,
RELATIVE_NONE)
! ))
! )
{
$moved++;
***************
*** 1441,1445 ****
while (list ($num, $file) = each ($fileman))
{
! if ($GLOBALS['phpgw']->vfs->cp ($file, $todir . '/' . $file,
array (RELATIVE_ALL, RELATIVE_NONE)))
{
$copied++;
--- 1639,1648 ----
while (list ($num, $file) = each ($fileman))
{
! if ($GLOBALS['phpgw']->vfs->cp (array (
! 'from' => $file,
! 'to' => $todir . '/' . $file,
! 'relatives' => array (RELATIVE_ALL,
RELATIVE_NONE)
! ))
! )
{
$copied++;
***************
*** 1472,1476 ****
if ($fileman[$i])
{
! if ($GLOBALS['phpgw']->vfs->delete ($fileman[$i]))
{
html_text_summary ('Deleted
'.$disppath.'/'.$fileman[$i], $fileinfo['size']);
--- 1675,1679 ----
if ($fileman[$i])
{
! if ($GLOBALS['phpgw']->vfs->delete (array ('string' =>
$fileman[$i])))
{
html_text_summary ('Deleted
'.$disppath.'/'.$fileman[$i], $fileinfo['size']);
***************
*** 1505,1509 ****
}
! $ls_array = $GLOBALS['phpgw']->vfs->ls ($path . '/' . $createdir, array
(RELATIVE_NONE), False, False, True);
$fileinfo = $ls_array[0];
--- 1708,1719 ----
}
! $ls_array = $GLOBALS['phpgw']->vfs->ls (array (
! 'string' => $path . '/' . $createdir,
! 'relatives' => array (RELATIVE_NONE),
! 'checksubdirs' => False,
! 'nofiles' => True
! )
! );
!
$fileinfo = $ls_array[0];
***************
*** 1527,1531 ****
else
{
! if ($GLOBALS['phpgw']->vfs->mkdir ($createdir))
{
html_text_summary ('Created directory
'.$disppath.'/'.$createdir);
--- 1737,1741 ----
else
{
! if ($GLOBALS['phpgw']->vfs->mkdir (array ('string' =>
$createdir)))
{
html_text_summary ('Created directory
'.$disppath.'/'.$createdir);
Index: test.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpwebhosting/test.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** test.php 24 Aug 2001 08:05:29 -0000 1.6
--- test.php 16 Jan 2002 06:32:19 -0000 1.7
***************
*** 27,68 ****
# start of getabsolutepath tests
$phpgw->vfs->cd ();
$io = array ("" => "$homedir", "dir" => "$homedir/dir", "dir/file" =>
"$homedir/dir/file", "dir/dir2" => "$homedir/dir/dir2", "dir/dir2/file" =>
"$homedir/dir/dir2/file", "address@hidden&*()-_=+/|[{]};:'\",<.>?" =>
"$homedir/address@hidden&*()-_=+/|[{]};:'\",<.>?");
while (list ($i, $o) = each ($io))
{
! if (($ao = $phpgw->vfs->getabsolutepath ($i)) != $o)
{
! echo "<br>getabsolutepath - $cd - $i - $o - $ao";
}
}
$cd = "test";
! $phpgw->vfs->cd ($cd, False, array (RELATIVE_NONE));
$io = array ("" => "/test", "dir" => "/test/dir", "dir/file" =>
"/test/dir/file", "dir/dir2" => "/test/dir/dir2", "dir/dir2/file" =>
"/test/dir/dir2/file", "address@hidden&*()-_=+/|[{]};:'\",<.>?" =>
"/test/address@hidden&*()-_=+/|[{]};:'\",<.>?");
while (list ($i, $o) = each ($io))
{
! if (($ao = $phpgw->vfs->getabsolutepath ($i)) != $o)
{
! echo "<br>getabsolutepath - $cd - $i - $o - $ao";
}
}
$cd = "test/test2/test3";
! $phpgw->vfs->cd ($cd, False, array (RELATIVE_NONE));
$io = array ("" => "/test/test2/test3", "dir" => "/test/test2/test3/dir",
"dir/file" => "/test/test2/test3/dir/file", "dir/dir2" =>
"/test/test2/test3/dir/dir2", "dir/dir2/file" =>
"/test/test2/test3/dir/dir2/file", "address@hidden&*()-_=+/|[{]};:'\",<.>?" =>
"/test/test2/test3/address@hidden&*()-_=+/|[{]};:'\",<.>?");
while (list ($i, $o) = each ($io))
{
! if (($ao = $phpgw->vfs->getabsolutepath ($i)) != $o)
{
! echo "<br>getabsolutepath - $cd - $i - $o - $ao";
}
}
/* Actually means cd to home directory */
$cd = "";
! $phpgw->vfs->cd ($cd);
$relatives = array (RELATIVE_USER);
$io = array ("" => "$homedir", "dir" => "$homedir/dir", "dir/file" =>
"$homedir/dir/file", "address@hidden&*()-_=+/|[{]};:'\",<.>?" =>
"$homedir/address@hidden&*()-_=+/|[{]};:'\",<.>?");
--- 27,87 ----
# start of getabsolutepath tests
+ $sequence_num = 1;
$phpgw->vfs->cd ();
+ //$phpgw->common->phpgw_footer ();
+ //$phpgw->common->phpgw_exit ();
$io = array ("" => "$homedir", "dir" => "$homedir/dir", "dir/file" =>
"$homedir/dir/file", "dir/dir2" => "$homedir/dir/dir2", "dir/dir2/file" =>
"$homedir/dir/dir2/file", "address@hidden&*()-_=+/|[{]};:'\",<.>?" =>
"$homedir/address@hidden&*()-_=+/|[{]};:'\",<.>?");
while (list ($i, $o) = each ($io))
{
! if (($ao = $phpgw->vfs->getabsolutepath (array ('string' => $i))) != $o)
{
! echo "<br>$sequence_num - getabsolutepath - $cd - $i - $o -
$ao";
}
}
+ $sequence_num = 2;
$cd = "test";
! $phpgw->vfs->cd (array(
! 'string' => $cd,
! 'relative' => False,
! 'relatives' => array (RELATIVE_NONE)
! )
! );
$io = array ("" => "/test", "dir" => "/test/dir", "dir/file" =>
"/test/dir/file", "dir/dir2" => "/test/dir/dir2", "dir/dir2/file" =>
"/test/dir/dir2/file", "address@hidden&*()-_=+/|[{]};:'\",<.>?" =>
"/test/address@hidden&*()-_=+/|[{]};:'\",<.>?");
while (list ($i, $o) = each ($io))
{
! if (($ao = $phpgw->vfs->getabsolutepath (array ('string' => $i))) != $o)
{
! echo "<br>$sequence_num - getabsolutepath - $cd - $i - $o -
$ao";
}
}
+ $sequence_num = 3;
$cd = "test/test2/test3";
! $phpgw->vfs->cd (array(
! 'string' => $cd,
! 'relative' => False,
! 'relatives' => array (RELATIVE_NONE)
! )
! );
$io = array ("" => "/test/test2/test3", "dir" => "/test/test2/test3/dir",
"dir/file" => "/test/test2/test3/dir/file", "dir/dir2" =>
"/test/test2/test3/dir/dir2", "dir/dir2/file" =>
"/test/test2/test3/dir/dir2/file", "address@hidden&*()-_=+/|[{]};:'\",<.>?" =>
"/test/test2/test3/address@hidden&*()-_=+/|[{]};:'\",<.>?");
while (list ($i, $o) = each ($io))
{
! if (($ao = $phpgw->vfs->getabsolutepath (array ('string' => $i))) != $o)
{
! echo "<br>$sequence_num - getabsolutepath - $cd - $i - $o -
$ao";
}
}
/* Actually means cd to home directory */
+ $sequence_num = 4;
$cd = "";
! $phpgw->vfs->cd (array(
! 'string' => $cd,
! )
! );
$relatives = array (RELATIVE_USER);
$io = array ("" => "$homedir", "dir" => "$homedir/dir", "dir/file" =>
"$homedir/dir/file", "address@hidden&*()-_=+/|[{]};:'\",<.>?" =>
"$homedir/address@hidden&*()-_=+/|[{]};:'\",<.>?");
***************
*** 70,82 ****
while (list ($i, $o) = each ($io))
{
! if (($ao = $phpgw->vfs->getabsolutepath ($i, $relatives)) != $o)
{
! echo "<br>getabsolutepath - $cd - $i - $relatives[0] - $o -
$ao";
}
}
/* $cd shouldn't affect this test, but we'll set it anyways */
$cd = "test2/test4";
! $phpgw->vfs->cd ($cd, False, array (RELATIVE_NONE));
$relatives = array (RELATIVE_NONE);
$io = array ("" => "", "dir" => "dir", "dir/file" => "dir/file",
"address@hidden&*()-_=+/|[{]};:'\",<.>?" =>
"address@hidden&*()-_=+/|[{]};:'\",<.>?");
--- 89,108 ----
while (list ($i, $o) = each ($io))
{
! if (($ao = $phpgw->vfs->getabsolutepath (array ('string' => $i, 'mask'
=> $relatives))) != $o)
{
! echo '<br><b>HERE</b>';
! echo "<br>$sequence_num - getabsolutepath - $cd - $i -
$relatives[0] - $o - $ao";
}
}
/* $cd shouldn't affect this test, but we'll set it anyways */
+ $sequence_num = 5;
$cd = "test2/test4";
! $phpgw->vfs->cd (array(
! 'string' => $cd,
! 'relative' => False,
! 'relatives' => array (RELATIVE_NONE),
! )
! );
$relatives = array (RELATIVE_NONE);
$io = array ("" => "", "dir" => "dir", "dir/file" => "dir/file",
"address@hidden&*()-_=+/|[{]};:'\",<.>?" =>
"address@hidden&*()-_=+/|[{]};:'\",<.>?");
***************
*** 84,96 ****
while (list ($i, $o) = each ($io))
{
! if (($ao = $phpgw->vfs->getabsolutepath ($i, $relatives)) != $o)
{
! echo "<br>getabsolutepath - $cd (shouldn't matter) - $i -
$relatives[0] - $o - $ao";
}
}
/* $cd shouldn't affect this test, but we'll set it anyways */
$cd = "test3/test5";
! $phpgw->vfs->cd ($cd, False, array (RELATIVE_NONE));
$relatives = array (RELATIVE_USER_APP);
$io = array ("" => "$homedir/.$currentapp", "dir" =>
"$homedir/.$currentapp/dir", "dir/dir2" => "$homedir/.$currentapp/dir/dir2",
"dir/file" => "$homedir/.$currentapp/dir/file", "dir/dir2/dir3/file" =>
"$homedir/.$currentapp/dir/dir2/dir3/file",
"address@hidden&*()-_=+/|[{]};:'\",<.>?" =>
"$homedir/.$currentapp/address@hidden&*()-_=+/|[{]};:'\",<.>?");
--- 110,128 ----
while (list ($i, $o) = each ($io))
{
! if (($ao = $phpgw->vfs->getabsolutepath (array ('string' => $i, 'mask'
=> $relatives))) != $o)
{
! echo "<br>$sequence_num - getabsolutepath - $cd (shouldn't
matter) - $i - $relatives[0] - $o - $ao";
}
}
/* $cd shouldn't affect this test, but we'll set it anyways */
+ $sequence_num = 6;
$cd = "test3/test5";
! $phpgw->vfs->cd (array(
! 'string' => $cd,
! 'relative' => False,
! 'relatives' => array (RELATIVE_NONE),
! )
! );
$relatives = array (RELATIVE_USER_APP);
$io = array ("" => "$homedir/.$currentapp", "dir" =>
"$homedir/.$currentapp/dir", "dir/dir2" => "$homedir/.$currentapp/dir/dir2",
"dir/file" => "$homedir/.$currentapp/dir/file", "dir/dir2/dir3/file" =>
"$homedir/.$currentapp/dir/dir2/dir3/file",
"address@hidden&*()-_=+/|[{]};:'\",<.>?" =>
"$homedir/.$currentapp/address@hidden&*()-_=+/|[{]};:'\",<.>?");
***************
*** 98,110 ****
while (list ($i, $o) = each ($io))
{
! if (($ao = $phpgw->vfs->getabsolutepath ($i, $relatives)) != $o)
{
! echo "<br>getabsolutepath - $cd (shouldn't matter) - $i -
$relatives[0] - $o - $ao";
}
}
/* $cd shouldn't affect this test, but we'll set it anyways */
$cd = "test4/test6";
! $phpgw->vfs->cd ($cd, False, array (RELATIVE_NONE));
$relatives = array (RELATIVE_ROOT);
$io = array ("" => "", "dir" => "/dir", "/dir/dir2/dir3" => "/dir/dir2/dir3",
"dir/file" => "/dir/file", "dir/dir2/dir3" => "/dir/dir2/dir3",
"address@hidden&*()-_=+/|[{]};:'\",<.>?" =>
"/address@hidden&*()-_=+/|[{]};:'\",<.>?");
--- 130,148 ----
while (list ($i, $o) = each ($io))
{
! if (($ao = $phpgw->vfs->getabsolutepath (array ('string' => $i, 'mask'
=> $relatives))) != $o)
{
! echo "<br>$sequence_num - getabsolutepath - $cd (shouldn't
matter) - $i - $relatives[0] - $o - $ao";
}
}
/* $cd shouldn't affect this test, but we'll set it anyways */
+ $sequence_num = 7;
$cd = "test4/test6";
! $phpgw->vfs->cd (array(
! 'string' => $cd,
! 'relative' => False,
! 'relatives' => array (RELATIVE_NONE)
! )
! );
$relatives = array (RELATIVE_ROOT);
$io = array ("" => "", "dir" => "/dir", "/dir/dir2/dir3" => "/dir/dir2/dir3",
"dir/file" => "/dir/file", "dir/dir2/dir3" => "/dir/dir2/dir3",
"address@hidden&*()-_=+/|[{]};:'\",<.>?" =>
"/address@hidden&*()-_=+/|[{]};:'\",<.>?");
***************
*** 112,124 ****
while (list ($i, $o) = each ($io))
{
! if (($ao = $phpgw->vfs->getabsolutepath ($i, $relatives)) != $o)
{
! echo "<br>getabsolutepath - $cd (shouldn't matter) - $i -
$relatives[0] - $o - $ao";
}
}
/* Now a few to test the VFS_REAL capabilities */
$cd = "";
! $phpgw->vfs->cd ($cd, False, array (RELATIVE_NONE));
$relatives = array (RELATIVE_ROOT|VFS_REAL);
$io = array ("" => "$filesdir", "dir" => "$filesdir$sep" . "dir",
"dir/dir2/dir3" => "$filesdir$sep" . "dir$sep" . "dir2$sep" . "dir3",
"dir/file" => "$filesdir$sep" . "dir$sep" . "file", "dir/dir2/dir3/file" =>
"$filesdir$sep" . "dir$sep" . "dir2$sep" . "dir3$sep" . "file",
"address@hidden&*()-_=+/|[{]};:'\",<.>?" => "$filesdir$sep" .
"address@hidden&*()-_=+$sep" . "|[{]};:'\",<.>?");
--- 150,168 ----
while (list ($i, $o) = each ($io))
{
! if (($ao = $phpgw->vfs->getabsolutepath (array ('string' => $i, 'mask'
=> $relatives))) != $o)
{
! echo "<br>$sequence_num - getabsolutepath - $cd (shouldn't
matter) - $i - $relatives[0] - $o - $ao";
}
}
/* Now a few to test the VFS_REAL capabilities */
+ $sequence_num = 8;
$cd = "";
! $phpgw->vfs->cd (array(
! 'string' => $cd,
! 'relative' => False,
! 'relatives' => array (RELATIVE_NONE)
! )
! );
$relatives = array (RELATIVE_ROOT|VFS_REAL);
$io = array ("" => "$filesdir", "dir" => "$filesdir$sep" . "dir",
"dir/dir2/dir3" => "$filesdir$sep" . "dir$sep" . "dir2$sep" . "dir3",
"dir/file" => "$filesdir$sep" . "dir$sep" . "file", "dir/dir2/dir3/file" =>
"$filesdir$sep" . "dir$sep" . "dir2$sep" . "dir3$sep" . "file",
"address@hidden&*()-_=+/|[{]};:'\",<.>?" => "$filesdir$sep" .
"address@hidden&*()-_=+$sep" . "|[{]};:'\",<.>?");
***************
*** 126,137 ****
while (list ($i, $o) = each ($io))
{
! if (($ao = $phpgw->vfs->getabsolutepath ($i, $relatives, False)) != $o)
{
! echo "<br>getabsolutepath - $cd (shouldn't matter) - $i -
$relatives[0] - $o - $ao";
}
}
$cd = "test5/test7";
! $phpgw->vfs->cd ($cd, False, array (RELATIVE_NONE));
$relatives = array (RELATIVE_USER|VFS_REAL);
$io = array ("" => "$filesdir$realhomedir", "dir" =>
"$filesdir$realhomedir$sep" . "dir", "dir/dir2/dir3" =>
"$filesdir$realhomedir$sep" . "dir$sep" . "dir2$sep" . "dir3", "dir/file" =>
"$filesdir$realhomedir$sep" . "dir$sep" . "file", "dir/dir2/dir3/file" =>
"$filesdir$realhomedir$sep" . "dir$sep" . "dir2$sep" . "dir3$sep" . "file",
"address@hidden&*()-_=+/|[{]};:'\",<.>?" => "$filesdir$realhomedir$sep" .
"address@hidden&*()-_=+$sep" . "|[{]};:'\",<.>?");
--- 170,187 ----
while (list ($i, $o) = each ($io))
{
! if (($ao = $phpgw->vfs->getabsolutepath (array ('string' => $i, 'mask'
=> $relatives, 'fake' =>False))) != $o)
{
! echo "<br>$sequence_num - getabsolutepath - $cd (shouldn't
matter) - $i - $relatives[0] - $o - $ao";
}
}
+ $sequence_num = 9;
$cd = "test5/test7";
! $phpgw->vfs->cd (array(
! 'string' => $cd,
! 'relative' => False,
! 'relatives' => array (RELATIVE_NONE)
! )
! );
$relatives = array (RELATIVE_USER|VFS_REAL);
$io = array ("" => "$filesdir$realhomedir", "dir" =>
"$filesdir$realhomedir$sep" . "dir", "dir/dir2/dir3" =>
"$filesdir$realhomedir$sep" . "dir$sep" . "dir2$sep" . "dir3", "dir/file" =>
"$filesdir$realhomedir$sep" . "dir$sep" . "file", "dir/dir2/dir3/file" =>
"$filesdir$realhomedir$sep" . "dir$sep" . "dir2$sep" . "dir3$sep" . "file",
"address@hidden&*()-_=+/|[{]};:'\",<.>?" => "$filesdir$realhomedir$sep" .
"address@hidden&*()-_=+$sep" . "|[{]};:'\",<.>?");
***************
*** 139,150 ****
while (list ($i, $o) = each ($io))
{
! if (($ao = $phpgw->vfs->getabsolutepath ($i, $relatives, False)) != $o)
{
! echo "<br>getabsolutepath - $cd (shouldn't matter) - $i -
$relatives[0] - $o - $ao";
}
}
$cd = "test6/test8";
! $phpgw->vfs->cd ($cd, False, array (RELATIVE_USER));
/* RELATIVE_CURRENT should be implied */
$relatives = array (VFS_REAL);
--- 189,206 ----
while (list ($i, $o) = each ($io))
{
! if (($ao = $phpgw->vfs->getabsolutepath (array ('string' => $i, 'mask'
=> $relatives, 'fake' => False))) != $o)
{
! echo "<br>$sequence_num - getabsolutepath - $cd (shouldn't
matter) - $i - $relatives[0] - $o - $ao";
}
}
+ $sequence_num = 10;
$cd = "test6/test8";
! $phpgw->vfs->cd (array(
! 'string' => $cd,
! 'relative' => False,
! 'relatives' => array (RELATIVE_USER)
! )
! );
/* RELATIVE_CURRENT should be implied */
$relatives = array (VFS_REAL);
***************
*** 153,164 ****
while (list ($i, $o) = each ($io))
{
! if (($ao = $phpgw->vfs->getabsolutepath ($i, $relatives, False)) != $o)
{
! echo "<br>getabsolutepath - $cd - $i - $relatives[0] - $o -
$ao";
}
}
$cd = "test7/test9";
! $phpgw->vfs->cd ($cd, False, array (RELATIVE_USER));
$relatives = array (RELATIVE_USER_APP|VFS_REAL);
$io = array ("" => "$filesdir$realhomedir$sep.$currentapp", "dir" =>
"$filesdir$realhomedir$sep.$currentapp$sep" . "dir", "dir/dir2/dir3" =>
"$filesdir$realhomedir$sep.$currentapp$sep" . "dir$sep" . "dir2$sep" . "dir3",
"dir/file" => "$filesdir$realhomedir$sep.$currentapp$sep" . "dir$sep" . "file",
"dir/dir2/dir3/file" => "$filesdir$realhomedir$sep.$currentapp$sep" . "dir$sep"
. "dir2$sep" . "dir3$sep" . "file", "address@hidden&*()-_=+/|[{]};:'\",<.>?" =>
"address@hidden&*()-_=+$sep" . "|[{]};:'\",<.>?");
--- 209,226 ----
while (list ($i, $o) = each ($io))
{
! if (($ao = $phpgw->vfs->getabsolutepath (array ('string' => $i, 'mask'
=> $relatives, 'fake' => False))) != $o)
{
! echo "<br>$sequence_num - getabsolutepath - $cd - $i -
$relatives[0] - $o - $ao";
}
}
+ $sequence_num = 11;
$cd = "test7/test9";
! $phpgw->vfs->cd (array(
! 'string' => $cd,
! 'relative' => False,
! 'relatives' => array (RELATIVE_USER)
! )
! );
$relatives = array (RELATIVE_USER_APP|VFS_REAL);
$io = array ("" => "$filesdir$realhomedir$sep.$currentapp", "dir" =>
"$filesdir$realhomedir$sep.$currentapp$sep" . "dir", "dir/dir2/dir3" =>
"$filesdir$realhomedir$sep.$currentapp$sep" . "dir$sep" . "dir2$sep" . "dir3",
"dir/file" => "$filesdir$realhomedir$sep.$currentapp$sep" . "dir$sep" . "file",
"dir/dir2/dir3/file" => "$filesdir$realhomedir$sep.$currentapp$sep" . "dir$sep"
. "dir2$sep" . "dir3$sep" . "file", "address@hidden&*()-_=+/|[{]};:'\",<.>?" =>
"address@hidden&*()-_=+$sep" . "|[{]};:'\",<.>?");
***************
*** 166,172 ****
while (list ($i, $o) = each ($io))
{
! if (($ao = $phpgw->vfs->getabsolutepath ($i, $relatives, False)) != $o)
{
! echo "<br>getabsolutepath - $cd (shouldn't matter) - $i -
$relatives[0] - $o - $ao";
}
}
--- 228,234 ----
while (list ($i, $o) = each ($io))
{
! if (($ao = $phpgw->vfs->getabsolutepath (array ('string' => $i, 'mask'
=> $relatives, 'fake' => False))) != $o)
{
! echo "<br>$sequence_num - getabsolutepath - $cd (shouldn't
matter) - $i - $relatives[0] - $o - $ao";
}
}
***************
*** 183,189 ****
*/
$cd = "test8/test10";
$relatives[0] = RELATIVE_USER;
! $phpgw->vfs->cd ($cd, False, array ($relatives[0]));
$subhome = substr ($homedir, 1);
$io = array ("" => array ("fake_full_path" => "$homedir/$cd",
"fake_leading_dirs" => "$homedir/test8", "fake_extra_path" => "$subhome/test8",
"fake_name" => "test10", "real_full_path" => "$filesdir$homedir/$cd",
"real_leading_dirs" => "$filesdir$homedir/test8", "real_extra_path" =>
"$subhome/test8", "real_name" => "test10"), "dir2/file" => array
("fake_full_path" => "$homedir/$cd/dir2/file", "fake_leading_dirs" =>
"$homedir/$cd/dir2", "fake_extra_path" => "$subhome/$cd/dir2", "fake_name" =>
"file", "real_full_path" => "$filesdir$homedir/$cd/dir2/file",
"real_leading_dirs" => "$filesdir$homedir/$cd/dir2", "real_extra_path" =>
"$subhome/$cd/dir2", "real_name" => "file"),
"address@hidden&*()-_=+/|[{]};:'\",<.>?" => array ("fake_full_path" =>
"$homedir/$cd/address@hidden&*()-_=+/|[{]};:'\",<.>?", "fake_leading_dirs" =>
"$homedir/$cd/address@hidden&*()-_=+", "fake_extra_path" =>
"$subhome/$cd/address@hidden&*()-_=+", "fake_name" => "|[{]};:'\",<.>?",
"real_full_path" =>
"$filesdir$homedir/$cd/address@hidden&*()-_=+/|[{]};:'\",<.>?",
"real_leading_dirs" => "$filesdir$homedir/$cd/address@hidden&*()-_=+",
"real_extra_path" => "$subhome/$cd/address@hidden&*()-_=+", "real_name" =>
"|[{]};:'\",<.>?"));
--- 245,257 ----
*/
+ $sequence_num = 12;
$cd = "test8/test10";
$relatives[0] = RELATIVE_USER;
! $phpgw->vfs->cd (array(
! 'string' => $cd,
! 'relative' => False,
! 'relatives' => array ($relatives[0])
! )
! );
$subhome = substr ($homedir, 1);
$io = array ("" => array ("fake_full_path" => "$homedir/$cd",
"fake_leading_dirs" => "$homedir/test8", "fake_extra_path" => "$subhome/test8",
"fake_name" => "test10", "real_full_path" => "$filesdir$homedir/$cd",
"real_leading_dirs" => "$filesdir$homedir/test8", "real_extra_path" =>
"$subhome/test8", "real_name" => "test10"), "dir2/file" => array
("fake_full_path" => "$homedir/$cd/dir2/file", "fake_leading_dirs" =>
"$homedir/$cd/dir2", "fake_extra_path" => "$subhome/$cd/dir2", "fake_name" =>
"file", "real_full_path" => "$filesdir$homedir/$cd/dir2/file",
"real_leading_dirs" => "$filesdir$homedir/$cd/dir2", "real_extra_path" =>
"$subhome/$cd/dir2", "real_name" => "file"),
"address@hidden&*()-_=+/|[{]};:'\",<.>?" => array ("fake_full_path" =>
"$homedir/$cd/address@hidden&*()-_=+/|[{]};:'\",<.>?", "fake_leading_dirs" =>
"$homedir/$cd/address@hidden&*()-_=+", "fake_extra_path" =>
"$subhome/$cd/address@hidden&*()-_=+", "fake_name" => "|[{]};:'\",<.>?",
"real_full_path" =>
"$filesdir$homedir/$cd/address@hidden&*()-_=+/|[{]};:'\",<.>?",
"real_leading_dirs" => "$filesdir$homedir/$cd/address@hidden&*()-_=+",
"real_extra_path" => "$subhome/$cd/address@hidden&*()-_=+", "real_name" =>
"|[{]};:'\",<.>?"));
***************
*** 191,200 ****
while (list ($i, $o) = each ($io))
{
! $ao = $phpgw->vfs->path_parts ($i);
while (list ($key, $value) = each ($o))
{
if ($ao->$key != $o[$key])
{
! echo "<br>path_parts - $cd - $i - $relatives[0] - $key
- $o[$key] - $ao[$key]";
}
}
--- 259,268 ----
while (list ($i, $o) = each ($io))
{
! $ao = $phpgw->vfs->path_parts (array ('string' => $i));
while (list ($key, $value) = each ($o))
{
if ($ao->$key != $o[$key])
{
! echo "<br>$sequence_num - path_parts - $cd - $i -
$relatives[0] - $key - $o[$key] - $ao[$key]";
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: phpwebhosting index.php,1.30,1.31 test.php,1.6,1.7,
Jason Wies <address@hidden> <=