fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [11457] generic import


From: Sigurd Nes
Subject: [Fmsystem-commits] [11457] generic import
Date: Wed, 13 Nov 2013 18:00:49 +0000

Revision: 11457
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11457
Author:   sigurdne
Date:     2013-11-13 18:00:45 +0000 (Wed, 13 Nov 2013)
Log Message:
-----------
generic import

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

Modified: trunk/property/inc/class.uiimport.inc.php
===================================================================
--- trunk/property/inc/class.uiimport.inc.php   2013-11-13 17:34:50 UTC (rev 
11456)
+++ trunk/property/inc/class.uiimport.inc.php   2013-11-13 18:00:45 UTC (rev 
11457)
@@ -70,8 +70,27 @@
 
                                phpgwapi_cache::session_set('property', 
'import_settings', $_POST);
 
-                               $this->conv_type        = 
phpgw::get_var('conv_type');
+                               $check_method = 0;
+                               if($this->conv_type = 
phpgw::get_var('conv_type'))
+                               {
+                                       $check_method ++;
+                               }
+                               if ($location_id = 
phpgw::get_var('location_id', 'int'))
+                               {
+                                       $check_method ++;
+                               }
+                               
+                               if($table = phpgw::get_var('table'))
+                               {
+                                       $check_method ++;
+                               }
 
+                               if($check_method > 1)
+                               {
+                                       phpgwapi_cache::session_set('property', 
'import_message', 'choose only one target!');
+                                       
$GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction'=>'property.uiimport.index'));
+                               }
+
                                $start_time = time(); // Start time of import
                                $start = date("G:i:s",$start_time);
                                echo "<h3>Import started at: {$start}</h3>";
@@ -96,7 +115,7 @@
                                        require_once PHPGW_SERVER_ROOT . 
"/property/inc/import/import_update_generic.php";
                                }
 
-                               $location_id = phpgw::get_var('location_id', 
'int');
+
                                $this->import_conversion = new 
import_conversion($location_id);
                                $this->debug = phpgw::get_var('debug', 'bool');
                                $this->import_conversion->debug = $this->debug;
@@ -220,7 +239,8 @@
                //              $tables = $this->db->table_names();
                                $tables = array
                                (
-                                       'fm_vendor'
+                                       'fm_vendor',
+                                       'fm_condition_survey'
                                );
                                sort($tables);
 
@@ -242,7 +262,7 @@
 
                                        foreach($category_list as $category)
                                        {
-                                               $selected = 
$import_settings['category'] == $category ? 'selected =  "selected"' : '';
+                                               $selected = 
$import_settings['location_id'] == $category['location_id'] ? 'selected =  
"selected"' : '';
                                                $category_option .=  <<<HTML
                                                <option 
value="{$category['location_id']}"{$selected}>{$category['name']}</option>
 HTML;




reply via email to

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