fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [11490] property: condition survey import


From: Sigurd Nes
Subject: [Fmsystem-commits] [11490] property: condition survey import
Date: Tue, 26 Nov 2013 11:42:17 +0000

Revision: 11490
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11490
Author:   sigurdne
Date:     2013-11-26 11:42:16 +0000 (Tue, 26 Nov 2013)
Log Message:
-----------
property: condition survey import

Modified Paths:
--------------
    trunk/property/inc/class.uicondition_survey.inc.php

Modified: trunk/property/inc/class.uicondition_survey.inc.php
===================================================================
--- trunk/property/inc/class.uicondition_survey.inc.php 2013-11-25 15:21:59 UTC 
(rev 11489)
+++ trunk/property/inc/class.uicondition_survey.inc.php 2013-11-26 11:42:16 UTC 
(rev 11490)
@@ -919,6 +919,28 @@
                                file_put_contents($cached_file, 
file_get_contents($file));
                                phpgwapi_cache::session_set('property', 
'condition_survey_import_file',$cached_file);
                                $step = 1;
+
+                               // Add the file to documents
+                               $bofiles        = 
CreateObject('property.bofiles');
+                               $to_file = 
"{$bofiles->fakebase}/condition_survey/{$id}/" . str_replace(' 
','_',$_FILES['import_file']['name']);
+
+                               $bofiles->vfs->rm(array(
+                                               'string' => $to_file,
+                                               'relatives' => array(
+                                                       RELATIVE_NONE
+                                               )
+                                       )
+                               );
+
+                               
$bofiles->create_document_dir("condition_survey/{$id}");
+                               $bofiles->vfs->override_acl = 1;
+
+                               $bofiles->vfs->cp (array (
+                                       'from'  => 
$_FILES['import_file']['tmp_name'],
+                                       'to'    => $to_file,
+                                       'relatives'     => array 
(RELATIVE_NONE|VFS_REAL, RELATIVE_ALL)));
+                               $bofiles->vfs->override_acl = 0;
+                               unset($bofiles);
                        }
 
                        $tabs = array();




reply via email to

[Prev in Thread] Current Thread [Next in Thread]