[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6639] merge 6637:6638 from trunk
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [6639] merge 6637:6638 from trunk |
Date: |
Thu, 25 Nov 2010 09:55:53 +0000 |
Revision: 6639
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6639
Author: sigurdne
Date: 2010-11-25 09:55:52 +0000 (Thu, 25 Nov 2010)
Log Message:
-----------
merge 6637:6638 from trunk
Modified Paths:
--------------
branches/Version-1_0-branch/property/inc/class.uidocument.inc.php
Property Changed:
----------------
branches/Version-1_0-branch/
Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
-
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6627,6629-6631,6633-6634,6636
+
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6627,6629-6631,6633-6634,6636,6638
Modified: branches/Version-1_0-branch/property/inc/class.uidocument.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uidocument.inc.php
2010-11-25 09:54:41 UTC (rev 6638)
+++ branches/Version-1_0-branch/property/inc/class.uidocument.inc.php
2010-11-25 09:55:52 UTC (rev 6639)
@@ -1133,53 +1133,56 @@
if(!$receipt['error'])
{
- $receipt =
$this->bofiles->create_document_dir($document_dir);
- if(isset($values['document_name_orig'])
&& $values['document_name_orig'] && (!isset($values['document_name']) ||
!$values['document_name']))
+
if(isset($_FILES['document_file']['tmp_name']) &&
$_FILES['document_file']['tmp_name'])
{
- $old_file =
$this->bo->get_file($document_id);
+ $receipt =
$this->bofiles->create_document_dir($document_dir);
+
if(isset($values['document_name_orig']) && $values['document_name_orig'] &&
(!isset($values['document_name']) || !$values['document_name']))
+ {
+ $old_file =
$this->bo->get_file($document_id);
- $to_file .=
$values['document_name_orig'];
+ $to_file .=
$values['document_name_orig'];
- if($old_file != $to_file)
+ if($old_file !=
$to_file)
+ {
+
$this->bofiles->vfs->override_acl = 1;
+
if(!$this->bofiles->vfs->mv (array (
+ 'from'
=> $old_file,
+ 'to'
=> $to_file,
+
'relatives' => array (RELATIVE_ALL, RELATIVE_ALL))))
+ {
+
$receipt['error'][]=array('msg'=>lang('Failed to move file !'));
+ }
+
$this->bofiles->vfs->override_acl = 0;
+ }
+ }
+ }
+
+ $values['document_id'] = $document_id;
+
+ if(!$receipt['error'])
+ {
+ if($values['document_name'] &&
!$values['link'])
{
$this->bofiles->vfs->override_acl = 1;
-
if(!$this->bofiles->vfs->mv (array (
- 'from'
=> $old_file,
+
+
if(!$this->bofiles->vfs->cp (array (
+ 'from'
=> $_FILES['document_file']['tmp_name'],
'to'
=> $to_file,
- 'relatives'
=> array (RELATIVE_ALL, RELATIVE_ALL))))
+ 'relatives'
=> array (RELATIVE_NONE|VFS_REAL, RELATIVE_ALL))))
{
-
$receipt['error'][]=array('msg'=>lang('Failed to move file !'));
+
$receipt['error'][]=array('msg'=>lang('Failed to upload file !'));
}
$this->bofiles->vfs->override_acl = 0;
}
}
}
- $values['document_id'] = $document_id;
-
if(!$receipt['error'])
{
- if($values['document_name'] &&
!$values['link'])
- {
-
$this->bofiles->vfs->override_acl = 1;
-
- if(!$this->bofiles->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 !'));
- }
-
$this->bofiles->vfs->override_acl = 0;
- }
-
- if(!$receipt['error'])
- {
- $receipt =
$this->bo->save($values);
- //
$document_id=$receipt['document_id'];
-
$GLOBALS['phpgw']->session->appsession('session_data','document_receipt',$receipt);
-
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction'=>
'property.uidocument.list_doc', 'location_code'=> implode("-",
$values['location']), 'entity_id'=> $this->entity_id, 'cat_id'=> $this->cat_id,
'p_num'=> $values['extra']['p_num']));
- }
+ $receipt = $this->bo->save($values);
+ // $document_id=$receipt['document_id'];
+
$GLOBALS['phpgw']->session->appsession('session_data','document_receipt',$receipt);
+
$GLOBALS['phpgw']->redirect_link('/index.php', array('menuaction'=>
'property.uidocument.list_doc', 'location_code'=> implode("-",
$values['location']), 'entity_id'=> $this->entity_id, 'cat_id'=> $this->cat_id,
'p_num'=> $values['extra']['p_num']));
}
else
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6639] merge 6637:6638 from trunk,
Sigurd Nes <=