Projekt

Allgemein

Profil

GX-Bug #59426 » GoogleCronJobExportFix.patch

Till Tepelmann, 21.09.2018 14:09

Unterschiede anzeigen:

src/system/classes/csv/CSVSource.php (date 1537529420000)
1 1
<?php
2 2
/* --------------------------------------------------------------
3
   CSVSource.inc.php 2018-09-12
3
   CSVSource.inc.php 2018-09-21
4 4
   Gambio GmbH
5 5
   http://www.gambio.de
6 6
   Copyright (c) 2018 Gambio GmbH
......
28 28
	public $v_passes_array = array();
29 29
	protected $timeUntilCacheIsTooOld = 100;
30 30
	protected $timeBetweenCronjobCalls = 50;
31

  
31
	
32
	
33
	/**
34
	 * @var bool $google_connected
35
	 */
36
	protected $google_connected = false;
37
	
32 38
	protected $v_coo_csv_function_lib = null;
33 39
	protected $v_coo_csv_import_function_lib = null;
34 40
	protected $v_handle = null;
......
73 79
		$this->v_passes_array['main']['rows'] = 0;
74 80
		$this->v_passes_array['attributes']['pass'] = 0;
75 81
		$this->v_passes_array['attributes']['rows'] = 0;
76

  
82
		
83
		$db = StaticGXCoreLoader::getDatabaseQueryBuilder();
84
		$google_configuration_storage = new GoogleConfigurationStorage($db,'general');
85
		
86
		$this->google_connected = $google_configuration_storage->get('connection-status');
87
		
77 88
		$this->v_keyword_array = array('XTSOL');
78 89
	}
79 90

  
......
1363 1374

  
1364 1375
		while( $t_row = xtc_db_fetch_array( $t_result ) )
1365 1376
		{
1366
			if((int)$t_row['type_id'] === self::GOOGLE_SHOPPING_TYPE_ID && gm_get_conf('GOOGLE_ADWORDS_CONNECTION_STATUS') !== 'true')
1377
			if((int)$t_row['type_id'] === self::GOOGLE_SHOPPING_TYPE_ID && !$this->google_connected)
1367 1378
			{
1368 1379
				continue;
1369 1380
			}
src/system/classes/csv/CSVControl.inc.php (date 1537529432000)
1 1
<?php
2 2
/* --------------------------------------------------------------
3
   CSVControl.inc.php 2018-02-08
3
   CSVControl.inc.php 2018-09-21
4 4
   Gambio GmbH
5 5
   http://www.gambio.de
6 6
   Copyright (c) 2018 Gambio GmbH
......
19 19
	protected $v_coo_csv_source = null;
20 20
	
21 21
	/**
22
	 * @var \GoogleConfigurationStorage
22
	 * @var bool $google_connected
23 23
	 */
24
	protected $v_coo_google_configuration_storage = null;
24
	protected $google_connected = false;
25
	
25 26
	protected $v_export_file_handle = false;
26 27
	protected $coo_properties_data_agent = null;
27 28
    protected $v_timeout = 1;
......
56 57
		$this->v_coo_csv_source = MainFactory::create_object('CSVSource', array(), true);
57 58
		
58 59
		$db = StaticGXCoreLoader::getDatabaseQueryBuilder();
59
		$this->v_coo_google_configuration_storage = new GoogleConfigurationStorage($db,'general');
60
		$google_configuration_storage = new GoogleConfigurationStorage($db,'general');
61
		
62
		$this->google_connected = $google_configuration_storage->get('connection-status');
60 63
		
61 64
		$this->coo_properties_data_agent = MainFactory::create_object('PropertiesDataAgent', array());
62 65
	}
......
384 387
		}
385 388
		
386 389
		$scheme = $this->v_coo_csv_source->get_scheme($t_scheme_id);
387
		if((int)$scheme->v_data_array['type_id'] === self::GOOGLE_SHOPPING_TYPE_ID && !$this->v_coo_google_configuration_storage->get('connection-status'))
390
		if((int)$scheme->v_data_array['type_id'] === self::GOOGLE_SHOPPING_TYPE_ID && !$this->google_connected)
388 391
		{
389 392
			$t_run_export = false;
390 393
			$t_export_unfinished = false;
    (1-1/1)