[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property/inc class.bodocument.inc.php,1.4,1.5 cl
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc class.bodocument.inc.php,1.4,1.5 class.bodrawing.inc.php,1.3,1.4 class.boreport.inc.php,1.1,1.2 class.uidocument.inc.php,1.5,1.6 class.uidrawing.inc.php,1.15,1.16 class.uireport.inc.php,1.1,1.2 |
Date: |
Wed, 14 May 2003 09:18:18 -0400 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv18162/inc
Modified Files:
class.bodocument.inc.php class.bodrawing.inc.php
class.boreport.inc.php class.uidocument.inc.php
class.uidrawing.inc.php class.uireport.inc.php
Log Message:
no message
Index: class.bodocument.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bodocument.inc.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** class.bodocument.inc.php 13 May 2003 21:12:50 -0000 1.4
--- class.bodocument.inc.php 14 May 2003 13:18:15 -0000 1.5
***************
*** 33,39 ****
$this->historylog =
CreateObject($this->currentapp.'.historylog','document');
$this->contacts =
CreateObject('phpgwapi.contacts');
! $this->vfs =
CreateObject('phpgwapi.vfs');
! $this->rootdir =
$this->vfs->basedir;
! $this->fakebase =
$this->vfs->fakebase;
$start = get_var('start',array('POST','GET'));
--- 33,39 ----
$this->historylog =
CreateObject($this->currentapp.'.historylog','document');
$this->contacts =
CreateObject('phpgwapi.contacts');
! $this->vfs =
CreateObject('phpgwapi.vfs');
! $this->rootdir = $this->vfs->basedir;
! $this->fakebase = $this->vfs->fakebase;
$start = get_var('start',array('POST','GET'));
Index: class.bodrawing.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.bodrawing.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** class.bodrawing.inc.php 21 Apr 2003 20:47:11 -0000 1.3
--- class.bodrawing.inc.php 14 May 2003 13:18:15 -0000 1.4
***************
*** 33,36 ****
--- 33,39 ----
$this->historylog =
CreateObject($this->currentapp.'.historylog','drawing');
$this->contacts =
CreateObject('phpgwapi.contacts');
+ $this->vfs =
CreateObject('phpgwapi.vfs');
+ $this->rootdir = $this->vfs->basedir;
+ $this->fakebase = $this->vfs->fakebase;
$start = get_var('start',array('POST','GET'));
***************
*** 76,79 ****
--- 79,110 ----
}
}
+
+ function create_home_dir()
+ {
+ if(!$this->vfs->file_exists(array(
+ 'string' => $this->fakebase. SEP .
'drawing',
+ 'relatives' => Array(RELATIVE_NONE)
+ )))
+ {
+ $this->vfs->override_acl = 1;
+
+ if(!$this->vfs->mkdir (array(
+ 'string' => $this->fakebase. SEP .
'drawing',
+ 'relatives' => array(
+ RELATIVE_NONE
+ )
+ )))
+ {
+
$receipt['error'][]=array('msg'=>lang('failed to create directory') . ' :'.
$this->fakebase. SEP . 'drawing');
+ }
+ else
+ {
+
$receipt['message'][]=array('msg'=>lang('directory created') . ' :'.
$this->fakebase. SEP . 'drawing');
+ }
+ $this->vfs->override_acl = 0;
+
+ }
+ }
+
function select_status_list($format='',$selected='')
Index: class.boreport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.boreport.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.boreport.inc.php 13 May 2003 21:12:50 -0000 1.1
--- class.boreport.inc.php 14 May 2003 13:18:15 -0000 1.2
***************
*** 301,337 ****
// $report['date'] = mktime
(2,0,0,$date['month'],$date['day'],$date['year']);
- if($report['delete_file'])
- {
- for ($i=0;$i<count($report['delete_file']);$i++)
- {
- $file = $this->fakebase. SEP . 'report'
. SEP . $report['property_id'] . SEP . $report['report_id'] . SEP .
$report['delete_file'][$i];
-
- if($this->vfs->file_exists(array(
- 'string' => $file,
- 'relatives' =>
Array(RELATIVE_NONE)
- )))
- {
- $this->vfs->override_acl = 1;
-
- if(!$this->vfs->rm (array(
- 'string' => $file,
- 'relatives' => array(
- RELATIVE_NONE
- )
- )))
- {
-
$receipt['error'][]=array('msg'=>lang('failed to delete file') . ' :'.
$this->fakebase. SEP . 'document'. SEP . $document_name);
- }
- else
- {
-
$receipt['message'][]=array('msg'=>lang('file deleted') . ' :'.
$this->fakebase. SEP . 'document'. SEP . $document_name);
- }
- $this->vfs->override_acl = 0;
- }
-
- }
-
- }
-
if ($action=='edit')
{
--- 301,304 ----
***************
*** 343,346 ****
--- 310,344 ----
{
$receipt['error'][]=array('msg'=>lang('This report ID does not exist!'));
+ }
+
+ if($report['delete_file'])
+ {
+ for
($i=0;$i<count($report['delete_file']);$i++)
+ {
+ $file = $this->fakebase. SEP .
'report' . SEP . $report['property_id'] . SEP . $report['report_id'] . SEP .
$report['delete_file'][$i];
+
+
if($this->vfs->file_exists(array(
+ 'string' =>
$file,
+ 'relatives' =>
Array(RELATIVE_NONE)
+ )))
+ {
+
$this->vfs->override_acl = 1;
+
+ if(!$this->vfs->rm
(array(
+ 'string' =>
$file,
+ 'relatives' =>
array(
+ RELATIVE_NONE
+ )
+ )))
+ {
+
$receipt['error'][]=array('msg'=>lang('failed to delete file') . ' :'.
$this->fakebase. SEP . 'report'. SEP . $report['property_id']. SEP .
$report['delete_file'][$i]);
+ }
+ else
+ {
+
$receipt['message'][]=array('msg'=>lang('file deleted') . ' :'.
$this->fakebase. SEP . 'report'. SEP . $report['property_id']. SEP .
$report['delete_file'][$i]);
+ }
+
$this->vfs->override_acl = 0;
+ }
+ }
}
}
Index: class.uidocument.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uidocument.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** class.uidocument.inc.php 13 May 2003 21:12:50 -0000 1.5
--- class.uidocument.inc.php 14 May 2003 13:18:15 -0000 1.6
***************
*** 41,48 ****
$this->so =
CreateObject($this->currentapp.'.sodocument',True);
$this->bocommon =
CreateObject($this->currentapp.'.bocommon',True);
! $this->vfs =
CreateObject('phpgwapi.vfs');
! $this->rootdir =
$this->vfs->basedir;
! $this->fakebase =
$this->vfs->fakebase;
!
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
--- 41,46 ----
$this->so =
CreateObject($this->currentapp.'.sodocument',True);
$this->bocommon =
CreateObject($this->currentapp.'.bocommon',True);
! $this->rootdir =
$this->bo->rootdir;
! $this->fakebase =
$this->bo->fakebase;
$this->start =
$this->bo->start;
$this->query =
$this->bo->query;
***************
*** 423,427 ****
//echo 'file: ' . $file . '<br>';
! if($this->vfs->file_exists(array(
'string' => $file,
'relatives' => Array(RELATIVE_NONE)
--- 421,425 ----
//echo 'file: ' . $file . '<br>';
! if($this->bo->vfs->file_exists(array(
'string' => $file,
'relatives' => Array(RELATIVE_NONE)
***************
*** 430,438 ****
$filename = current(explode('.',
basename($values['document_name'])));
! $filetype = $this->vfs->file_type(array(
'string' => $file,
'relatives' =>
Array(RELATIVE_NONE)));
! $size = $this->vfs->get_size(array(
'string' => $file,
'relatives' =>
Array(RELATIVE_NONE),
--- 428,436 ----
$filename = current(explode('.',
basename($values['document_name'])));
! $filetype =
$this->bo->vfs->file_type(array(
'string' => $file,
'relatives' =>
Array(RELATIVE_NONE)));
! $size =
$this->bo->vfs->get_size(array(
'string' => $file,
'relatives' =>
Array(RELATIVE_NONE),
***************
*** 442,446 ****
$browser->content_header($filename,$filetype,$size);
! $document= $this->vfs->read(array(
'string' => $file,
'relatives' => Array(RELATIVE_NONE)));
--- 440,444 ----
$browser->content_header($filename,$filetype,$size);
! $document= $this->bo->vfs->read(array(
'string' => $file,
'relatives' => Array(RELATIVE_NONE)));
***************
*** 518,522 ****
}
! if(!$values['document_name_orig'] &&
$this->vfs->file_exists(array(
'string' => $to_file,
'relatives' =>
Array(RELATIVE_NONE)
--- 516,520 ----
}
! if(!$values['document_name_orig'] &&
$this->bo->vfs->file_exists(array(
'string' => $to_file,
'relatives' =>
Array(RELATIVE_NONE)
***************
*** 530,552 ****
$values['document_id'] = $document_id;
if(!$receipt['error'])
{
! $this->vfs->cp (array (
'from' =>
$_FILES['document_file']['tmp_name'],
'to' => $to_file,
! 'relatives' => array
(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL)));
!
! $receipt = $this->bo->save($values);
!
! $document_id=$receipt['document_id'];
! //_debug_array($receipt);
}
}
! if ($document_id)
{
$values = $this->bo->read_single($document_id);
- $function_msg = lang('Edit document');
// $record_history =
$this->bo->read_record_history($document_id);
}
else
--- 528,561 ----
$values['document_id'] = $document_id;
+
if(!$receipt['error'])
{
! //echo $_FILES['document_file']['tmp_name'] .'<br>';
! //echo $to_file .'<br>';
! if(!$this->bo->vfs->cp (array (
'from' =>
$_FILES['document_file']['tmp_name'],
'to' => $to_file,
! 'relatives' => array
(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL))))
! {
!
$receipt['error'][]=array('msg'=>lang('Failed to upload file !'));
! }
!
! if(!$receipt['error'])
! {
! $receipt =
$this->bo->save($values);
!
$document_id=$receipt['document_id'];
! }
! }
! else
! {
! $values['document_name']='';
}
}
! if ($document_id ||(!$receipt['error'] &&
$values['document_id']))
{
$values = $this->bo->read_single($document_id);
// $record_history =
$this->bo->read_record_history($document_id);
+ $function_msg = lang('Edit document');
}
else
Index: class.uidrawing.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uidrawing.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** class.uidrawing.inc.php 8 May 2003 13:56:29 -0000 1.15
--- class.uidrawing.inc.php 14 May 2003 13:18:15 -0000 1.16
***************
*** 40,46 ****
$this->so =
CreateObject($this->currentapp.'.sodrawing',True);
$this->bocommon =
CreateObject($this->currentapp.'.bocommon',True);
! $this->vfs =
CreateObject('phpgwapi.vfs');
! $this->rootdir =
$this->vfs->basedir;
! $this->fakebase =
$this->vfs->fakebase;
$this->start =
$this->bo->start;
--- 40,45 ----
$this->so =
CreateObject($this->currentapp.'.sodrawing',True);
$this->bocommon =
CreateObject($this->currentapp.'.bocommon',True);
! $this->rootdir =
$this->bo->basedir;
! $this->fakebase =
$this->bo->fakebase;
$this->start =
$this->bo->start;
***************
*** 228,259 ****
- function create_home_dir()
- {
- if(!$this->vfs->file_exists(array(
- 'string' => $this->fakebase. SEP .
'drawing',
- 'relatives' => Array(RELATIVE_NONE)
- )))
- {
- $this->vfs->override_acl = 1;
-
- if(!$this->vfs->mkdir (array(
- 'string' => $this->fakebase. SEP .
'drawing',
- 'relatives' => array(
- RELATIVE_NONE
- )
- )))
- {
-
$receipt['error'][]=array('msg'=>lang('failed to create directory') . ' :'.
$this->fakebase. SEP . 'drawing');
- }
- else
- {
-
$receipt['message'][]=array('msg'=>lang('directory created') . ' :'.
$this->fakebase. SEP . 'drawing');
- }
- $this->vfs->override_acl = 0;
-
- }
- }
-
-
function view_file($file_array='')
{
--- 227,230 ----
***************
*** 264,268 ****
$file = $this->fakebase. SEP . 'drawing'. SEP .
$values['drawing_name'];
! if($this->vfs->file_exists(array(
'string' => $file,
'relatives' => Array(RELATIVE_NONE)
--- 235,239 ----
$file = $this->fakebase. SEP . 'drawing'. SEP .
$values['drawing_name'];
! if($this->bo->vfs->file_exists(array(
'string' => $file,
'relatives' => Array(RELATIVE_NONE)
***************
*** 271,279 ****
$filename = current(explode('.',
basename($values['drawing_name'])));
! $filetype = $this->vfs->file_type(array(
'string' => $file,
'relatives' =>
Array(RELATIVE_NONE)));
! $size = $this->vfs->get_size(array(
'string' => $file,
'relatives' =>
Array(RELATIVE_NONE),
--- 242,250 ----
$filename = current(explode('.',
basename($values['drawing_name'])));
! $filetype =
$this->bo->vfs->file_type(array(
'string' => $file,
'relatives' =>
Array(RELATIVE_NONE)));
! $size =
$this->bo->vfs->get_size(array(
'string' => $file,
'relatives' =>
Array(RELATIVE_NONE),
***************
*** 283,287 ****
$browser->content_header($filename,$filetype,$size);
! $document= $this->vfs->read(array(
'string' => $file,
'relatives' => Array(RELATIVE_NONE)));
--- 254,258 ----
$browser->content_header($filename,$filetype,$size);
! $document= $this->bo->vfs->read(array(
'string' => $file,
'relatives' => Array(RELATIVE_NONE)));
***************
*** 301,305 ****
$GLOBALS['phpgw']->xslttpl->add_file(array('drawing'));
! $this->create_home_dir();
if($values)
--- 272,276 ----
$GLOBALS['phpgw']->xslttpl->add_file(array('drawing'));
! $this->bo->create_home_dir();
if($values)
***************
*** 342,346 ****
}
! if(!$values['drawing_name_orig'] &&
$this->vfs->file_exists(array(
'string' => $this->fakebase.
SEP . 'drawing'. SEP . $values['drawing_name'],
'relatives' =>
Array(RELATIVE_NONE)
--- 313,317 ----
}
! if(!$values['drawing_name_orig'] &&
$this->bo->vfs->file_exists(array(
'string' => $this->fakebase.
SEP . 'drawing'. SEP . $values['drawing_name'],
'relatives' =>
Array(RELATIVE_NONE)
***************
*** 355,359 ****
{
! $this->vfs->cp (array (
'from' =>
$_FILES['drawing_file']['tmp_name'],
'to' => $this->fakebase. SEP
. 'drawing' . SEP . $values['drawing_name'],
--- 326,330 ----
{
! $this->bo->vfs->cp (array (
'from' =>
$_FILES['drawing_file']['tmp_name'],
'to' => $this->fakebase. SEP
. 'drawing' . SEP . $values['drawing_name'],
Index: class.uireport.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.uireport.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.uireport.inc.php 13 May 2003 21:12:50 -0000 1.1
--- class.uireport.inc.php 14 May 2003 13:18:15 -0000 1.2
***************
*** 375,389 ****
}
}
! /* else
{
! if ($id)
! {
! $values = $this->bo->read_single($id);
! }
}
- */
- $values = $this->bo->read_single($id);
-
$location_type='form';
--- 375,384 ----
}
}
!
! if (!$receipt['error'])
{
! $values = $this->bo->read_single($id);
}
$location_type='form';
***************
*** 490,493 ****
--- 485,489 ----
'files'
=> $values['files'],
'lang_files'
=> lang('files'),
+ 'lang_filename'
=> lang('Filename'),
'lang_delete_file'
=> lang('Delete file'),
'lang_view_file_statustext' =>
lang('Klick to view file'),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc class.bodocument.inc.php,1.4,1.5 class.bodrawing.inc.php,1.3,1.4 class.boreport.inc.php,1.1,1.2 class.uidocument.inc.php,1.5,1.6 class.uidrawing.inc.php,1.15,1.16 class.uireport.inc.php,1.1,1.2,
Sigurd Nes <address@hidden> <=