[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: filemanager/inc class.bofilemanager.inc.php,1.2
From: |
Jonathon Sim <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: filemanager/inc class.bofilemanager.inc.php,1.2,1.3 class.uiaction_edit.inc.php,1.1,1.2class.uifilemanager.inc.php,1.2,1.3 |
Date: |
Mon, 03 Mar 2003 22:03:02 -0500 |
Update of /cvsroot/phpgroupware/filemanager/inc
In directory subversions:/tmp/cvs-serv20131
Modified Files:
class.bofilemanager.inc.php class.uiaction_edit.inc.php
class.uifilemanager.inc.php
Log Message:
Make sure everything gets translated
Index: class.bofilemanager.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/filemanager/inc/class.bofilemanager.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** class.bofilemanager.inc.php 4 Mar 2003 00:04:05 -0000 1.2
--- class.bofilemanager.inc.php 4 Mar 2003 03:03:00 -0000 1.3
***************
*** 421,425 ****
else
{
! $data = ' ';
}
return $data;
--- 421,425 ----
else
{
! $data = '';
}
return $data;
***************
*** 432,436 ****
function f_apply_edit_comment()
{
! $result='';
for ($i=0; $i<count($this->fileman) ; $i++)
{
--- 432,436 ----
function f_apply_edit_comment()
{
! $result=Array();
for ($i=0; $i<count($this->fileman) ; $i++)
{
***************
*** 446,450 ****
))
{
! $result .= lang(' Error: failed to
change comment for :').$file."\n";
}
}
--- 446,450 ----
))
{
! $result[] = lang('error: failed to
change comment for : %1', $file);
}
}
***************
*** 455,464 ****
function f_apply_edit_name()
{
! $result='';
while (list ($from, $to) = each ($this->changes))
{
if ($badchar = $this->bad_chars ($to, True,
True))
{
! $result .= 'File names cannot contain
"'.$badchar.'"';
continue;
}
--- 455,464 ----
function f_apply_edit_name()
{
! $result = Array();
while (list ($from, $to) = each ($this->changes))
{
if ($badchar = $this->bad_chars ($to, True,
True))
{
! $result[] = lang('file names cannot contain
%1', $badchar);
continue;
}
***************
*** 467,471 ****
{
//echo
$GLOBALS['phpgw']->common->error_list (array ("File names cannot contain \\ or
/"));
! $result .= "File names cannot contain \\ or /";
}
elseif (!$this->vfs->mv (array (
--- 467,471 ----
{
//echo
$GLOBALS['phpgw']->common->error_list (array ("File names cannot contain \\ or
/"));
! $result[] = lang('file names cannot contain \\
or /');
}
elseif (!$this->vfs->mv (array (
***************
*** 476,512 ****
{
//echo
$GLOBALS['phpgw']->common->error_list (array ('Could not rename
'.$disppath.'/'.$from.' to '.$disppath.'/'.$to));
! $result .= 'Could not rename
'.$this->path.'/'.$from.' to '.$this->path.'/'.$to;
}
else
{
! $result .= 'Renamed
'.$this->path.'/'.$from.' to '.$this->path.'/'.$to;
}
}
- /*html_break (2);
- html_link_back ();*/
-
-
- /*echo "f_apply_edit_name()";
- print_r($this->fileman);
- echo '<br />';
- print_r($this->changes);
- die();
-
- $result='';
- for ($i=0; $i<count($this->fileman) ; $i++)
- {
- $file = $this->fileman[$i];
-
- if (!$this->vfs->mv (array (
- 'from' => $file,
- 'relatives' => array (RELATIVE_ALL),
- 'to' => $this->changes[$file]
- )
- ))
- {
- $result .= lang(' Error: failed to
rename :').$file."\n";
- }
- }
- */
return $result;
}
--- 476,486 ----
{
//echo
$GLOBALS['phpgw']->common->error_list (array ('Could not rename
'.$disppath.'/'.$from.' to '.$disppath.'/'.$to));
! $result[] = lang('could not rename %1 to %2',
$this->path.'/'.$from, $this->path.'/'.$to);
}
else
{
! $result[] = lang('renamed %1 to %2',
$this->path.'/'.$this->path.'/'.$from, $to);
}
}
return $result;
}
***************
*** 514,517 ****
--- 488,492 ----
function f_delete()
{
+ $result = Array();
$numoffiles = count($this->fileman);
for($i=0;$i!=$numoffiles;$i++)
***************
*** 541,562 ****
)))
{
! $errors[] = '<font
color="#0000FF">'.$mime_type.' Deleted:
'.$this->path.SEP.$this->fileman[$i].'</font>';
}
else
{
! $errors[] = '<font
color="#FF0000">Could not delete '.$this->path.SEP.$this->fileman[$i].'</font>';
}
}
else
{
! $errors[] = '<font
color="#FF0000">'.$this->path.SEP.$this->fileman[$i].' does not exist!</font>';
}
}
}
! return $errors;
}
function f_copy()
{
$numoffiles = count($this->fileman);
for($i=0;$i!=$numoffiles;$i++)
--- 516,538 ----
)))
{
! $result[] =
lang('deleted: %1', $this->path.SEP.$this->fileman[$i]);
}
else
{
! $result[] = lang('could
not delete: %1',$this->path.SEP.$this->fileman[$i]);
}
}
else
{
! $result[] = lang('%1 does not
exist!', $this->path.SEP.$this->fileman[$i]);
}
}
}
! return $result;
}
function f_copy()
{
+ $result = Array();
$numoffiles = count($this->fileman);
for($i=0;$i!=$numoffiles;$i++)
***************
*** 570,586 ****
)))
{
! $errors[] = '<font
color="#0000FF">File copied: '.$this->path.SEP.$this->fileman[$i].' to
'.$this->todir.SEP.$this->fileman[$i].'</font>';
}
else
{
! $errors[] = '<font
color="#FF0000">Could not copy '.$this->path.SEP.$this->fileman[$i].' to
'.$this->todir.SEP.$this->fileman[$i].'</font>';
}
}
}
! return $errors;
}
function f_move()
{
$numoffiles = count($this->fileman);
for($i=0;$i!=$numoffiles;$i++)
--- 546,563 ----
)))
{
! $result[] = lang('file copied:
%1 to
%2'.$this->path.SEP.$this->fileman[$i],$this->todir.SEP.$this->fileman[$i]);
}
else
{
! $result[] = lang('could not
copy %1 to %2',
$this->path.SEP.$this->fileman[$i],$this->todir.SEP.$this->fileman[$i]);
}
}
}
! return $result;
}
function f_move()
{
+ $result = Array();
$numoffiles = count($this->fileman);
for($i=0;$i!=$numoffiles;$i++)
***************
*** 594,610 ****
)))
{
! $errors[] = '<font
color="#0000FF">File moved: '.$this->path.SEP.$this->fileman[$i].' to
'.$this->todir.SEP.$this->fileman[$i].'</font>';
}
else
{
! $errors[] = '<font
color="#FF0000">Could not move '.$this->path.SEP.$this->fileman[$i].' to
'.$this->todir.SEP.$this->fileman[$i].'</font>';
}
}
}
! return $errors;
}
function f_download()
{
$numoffiles = count($this->fileman);
for($i=0;$i!=$numoffiles;$i++)
--- 571,588 ----
)))
{
! $result[] = lang('file moved:
%1 to %2',$this->path.SEP.$this->fileman[$i],
$this->todir.SEP.$this->fileman[$i]);
}
else
{
! $result[] = lang('could not
move: %1 to %2',$this->path.SEP.$this->fileman[$i],
$this->todir.SEP.$this->fileman[$i]);
}
}
}
! return $result;
}
function f_download()
{
+ $result = Array();
$numoffiles = count($this->fileman);
for($i=0;$i!=$numoffiles;$i++)
***************
*** 621,648 ****
)
);
! $errors[] = '<font color="#0000FF">File
downloaded: '.$this->path.SEP.$this->fileman[$i].'</font>';
}
else
{
! $errors[] = '<font color="#FF0000">File
does not exist: '.$this->path.SEP.$this->fileman[$i].'</font>';
}
}
! return $errors;
}
function f_newdir()
{
if ($this->newdir && $this->createdir)
{
if ($badchar =
$this->bad_chars($this->createdir,True,True))
{
! $errors[] = '<font
color="#FF0000">Directory names cannot contain "'.$badchar.'"</font>';
! return $errors;
}
if
(substr($this->createdir,strlen($this->createdir)-1,1) == ' ' ||
substr($this->createdir,0,1) == ' ')
{
! $errors[] = '<font
color="#FF0000">Cannot create directory because it begins or ends in a
space</font>';
! return $errors;
}
--- 599,627 ----
)
);
! $result[] = lang('file downloaded: %1',
$this->path.SEP.$this->fileman[$i]);
}
else
{
! $result[] = lang('file does not exist:
%1', $this->path.SEP.$this->fileman[$i]);
}
}
! return $result;
}
function f_newdir()
{
+ $result = Array();
if ($this->newdir && $this->createdir)
{
if ($badchar =
$this->bad_chars($this->createdir,True,True))
{
! $result[] = lang('directory names
cannot contain "%1"', $badchar);
! return $result;
}
if
(substr($this->createdir,strlen($this->createdir)-1,1) == ' ' ||
substr($this->createdir,0,1) == ' ')
{
! $result[] = lang('cannot create
directory because it begins or ends in a space');
! return $result;
}
***************
*** 659,667 ****
if ($fileinfo['mime_type'] !=
'Directory')
{
! $errors[] = '<font
color="#FF0000">'.$fileinfo['name'].' already exists as a file</font>';
}
else
{
! $errors[] = '<font
color="#FF0000">Directory '.$fileinfo['name'].' already exists.</font>';
}
}
--- 638,646 ----
if ($fileinfo['mime_type'] !=
'Directory')
{
! $result[] = lang('%1 already
exists as a file', $fileinfo['name']);
}
else
{
! $result[] = lang('directory %1
already exists', $fileinfo['name']);
}
}
***************
*** 673,696 ****
)))
{
! $errors[] = '<font
color="#0000FF">Created directory '.$this->path.SEP.$this->createdir.'</font>';
! // $this->path =
$this->path.SEP.$this->createdir;
}
else
{
! $errors[] = '<font
color="#FF0000">Could not create '.$this->path.SEP.$this->createdir.'</font>';
}
}
}
! return $errors;
}
function f_newfile()
{
if ($this->newfile && $this->createfile)
{
if($badchar =
$this->bad_chars($this->createfile,True,True))
{
! $errors[] = '<font
color="#FF0000">Filenames cannot contain "'.$badchar.'"</font>';
! return $errors;
}
if($this->vfs->file_exists(array(
--- 652,676 ----
)))
{
! $result[] = lang('created
directory %1', $this->path.SEP.$this->createdir);
! $this->path =
$this->path.SEP.$this->createdir;
}
else
{
! $result[] = lang('could not
create ', $this->path.SEP.$this->createdir);
}
}
}
! return $result;
}
function f_newfile()
{
+ $result = Array();
if ($this->newfile && $this->createfile)
{
if($badchar =
$this->bad_chars($this->createfile,True,True))
{
! $result[] = lang('filenames cannot
contain "%1"', $badchar);
! return $result;
}
if($this->vfs->file_exists(array(
***************
*** 699,704 ****
)))
{
! $errors[] = '<font color="#FF0000">File
'.$this->path.SEP.$this->createfile.' already exists. Please edit it or delete
it first.</font>';
! return $errors;
}
if(!$this->vfs->touch(array(
--- 679,684 ----
)))
{
! $result[] = lang('file %1 already
exists. Please edit it or delete it first', $this->path.SEP.$this->createfile);
! return $result;
}
if(!$this->vfs->touch(array(
***************
*** 707,734 ****
)))
{
! $errors[] = '<font color="#FF0000">File
'.$this->path.SEP.$this->createfile.' could not be created.</font>';
}
}
else
{
! $errors[] = '<font color="#FF0000">Filename not
provided!</font>';
}
! return $errors;
}
function f_upload()
{
! /* echo 'sub:'.$this->show_upload_boxes .' uf: ';
!
! print_r($this->upload_file);
! echo ' cf: '; print_r($this->upload_comment);
! echo ' files: '; print_r($HTTP_POST_FILES);
! die();*/
! //echo (($show_upload_boxes > 1) ? $head_pre.$msg_top :
$head_top);
for ($i = 0; $i != $this->show_upload_boxes; $i++)
{
if ($badchar = $this->bad_chars
($this->upload_file['name'][$i], True, True))
{
! array_push($err_msgs,$this->html_encode
('Filenames cannot contain "'.$badchar.'"', 1));
//echo $GLOBALS['phpgw']->common->error_list (array
(html_encode ('Filenames cannot contain "'.$badchar.'"', 1)));
continue;
--- 687,708 ----
)))
{
! $result[] = lang('file %1 could not be
created', $this->path.SEP.$this->createfile);
}
}
else
{
! $result[] = lang('filename not provided!');
}
! return $result;
}
function f_upload()
{
! $result = Array();
for ($i = 0; $i != $this->show_upload_boxes; $i++)
{
if ($badchar = $this->bad_chars
($this->upload_file['name'][$i], True, True))
{
! $result[] = lang('filenames cannot
contain %1',$badchar);
//echo $GLOBALS['phpgw']->common->error_list (array
(html_encode ('Filenames cannot contain "'.$badchar.'"', 1)));
continue;
***************
*** 753,758 ****
if ($fileinfo['mime_type'] ==
'Directory')
{
! array_push($err_msgs,'Cannot
replace '.$fileinfo['name'].' because it is a directory');
! //echo $GLOBALS['phpgw']->common->error_list (array
('Cannot replace '.$fileinfo['name'].' because it is a directory'));
continue;
}
--- 727,731 ----
if ($fileinfo['mime_type'] ==
'Directory')
{
! $result[] = lang('cannot
replace %1 because it is a directory', $fileinfo['name']);
continue;
}
***************
*** 764,821 ****
{
if (
! $this->vfs->cp (array (
! 'from' =>
$this->upload_file['tmp_name'][$i],
! 'to' =>
$this->upload_file['name'][$i],
! 'relatives' => array
(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL)
! )
! )
! ) {
! $this->vfs->set_attributes (array (
! 'string' =>
$this->upload_file['name'][$i],
! 'relatives' => array (RELATIVE_ALL),
! 'attributes' => array (
! 'owner_id' =>
$GLOBALS['userinfo']['username'],
! 'modifiedby_id' =>
$GLOBALS['userinfo']['username'],
! 'modified' => $now,
! 'size' =>
$this->upload_file['size'][$i],
! 'mime_type' =>
$this->upload_file['type'][$i],
! 'deleteable' => 'Y',
! 'comment' => stripslashes
($upload_comment[$i])
! )
! )
! );
!
! } else {
! array_push($err_msgs,'Failed to upload file:
'.$this->upload_file['name'][$i]);
! continue;
! }
!
! $result .=' Replaced
'.$disppath.'/'.$this->upload_file['name'][$i].'
'.$this->upload_file['size'][$i];
}
else
{
if (
! $this->vfs->cp (array (
! 'from' =>
$this->upload_file['tmp_name'][$i],
! 'to' =>
$this->upload_file['name'][$i],
! 'relatives' => array
(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL)
! )
! )
! ) {
!
! $this->vfs->set_attributes (array (
! 'string' =>
$this->upload_file['name'][$i],
! 'relatives' => array (RELATIVE_ALL),
! 'attributes' => array (
! 'mime_type' =>
$this->upload_file_['type'][$i],
! 'comment' => stripslashes
($this->upload_comment[$i])
! )
! )
! );
! } else {
! array_push($err_msgs,'Failed to upload file:
'.$this->upload_file['name'][$i]);
! continue;
! }
! $result .= 'Created
'.$this->path.'/'.$this->upload_file['name'][$i] .' '.
$this->upload_file['size'][$i];
}
}
--- 737,794 ----
{
if (
! $this->vfs->cp
(array (
! 'from'
=> $this->upload_file['tmp_name'][$i],
! 'to'
=> $this->upload_file['name'][$i],
!
'relatives' => array (RELATIVE_NONE|VFS_REAL, RELATIVE_ALL)
! )
! )
! ) {
!
$this->vfs->set_attributes (array (
!
'string' => $this->upload_file['name'][$i],
!
'relatives' => array (RELATIVE_ALL),
!
'attributes' => array (
!
'owner_id' => $GLOBALS['userinfo']['username'],
!
'modifiedby_id' => $GLOBALS['userinfo']['username'],
!
'modified' => $now,
!
'size' => $this->upload_file['size'][$i],
!
'mime_type' => $this->upload_file['type'][$i],
!
'deleteable' => 'Y',
!
'comment' => stripslashes ($upload_comment[$i])
!
)
! )
! );
!
! } else {
! $result[] = lang(
'failed to upload file: %1',$this->upload_file['name'][$i]);
! continue;
! }
!
! $result[] = lang('replaced %1
(%2
bytes)',$this->path.'/'.$this->upload_file['name'][$i],$this->upload_file['size'][$i]);
}
else
{
if (
! $this->vfs->cp (array (
! 'from'
=> $this->upload_file['tmp_name'][$i],
! 'to'
=> $this->upload_file['name'][$i],
!
'relatives' => array (RELATIVE_NONE|VFS_REAL, RELATIVE_ALL)
! )
! )
! ) {
!
!
$this->vfs->set_attributes (array (
!
'string' => $this->upload_file['name'][$i],
!
'relatives' => array (RELATIVE_ALL),
!
'attributes' => array (
!
'mime_type' => $this->upload_file['type'][$i],
!
'comment' => stripslashes ($this->upload_comment[$i])
!
)
! )
! );
! } else {
! $result[] =
lang('failed to upload file: %1',$this->upload_file['name'][$i]);
! continue;
! }
! $result[] = lang('created %1
(%2 bytes)',$this->path.'/'.$this->upload_file['name'][$i] ,
$this->upload_file['size'][$i]);
}
}
***************
*** 827,831 ****
)
);
!
$this->vfs->set_attributes (array (
'string' =>
$this->upload_file['name'][$i],
--- 800,804 ----
)
);
!
$this->vfs->set_attributes (array (
'string' =>
$this->upload_file['name'][$i],
***************
*** 837,855 ****
)
);
!
! $result .= 'Created
'.$this->path.'/'.$this->upload_file['name'][$i].' '. $this->file_size[$i];
}
}
-
- //output any error messages
- // $backlink = ($show_upload_boxes > 1) ? '<a
href="javascript:window.close();">Back to file manager</a>' : html_link_back(1);
- $refreshjs = '
- <script language="javascript">
- window.opener.processIt(\'update\');
- </script>';
-
- // if (sizeof($err_msgs)) echo
$GLOBALS['phpgw']->common->error_list ($err_msgs,'Error',$backlink);
! return $result.$err_msgs;
}
--- 810,819 ----
)
);
!
! $result .= ' Created
'.$this->path.'/'.$this->upload_file['name'][$i].' '. $this->file_size[$i];
}
}
! return $result;
}
***************
*** 1021,1028 ****
}
! function translate ($text)
{
return($GLOBALS['phpgw']->lang($text));
! }
}
?>
--- 985,992 ----
}
! /* function translate ($text)
{
return($GLOBALS['phpgw']->lang($text));
! }*/
}
?>
Index: class.uiaction_edit.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/filemanager/inc/class.uiaction_edit.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.uiaction_edit.inc.php 4 Mar 2003 00:04:06 -0000 1.1
--- class.uiaction_edit.inc.php 4 Mar 2003 03:03:00 -0000 1.2
***************
*** 22,26 ****
'img_up' => array('widget' =>
array('type' => 'img',
'src' => $GLOBALS['phpgw']->common->image($this->bo->appname,'up'),
!
'alt' => lang('Up'),
'link' => $GLOBALS['phpgw']->link('/index.php',Array(
'menuaction' =>
$this->bo->appname.'.ui'.$this->bo->appname.'.index',
--- 22,26 ----
'img_up' => array('widget' =>
array('type' => 'img',
'src' => $GLOBALS['phpgw']->common->image($this->bo->appname,'up'),
!
'alt' => lang('up'),
'link' => $GLOBALS['phpgw']->link('/index.php',Array(
'menuaction' =>
$this->bo->appname.'.ui'.$this->bo->appname.'.index',
***************
*** 31,35 ****
'img_home' => array('widget' =>
array('type' => 'img',
'src' =>
$GLOBALS['phpgw']->common->image($this->bo->appname,'folder_home'),
!
'alt' => lang('Folder'),
'link' => $GLOBALS['phpgw']->link('/index.php',Array(
'menuaction' =>
$this->bo->appname.'.ui'.$this->bo->appname.'.index',
--- 31,35 ----
'img_home' => array('widget' =>
array('type' => 'img',
'src' =>
$GLOBALS['phpgw']->common->image($this->bo->appname,'folder_home'),
!
'alt' => lang('folder'),
'link' => $GLOBALS['phpgw']->link('/index.php',Array(
'menuaction' =>
$this->bo->appname.'.ui'.$this->bo->appname.'.index',
***************
*** 41,45 ****
'img_dir' => array('widget' =>
array('type' => 'img',
'src' =>
$GLOBALS['phpgw']->common->image($this->bo->appname,'folder_large'),
!
'alt' => lang('Folder')
)),
);
--- 41,45 ----
'img_dir' => array('widget' =>
array('type' => 'img',
'src' =>
$GLOBALS['phpgw']->common->image($this->bo->appname,'folder_large'),
!
'alt' => lang('folder')
)),
);
***************
*** 61,72 ****
$this->bo = &$parent->bo;
if (UIEDIT_DEBUG) echo ' action::edit ';
- // $this->load_header();
$edit_file = get_var('file', array('GET', 'POST'));
if (!strlen($edit_file))
{
$edit_file = $this->bo->fileman[0];
! }
!
!
/* $this->bo->vfs->cd(array(
'string' => $this->bo->path,
--- 61,69 ----
$this->bo = &$parent->bo;
if (UIEDIT_DEBUG) echo ' action::edit ';
$edit_file = get_var('file', array('GET', 'POST'));
if (!strlen($edit_file))
{
$edit_file = $this->bo->fileman[0];
! }
/* $this->bo->vfs->cd(array(
'string' => $this->bo->path,
***************
*** 82,88 ****
$vars['action1'][] = array('widget' => array('type' =>
'submit',
'name' =>
"uiaction_edit_preview",
! 'value'=>lang('Preview')
));
- //$this->action_link('edit_preview');
$vars['action2'][] = array('widget' => array('type' =>
'img',
'src' =>
$GLOBALS['phpgw']->common->image($this->bo->appname,'filesave'),
--- 79,84 ----
$vars['action1'][] = array('widget' => array('type' =>
'submit',
'name' =>
"uiaction_edit_preview",
! 'value'=>lang('preview')
));
$vars['action2'][] = array('widget' => array('type' =>
'img',
'src' =>
$GLOBALS['phpgw']->common->image($this->bo->appname,'filesave'),
***************
*** 90,94 ****
$vars['action2'][] = array('widget' => array('type' =>
'submit',
'name' => 'uiaction_edit_save',
! 'value'=>lang('Save')
));
$vars['action3'][] = array('widget' => array('type' =>
'img',
--- 86,90 ----
$vars['action2'][] = array('widget' => array('type' =>
'submit',
'name' => 'uiaction_edit_save',
! 'value'=>lang('save')
));
$vars['action3'][] = array('widget' => array('type' =>
'img',
***************
*** 98,102 ****
$vars['action3'][] = array('widget' => array('type' =>
'submit',
'name' => 'uiaction_edit_cancel',
! 'value'=>lang('Close')
));
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',
array('nav_data' => $vars));
--- 94,98 ----
$vars['action3'][] = array('widget' => array('type' =>
'submit',
'name' => 'uiaction_edit_cancel',
! 'value'=>lang('close')
));
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',
array('nav_data' => $vars));
***************
*** 106,109 ****
--- 102,109 ----
{
$content = get_var('edit_file_content',
array('GET', 'POST'));
+ if (get_magic_quotes_gpc()) //a thousand curses!
+ {
+ $content = stripslashes($content);
+ }
}
else
Index: class.uifilemanager.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/filemanager/inc/class.uifilemanager.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** class.uifilemanager.inc.php 4 Mar 2003 00:04:06 -0000 1.2
--- class.uifilemanager.inc.php 4 Mar 2003 03:03:00 -0000 1.3
***************
*** 38,69 ****
var $help_info;
var $mime_ico = array (
! 'application/pdf' => 'pdf',
! 'application/postscript' => 'postscript',
! 'application/msword' => 'word',
! 'application/vnd.ms-excel' => 'excel',
! 'application/vnd.ms-powerpoint' => 'ppt',
! 'application/x-gzip' => 'tgz',
! 'application/x-bzip' => 'tgz',
! 'application/zip' => 'tgz',
! 'application/x-debian-package' => 'deb',
! 'application/x-rpm' => 'rpm',
! 'application' => 'document',
! 'application/octet-stream' => 'unknown',
! 'audio' => 'sound',
! 'audio/mpeg' => 'sound',
! 'Directory' => 'folder',
! 'exe' => 'exe',
! 'image' => 'image',
! 'text' => 'txt',
! 'text/html' => 'html',
! 'text/plain' => 'txt',
! 'text/xml' => 'html',
! 'text/x-vcalendar' => 'vcalendar',
! 'text/calendar' => 'vcalendar',
! 'text/x-vcard' => 'vcard',
! 'text/x-tex' => 'tex',
! 'unknown' => 'unknown',
! 'video' => 'video',
! 'message' => 'message'
);
--- 38,69 ----
var $help_info;
var $mime_ico = array (
! 'application/pdf' => 'pdf',
! 'application/postscript' => 'postscript',
! 'application/msword' => 'word',
! 'application/vnd.ms-excel' => 'excel',
! 'application/vnd.ms-powerpoint' => 'ppt',
! 'application/x-gzip' => 'tgz',
! 'application/x-bzip' => 'tgz',
! 'application/zip' => 'tgz',
! 'application/x-debian-package' => 'deb',
! 'application/x-rpm' => 'rpm',
! 'application' => 'document',
! 'application/octet-stream' => 'unknown',
! 'audio' => 'sound',
! 'audio/mpeg' => 'sound',
! 'Directory' => 'folder',
! 'exe' => 'exe',
! 'image' => 'image',
! 'text' => 'txt',
! 'text/html' => 'html',
! 'text/plain' => 'txt',
! 'text/xml' => 'html',
! 'text/x-vcalendar' => 'vcalendar',
! 'text/calendar' => 'vcalendar',
! 'text/x-vcard' => 'vcard',
! 'text/x-tex' => 'tex',
! 'unknown' => 'unknown',
! 'video' => 'video',
! 'message' => 'message'
);
***************
*** 100,104 ****
'operation' => PHPGW_ACL_READ)))
{
! $this->no_access_exists(lang('You do not have
access to %1',$this->bo->path));
}
$this->bo->userinfo['working_id'] =
$this->bo->vfs->working_id;
--- 100,104 ----
'operation' => PHPGW_ACL_READ)))
{
! $this->no_access_exists(lang('you do not have
access to %1',$this->bo->path));
}
$this->bo->userinfo['working_id'] =
$this->bo->vfs->working_id;
***************
*** 112,115 ****
--- 112,116 ----
}
+ /**TODO: xslt-ise this (and get rid of the hard-coded html)*/
function no_access_exists($error_msg)
{
***************
*** 168,172 ****
)))
{
! echo lang('failed to create directory')
. ' <b>'. $this->bo->homedir . '</b><br><br>';
}
$this->bo->vfs->override_acl = 0;
--- 169,173 ----
)))
{
! echo lang('failed to create directory')
. ' :'. $this->bo->homedir . "\n";
}
$this->bo->vfs->override_acl = 0;
***************
*** 230,234 ****
)))
{
! $this->no_access_exists(lang('Directory %1 does
not exist',$this->bo->path));
}
}
--- 231,235 ----
)))
{
! $this->no_access_exists(lang('directory %1 does
not exist',$this->bo->path));
}
}
***************
*** 269,286 ****
}
$actions = Array(
! 'rename' => lang('Rename'),
! 'delete' => lang('Delete'),
! 'go' => lang('Go To'),
! 'copy' => lang('Copy To'),
! 'move' => lang('Move To'),
! 'download' => lang('Download'),
! 'newdir' => lang('Create Folder'),
! 'newfile' => lang('Create File'),
! 'edit' => lang('Edit'),
! 'edit_comments' => lang('Edit
Comments'),
'apply_edit_comment' => '1',
'apply_edit_name' => '1',
! 'cancel' => lang('Cancel'),
! 'upload' => lang('Upload Files')
);
--- 270,287 ----
}
$actions = Array(
! 'rename' => lang('rename'),
! 'delete' => lang('delete'),
! 'go' => lang('go to'),
! 'copy' => lang('copy to'),
! 'move' => lang('move to'),
! 'download' => lang('download'),
! 'newdir' => lang('create folder'),
! 'newfile' => lang('create file'),
! 'edit' => lang('edit'),
! 'edit_comments' => lang('edit
comments'),
'apply_edit_comment' => '1',
'apply_edit_name' => '1',
! 'cancel' => lang('cancel'),
! 'upload' => lang('upload files')
);
***************
*** 301,307 ****
'download'
);
! if (trim(strtolower($this->bo->cancel)) ==
strtolower(lang('Cancel'))) {
$this->cancel();
! exit();
}
//If the action is a "uiaction" (ie it has its own
seperate interface), this will run it
--- 302,308 ----
'download'
);
! if (trim(strtolower($this->bo->cancel)) ==
strtolower(lang('cancel'))) {
$this->cancel();
! exit();
}
//If the action is a "uiaction" (ie it has its own
seperate interface), this will run it
***************
*** 324,328 ****
echo " bofunction $function ";
$f_function = 'f_'.$function;
! $errors =
$this->bo->$f_function();
$var = Array(
'menuaction' =>
$this->bo->appname.'.ui'.$this->bo->appname.'.index',
--- 325,329 ----
echo " bofunction $function ";
$f_function = 'f_'.$function;
! $errors = implode("\n",
$this->bo->$f_function());
$var = Array(
'menuaction' =>
$this->bo->appname.'.ui'.$this->bo->appname.'.index',
***************
*** 350,357 ****
'menuaction' =>
$this->bo->appname.'.ui'.$this->bo->appname.'.index',
'path' =>
urlencode($this->bo->path),
! 'errors' =>
lang('Unknown Action!')
)));
}
function help()
{
--- 351,359 ----
'menuaction' =>
$this->bo->appname.'.ui'.$this->bo->appname.'.index',
'path' =>
urlencode($this->bo->path),
! 'errors' =>
lang('unknown action!')
)));
}
+ /**TODO : xslt-ise this */
function help()
{
***************
*** 374,378 ****
exit();
}
!
function build_help($help_option,$text='')
{
--- 376,380 ----
exit();
}
! /**TODO : xslt-ise this */
function build_help($help_option,$text='')
{
***************
*** 452,471 ****
$button['type'] = 'submit';
$button['name'] = 'uiaction_edit';
! $button['value'] = lang('Edit');
$button['caption'] = $this->build_help('edit');
$var[] = array('widget' => $button);
$button['name'] = "rename";
! $button['value'] =lang('Rename');
$button['caption'] = $this->build_help('rename');
$var[] = array('widget' => $button);
$button['name'] = "delete";
! $button['value'] =lang('Delete');
$button['caption'] = $this->build_help('delete');
$var[] = array('widget' => $button);
$button['name'] = "edit_comments";
! $button['value'] =lang('Edit Comments');
$button['caption'] = $this->build_help('edit_comments');
$var[] = array('widget' => $button);
--- 454,473 ----
$button['type'] = 'submit';
$button['name'] = 'uiaction_edit';
! $button['value'] = lang('edit');
$button['caption'] = $this->build_help('edit');
$var[] = array('widget' => $button);
$button['name'] = "rename";
! $button['value'] =lang('rename');
$button['caption'] = $this->build_help('rename');
$var[] = array('widget' => $button);
$button['name'] = "delete";
! $button['value'] =lang('delete');
$button['caption'] = $this->build_help('delete');
$var[] = array('widget' => $button);
$button['name'] = "edit_comments";
! $button['value'] =lang('edit comments');
$button['caption'] = $this->build_help('edit_comments');
$var[] = array('widget' => $button);
***************
*** 474,488 ****
$button['name'] = "go";
! $button['value'] = lang('Go To');
$button['caption'] = $this->build_help('go_to');
$var[] = array('widget' => $button);
$button['name'] = "copy";
! $button['value'] = lang('Copy To');
$button['caption'] = $this->build_help('copy_to');
$var[] = array('widget' => $button);
$button['name'] = "move";
! $button['value'] = lang('Move To');
$button['caption'] =$this->build_help('move_to');
$var[] = array('widget' => $button);
--- 476,490 ----
$button['name'] = "go";
! $button['value'] = lang('go to');
$button['caption'] = $this->build_help('go_to');
$var[] = array('widget' => $button);
$button['name'] = "copy";
! $button['value'] = lang('copy to');
$button['caption'] = $this->build_help('copy_to');
$var[] = array('widget' => $button);
$button['name'] = "move";
! $button['value'] = lang('move to');
$button['caption'] =$this->build_help('move_to');
$var[] = array('widget' => $button);
***************
*** 590,594 ****
$var[] = array('widget' =>
array('type'=>'submit',
'name'=> 'download',
!
'value' => lang('Download'),
'caption' => $this->build_help('download')
));
--- 592,596 ----
$var[] = array('widget' =>
array('type'=>'submit',
'name'=> 'download',
!
'value' => lang('download'),
'caption' => $this->build_help('download')
));
***************
*** 601,605 ****
$var[] = array('widget' => array('type' =>
'submit',
'name' => 'newdir',
!
'value' => lang('Create Folder'),
'caption' => $this->build_help('create_folder')
));
--- 603,607 ----
$var[] = array('widget' => array('type' =>
'submit',
'name' => 'newdir',
!
'value' => lang('create folder'),
'caption' => $this->build_help('create_folder')
));
***************
*** 608,612 ****
/* $var[] = array('widget' => array('type' => 'submit',
'name' => 'update',
!
'value' => lang('Update'),
'caption' => $this->build_help('update')
));
--- 610,614 ----
/* $var[] = array('widget' => array('type' => 'submit',
'name' => 'update',
!
'value' => lang('update'),
'caption' => $this->build_help('update')
));
***************
*** 621,625 ****
$var[] = array('widget' => array('type' =>
'submit',
'name' => 'newfile',
!
'value' => lang('Create File'),
'caption' => $this->build_help('create_file')
));
--- 623,627 ----
$var[] = array('widget' => array('type' =>
'submit',
'name' => 'newfile',
!
'value' => lang('create file'),
'caption' => $this->build_help('create_file')
));
***************
*** 637,641 ****
$var[] = array('widget' => array( 'type' =>
'submit',
'name' => 'execute',
!
'value' => lang('Execute'),
'caption' => $this->build_help('execute')
));
--- 639,643 ----
$var[] = array('widget' => array( 'type' =>
'submit',
'name' => 'execute',
!
'value' => lang('execute'),
'caption' => $this->build_help('execute')
));
***************
*** 652,656 ****
$var['td_extras'] = ' align="right"';
! $var['column_header'] = '<b>'.lang('Used
Space').'</b>:';
$p->set_var($var);
$p->parse('col_headers','column_headers_normal',True);
--- 654,658 ----
$var['td_extras'] = ' align="right"';
! $var['column_header'] = '<b>'.lang('used
space').'</b>:';
$p->set_var($var);
$p->parse('col_headers','column_headers_normal',True);
***************
*** 664,668 ****
{
$var['td_extras'] = ' align="right"';
! $var['column_header'] = '<b>'.lang('Unused
space').'</b>:';
$p->set_var($var);
$p->parse('col_headers','column_headers_normal',True);
--- 666,670 ----
{
$var['td_extras'] = ' align="right"';
! $var['column_header'] = '<b>'.lang('unused
space').'</b>:';
$p->set_var($var);
$p->parse('col_headers','column_headers_normal',True);
***************
*** 680,684 ****
{
$var['td_extras'] = '
colspan="'.($info_columns / 2).'" align="right" width="50%"';
! $var['column_header'] = '<b>'.lang('Total
Files').'</b>:';
$p->set_var($var);
$p->parse('col_headers','column_headers_normal',False);
--- 682,686 ----
{
$var['td_extras'] = '
colspan="'.($info_columns / 2).'" align="right" width="50%"';
! $var['column_header'] = '<b>'.lang('total
files').'</b>:';
$p->set_var($var);
$p->parse('col_headers','column_headers_normal',False);
***************
*** 702,711 ****
$var_head[] = array('widget' => array('type' => 'label',
! 'caption' =>
lang('File').$this->build_help('upload_file')
));
$var_head[] = array('widget' => array('type' => 'label',
! 'caption' =>
lang('Comment').$this->build_help('upload_comment')
));
$table_head [] =array('table_col' => $var_head);
--- 704,713 ----
$var_head[] = array('widget' => array('type' => 'label',
! 'caption' =>
lang('file').$this->build_help('upload_file')
));
$var_head[] = array('widget' => array('type' => 'label',
! 'caption' =>
lang('comment').$this->build_help('upload_comment')
));
$table_head [] =array('table_col' => $var_head);
***************
*** 731,735 ****
$var[] = array('widget' => array('type' =>'submit',
'name' => 'upload',
!
'value' => lang('Upload Files'),
'caption' => $this->build_help('upload_files')
));
--- 733,737 ----
$var[] = array('widget' => array('type' =>'submit',
'name' => 'upload',
!
'value' => lang('upload Files'),
'caption' => $this->build_help('upload_files')
));
***************
*** 782,794 ****
$file = $files_array[$i];
$usage += $file['size'];
! if (!count($edit) )
! {
! $file_attributes['checkbox'] = '';
! $file_output[$i]['checkbox']
=array('widget' => array( 'type' => 'checkbox',
! 'name' => 'fileman[]',
! 'value' => $file['name']
! ));
}
!
@reset($this->bo->file_attributes);
while(list($internal,$displayed) =
each($this->bo->file_attributes))
--- 784,796 ----
$file = $files_array[$i];
$usage += $file['size'];
! if (!count($edit) )
! {
!
$file_attributes['checkbox'] = '';
!
$file_output[$i]['checkbox'] =array('widget' => array( 'type' => 'checkbox',
! 'name'
=> 'fileman[]',
! 'value'
=> $file['name']
! ));
}
!
@reset($this->bo->file_attributes);
while(list($internal,$displayed) =
each($this->bo->file_attributes))
***************
*** 821,835 ****
case
'name':
$mime_parts = explode('/',$file['mime_type']);
! $file_icon
= $this->mime_ico[$file['mime_type']];
! if
(!$file_icon) {
!
$file_icon = ( $this->mime_ico[$mime_parts[0]]) ?
$this->mime_ico[$mime_parts[0]] : $this->mime_ico['unknown'];
! if
(strpos($file['name'],'.exe') !== false) $file_icon = $this->mime_ico['exe'];
! }
!
!
$file_output[$i]['name']['icon'] = array(
!
'widget' => array( 'type' => 'img',
!
'src' =>
$GLOBALS['phpgw']->common->image($this->bo->appname,$file_icon)
!
));
!
if ($file['mime_type']=='Directory')
{
--- 823,837 ----
case
'name':
$mime_parts = explode('/',$file['mime_type']);
!
$file_icon = $this->mime_ico[$file['mime_type']];
!
if (!$file_icon) {
!
$file_icon = ( $this->mime_ico[$mime_parts[0]]) ?
$this->mime_ico[$mime_parts[0]] : $this->mime_ico['unknown'];
!
if (strpos($file['name'],'.exe') !== false) $file_icon =
$this->mime_ico['exe'];
!
}
!
!
$file_output[$i]['name']['icon'] = array(
!
'widget' => array( 'type' => 'img',
!
'src' =>
$GLOBALS['phpgw']->common->image($this->bo->appname,$file_icon)
!
));
!
if ($file['mime_type']=='Directory')
{
***************
*** 853,864 ****
));
if ($mime_parts[0] == 'text')
! {
!
$href['menuaction'] = $this->bo->appname.'.ui'.$this->bo->appname.'.action';
!
$href['uiaction'] = 'edit';
!
$file_output[$i]['name']['edit'] = array('widget' => array( 'type' => 'img',
!
'src' => $GLOBALS['phpgw']->common->image($this->bo->appname,'pencil'),
!
'link' => $GLOBALS['phpgw']->link('/index.php', $href)
!
));
! }
break;
default:
--- 855,866 ----
));
if ($mime_parts[0] == 'text')
!
{
!
$href['menuaction'] =
$this->bo->appname.'.ui'.$this->bo->appname.'.action';
!
$href['uiaction'] = 'edit';
!
$file_output[$i]['name']['edit'] = array('widget' => array(
'type' => 'img',
!
'src' =>
$GLOBALS['phpgw']->common->image($this->bo->appname,'pencil'),
!
'link' =>
$GLOBALS['phpgw']->link('/index.php', $href)
!
));
!
}
break;
default:
***************
*** 905,909 ****
'img_up' => array('widget' =>
array('type' => 'img',
'src' => $GLOBALS['phpgw']->common->image($this->bo->appname,'up'),
!
'alt' => lang('Up'),
'link' => $GLOBALS['phpgw']->link('/index.php',Array(
'menuaction' =>
$this->bo->appname.'.ui'.$this->bo->appname.'.index',
--- 907,911 ----
'img_up' => array('widget' =>
array('type' => 'img',
'src' => $GLOBALS['phpgw']->common->image($this->bo->appname,'up'),
!
'alt' => lang('up'),
'link' => $GLOBALS['phpgw']->link('/index.php',Array(
'menuaction' =>
$this->bo->appname.'.ui'.$this->bo->appname.'.index',
***************
*** 914,918 ****
'img_home' => array('widget' =>
array('type' => 'img',
'src' =>
$GLOBALS['phpgw']->common->image($this->bo->appname,'folder_home'),
!
'alt' => lang('Folder'),
'link' => $GLOBALS['phpgw']->link('/index.php',Array(
'menuaction' =>
$this->bo->appname.'.ui'.$this->bo->appname.'.index',
--- 916,920 ----
'img_home' => array('widget' =>
array('type' => 'img',
'src' =>
$GLOBALS['phpgw']->common->image($this->bo->appname,'folder_home'),
!
'alt' => lang('folder'),
'link' => $GLOBALS['phpgw']->link('/index.php',Array(
'menuaction' =>
$this->bo->appname.'.ui'.$this->bo->appname.'.index',
***************
*** 923,927 ****
'img_dir' => array('widget' =>
array('type' => 'img',
'src' =>
$GLOBALS['phpgw']->common->image($this->bo->appname,'folder_large'),
!
'alt' => lang('Folder'),
'link' => $GLOBALS['phpgw']->link('/index.php',Array(
'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.index',
'path' => urlencode($this->bo->path)
--- 925,929 ----
'img_dir' => array('widget' =>
array('type' => 'img',
'src' =>
$GLOBALS['phpgw']->common->image($this->bo->appname,'folder_large'),
!
'alt' => lang('folder'),
'link' => $GLOBALS['phpgw']->link('/index.php',Array(
'menuaction' => $this->bo->appname.'.ui'.$this->bo->appname.'.index',
'path' => urlencode($this->bo->path)
***************
*** 939,955 ****
$var['img_cancel'] = array('widget' =>
array('type' => 'img',
'src' =>
$GLOBALS['phpgw']->common->image($this->bo->appname,'button_cancel'),
!
'alt' => lang('Folder')
));
$var['button_cancel'] = array('widget'
=> array('type' => 'submit',
'name' => 'cancel',
!
'value' => lang('Cancel')
));
$var['img_ok'] = array('widget' =>
array('type' => 'img',
'src' =>
$GLOBALS['phpgw']->common->image($this->bo->appname,'button_ok'),
!
'alt' => lang('Folder')
));
$var['button_ok'] = array('widget' =>
array('type' => 'submit',
'name' => 'submit',
!
'value' => lang('OK')
));
@reset($edit);
--- 941,957 ----
$var['img_cancel'] = array('widget' =>
array('type' => 'img',
'src' =>
$GLOBALS['phpgw']->common->image($this->bo->appname,'button_cancel'),
!
'alt' => lang('folder')
));
$var['button_cancel'] = array('widget'
=> array('type' => 'submit',
'name' => 'cancel',
!
'value' => lang('cancel')
));
$var['img_ok'] = array('widget' =>
array('type' => 'img',
'src' =>
$GLOBALS['phpgw']->common->image($this->bo->appname,'button_ok'),
!
'alt' => lang('folder')
));
$var['button_ok'] = array('widget' =>
array('type' => 'submit',
'name' => 'submit',
!
'value' => lang('ok')
));
@reset($edit);
***************
*** 1179,1183 ****
}
}
-
}
--- 1181,1184 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: filemanager/inc class.bofilemanager.inc.php,1.2,1.3 class.uiaction_edit.inc.php,1.1,1.2class.uifilemanager.inc.php,1.2,1.3,
Jonathon Sim <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: filemanager/setup setup.inc.php,1.16,1.17
- Next by Date:
[Phpgroupware-cvs] CVS: property/setup default_records.inc.php,1.7,1.8 setup.inc.php,1.22,1.23 tables_current.inc.php,1.39,1.40
- Previous by thread:
[Phpgroupware-cvs] CVS: filemanager/setup setup.inc.php,1.16,1.17
- Next by thread:
[Phpgroupware-cvs] CVS: property/setup default_records.inc.php,1.7,1.8 setup.inc.php,1.22,1.23 tables_current.inc.php,1.39,1.40
- Index(es):