fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [15728]


From: nelson . guerra
Subject: [Fmsystem-commits] [15728]
Date: Sat, 24 Sep 2016 02:21:14 +0000 (UTC)

Revision: 15728
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15728
Author:   nelson224
Date:     2016-09-24 02:21:14 +0000 (Sat, 24 Sep 2016)
Log Message:
-----------


Modified Paths:
--------------
    branches/dev-syncromind-2/property/inc/class.uiimport_components.inc.php

Modified: 
branches/dev-syncromind-2/property/inc/class.uiimport_components.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.uiimport_components.inc.php    
2016-09-23 22:25:06 UTC (rev 15727)
+++ branches/dev-syncromind-2/property/inc/class.uiimport_components.inc.php    
2016-09-24 02:21:14 UTC (rev 15728)
@@ -64,9 +64,6 @@
                        $this->bo = CreateObject('property.boadmin_entity', 
true);
                        $this->acl = & $GLOBALS['phpgw']->acl;
                        $this->db = & $GLOBALS['phpgw']->db;
-                       $this->tmp_upload_dir = 
'/var/lib/phpgw/syncromind/test/';
-
-                       $GLOBALS['phpgw_info']['flags']['menu_selection'] = 
"property::documentation::generic";
                }
 
                public function download()
@@ -185,8 +182,14 @@
                
                public function handle_import_files()
                {
+                       $temp_files_components = 
phpgwapi_cache::session_get('property', 'temp_files_components');
+                       if (empty($temp_files_components))
+                       {
+                               return false;
+                       }
                        require_once PHPGW_SERVER_ROOT . 
"/property/inc/import/UploadHandler.php";
-                       $options['upload_dir'] = $this->tmp_upload_dir;
+                       
+                       $options['upload_dir'] = $temp_files_components;
                        $options['script_url'] = 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uiimport_components.handle_import_files'));
                        $upload_handler = new UploadHandler($options);
                }
@@ -706,7 +709,17 @@
                        }
                
                        $form_upload_action = 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uiimport_components.handle_import_files'));
-
+                       
+                       $access_error_upload_dir = '';
+                       $import_component_files = new import_component_files();
+                       $receipt = $import_component_files->check_upload_dir(); 
        
+                       if (($receipt['error']))
+                       {
+                               $access_error_upload_dir = $receipt['error'];
+                       } else {
+                               phpgwapi_cache::session_set('property', 
'temp_files_components', $import_component_files->get_upload_dir());
+                       }
+                       
                        $data = array
                        (
                                'datatable_def' => $datatable_def,
@@ -718,6 +731,7 @@
                                'part_of_town_filter' => array('options' => 
$part_of_town_filter),
                                'template_list' => array('options' => 
$category_list),
                                'form_file_upload' => 
phpgwapi_jquery::form_file_upload_generate($form_upload_action),
+                               'access_error_upload_dir' => 
$access_error_upload_dir,
                                'image_loader' => 
$GLOBALS['phpgw']->common->image('property', 'ajax-loader', '.gif', false)
                        );
 




reply via email to

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