Projekt

Allgemein

Profil

GX-Task #61437 » auto-updater-2-1-2.patch

Moritz Bunjes, 08.03.2019 18:47

Unterschiede anzeigen:

src/version_info/auto_updater-2_0_5.php (revision 481aeda901c68da7cf8e379d9647936efe4e5e39)
1
<?php
2
die('');
3
?>
4
version: AutoUpdater v2.0.5
5
date: 2018-08-01 09:45
src/gambio_installer/sql/admin_access_group_items.sql (date 1552064681000)
254 254
(56, 'KlarnaHub', 'CONTROLLER'),
255 255
(56, 'PaymentMatchingHub', 'CONTROLLER'),
256 256
(56, 'KlarnaHubSettlements', 'CONTROLLER'),
257
(57, 'AutoUpdaterAjax', 'CONTROLLER'),
257 258
(57, 'AutoUpdater', 'CONTROLLER'),
259
(57, 'AutoUpdaterShopExcludedAjax', 'CONTROLLER'),
258 260
(58, 'GoogleShopping', 'CONTROLLER'),
259 261
(58, 'GoogleShoppingAjax', 'CONTROLLER'),
260 262
(59, 'GoogleAdWords', 'CONTROLLER'),
tools/gulp_tasks/general/gulp_general_composer.js (date 1552065692000)
84 84
	function task() {
85 85
		del.sync('src/vendor');
86 86
		
87
		// Move the auto updater into the GXModules directory.
88
		del.sync('src/GXModules/Gambio/UpdateDownloader');
89
		gulp.src(['composer_components/gambio/auto-updater/src/GXModules/**/*'])
90
			.pipe(gulp.dest('src/GXModules'));
87
		// Move the auto updater into the shop
88
		gulp.src([
89
			'composer_components/gambio/auto-updater/src/admin/**/*'
90
		])
91
			.pipe(gulp.dest('src/admin'));
92
		gulp.src([
93
			'composer_components/gambio/auto-updater/src/GXMainComponents/**/*'
94
		])
95
			.pipe(gulp.dest('src/GXMainComponents'));
96
		gulp.src([
97
			'composer_components/gambio/auto-updater/src/lang/**/*'
98
		])
99
			.pipe(gulp.dest('src/lang'));
100
		gulp.src([
101
			'composer_components/gambio/auto-updater/src/system/**/*'
102
		])
103
			.pipe(gulp.dest('src/system'));
91 104
		
92 105
		// Move the responsive file manager to the src directory. 
93 106
		gulp.src(['composer_components/gambio/responsive-filemanager/**/*'])
.gitignore (date 1552066263000)
101 101
/src/GXModules/Gambio/UpdateDownloader/*
102 102
/src/images/flags/**/*.svg
103 103
!/src/images/flags/**/index.html
104
/src/admin/auto_updater.php
105
/src/admin/html/content/auto_updater
106
/src/GXMainComponents/Controllers/HttpView/Admin/auto_updater
107
/src/GXMainComponents/Extensions/AutoUpdater
108
/src/lang/english/original_sections/admin/auto_updater
109
/src/lang/german/original_sections/admin/auto_updater
110
/src/system/conf/admin_menu/menu_auto_updater.xml
src/gambio_installer/sql/gm_configuration.sql (date 1552064597000)
380 380
	('GM_CREATE_ACCOUNT_VVCODE', 'false'),
381 381
	('GM_CREATE_GUEST_ACCOUNT_VVCODE', 'false'),
382 382
	('PRODUCT_REVIEW_NAME', 'short_nothing'),
383
	('UPDATE_DOWNLOADER_CHECK_URL', 'https://updates.gambio-support.de/v2/check.php'),
384
	('UPDATE_DOWNLOADER_NOTIFY_URL', 'https://updates.gambio-support.de/v2/callingHome.php'),
385 383
	('LOG_IP_CALLBACK', '0'),
386 384
	('LOG_IP_CONTACT', '0'),
387 385
	('LOG_IP_TELL_A_FRIEND', '0'),
......
404 402
	('GALLERY_LIGHTBOX', 'false'),
405 403
	('ENABLE_JS_HYPHENATION', 'false'),
406 404
	('ENABLE_LIVE_SEARCH', 'true'),
407
	('PDF_FOOTER_REPLACE_COLUMN', 'null');
405
	('PDF_FOOTER_REPLACE_COLUMN', 'null'),
406
	('AUTO_UPDATER_UPDATES_URL', 'https://updates.gambio-support.de/v2/check.php'),
407
	('AUTO_UPDATER_FEEDBACK_URL', 'https://updates.gambio-support.de/v2/callingHome.php'),
408
	('AUTO_UPDATER_ACCEPT_DATA_PROCESSING', 'false');
composer.lock (date 1552063901000)
1 1
{
2 2
    "_readme": [
3 3
        "This file locks the dependencies of your project to a known state",
4
        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
4
        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5 5
        "This file is @generated automatically"
6 6
    ],
7
    "content-hash": "6c2664386c2a0a8f4df1ad06fd085dd1",
7
    "content-hash": "a49bb5c6979498b5b57b09170ca9a8b3",
8 8
    "packages": [
9 9
        {
10 10
            "name": "davefx/phplot",
......
100 100
        },
101 101
        {
102 102
            "name": "gambio/auto-updater",
103
            "version": "v2.0.5",
103
            "version": "v2.1.2",
104 104
            "source": {
105 105
                "type": "git",
106 106
                "url": "https://sources.gambio-server.net/gambio/auto-updater.git",
107
                "reference": "5e44ed0fd211766078569f220b3c97ad2dfdc2cc"
107
                "reference": "383067d9acdc4bb234dd4fb3b967dc1943c95f6c"
108
            },
109
            "require": {
110
                "ext-curl": "*",
111
                "league/flysystem": "^1.1@dev",
112
                "league/flysystem-sftp": "dev-master"
108 113
            },
109 114
            "type": "library",
110 115
            "autoload": {
......
112 117
                    "PackageBuilder\\": "packageBuilder/classes/"
113 118
                }
114 119
            },
120
            "scripts": {
121
                "create-docs": [
122
                    "mv ./src/GXMainComponents/Extensions/AutoUpdater/Vendor ./Vendor && php phpdoc.phar -d ./src/GXMainComponents -t ./docs && mv ./Vendor ./src/GXMainComponents/Extensions/AutoUpdater/Vendor"
123
                ]
124
            },
115 125
            "license": [
116 126
                "GPL-2.0"
117 127
            ],
118 128
            "description": "AutoUpdater for the Gambio Shop.",
119
            "time": "2018-08-08T08:58:07+00:00"
129
            "time": "2019-01-17T08:10:20+00:00"
120 130
        },
121 131
        {
122 132
            "name": "gambio/codeigniter-db",
......
385 395
            "time": "2017-03-20T21:17:32+00:00"
386 396
        },
387 397
        {
398
            "name": "league/flysystem",
399
            "version": "dev-master",
400
            "source": {
401
                "type": "git",
402
                "url": "https://github.com/thephpleague/flysystem.git",
403
                "reference": "0a342db3a10cb31862e83d550f67c2d087825467"
404
            },
405
            "dist": {
406
                "type": "zip",
407
                "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/0a342db3a10cb31862e83d550f67c2d087825467",
408
                "reference": "0a342db3a10cb31862e83d550f67c2d087825467",
409
                "shasum": ""
410
            },
411
            "require": {
412
                "ext-fileinfo": "*",
413
                "php": ">=5.5.9"
414
            },
415
            "conflict": {
416
                "league/flysystem-sftp": "<1.0.6"
417
            },
418
            "require-dev": {
419
                "phpspec/phpspec": "^3.4",
420
                "phpunit/phpunit": "^5.7.10"
421
            },
422
            "suggest": {
423
                "ext-fileinfo": "Required for MimeType",
424
                "ext-ftp": "Allows you to use FTP server storage",
425
                "ext-openssl": "Allows you to use FTPS server storage",
426
                "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2",
427
                "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3",
428
                "league/flysystem-azure": "Allows you to use Windows Azure Blob storage",
429
                "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching",
430
                "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem",
431
                "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files",
432
                "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib",
433
                "league/flysystem-webdav": "Allows you to use WebDAV storage",
434
                "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter",
435
                "spatie/flysystem-dropbox": "Allows you to use Dropbox storage",
436
                "srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications"
437
            },
438
            "type": "library",
439
            "extra": {
440
                "branch-alias": {
441
                    "dev-master": "1.1-dev"
442
                }
443
            },
444
            "autoload": {
445
                "psr-4": {
446
                    "League\\Flysystem\\": "src/"
447
                }
448
            },
449
            "notification-url": "https://packagist.org/downloads/",
450
            "license": [
451
                "MIT"
452
            ],
453
            "authors": [
454
                {
455
                    "name": "Frank de Jonge",
456
                    "email": "info@frenky.net"
457
                }
458
            ],
459
            "description": "Filesystem abstraction: Many filesystems, one API.",
460
            "keywords": [
461
                "Cloud Files",
462
                "WebDAV",
463
                "abstraction",
464
                "aws",
465
                "cloud",
466
                "copy.com",
467
                "dropbox",
468
                "file systems",
469
                "files",
470
                "filesystem",
471
                "filesystems",
472
                "ftp",
473
                "rackspace",
474
                "remote",
475
                "s3",
476
                "sftp",
477
                "storage"
478
            ],
479
            "time": "2019-02-14T07:18:57+00:00"
480
        },
481
        {
482
            "name": "league/flysystem-sftp",
483
            "version": "dev-master",
484
            "source": {
485
                "type": "git",
486
                "url": "https://github.com/thephpleague/flysystem-sftp.git",
487
                "reference": "61bc5a6ade892b5ac81e62b8c21be2c1798acc2a"
488
            },
489
            "dist": {
490
                "type": "zip",
491
                "url": "https://api.github.com/repos/thephpleague/flysystem-sftp/zipball/61bc5a6ade892b5ac81e62b8c21be2c1798acc2a",
492
                "reference": "61bc5a6ade892b5ac81e62b8c21be2c1798acc2a",
493
                "shasum": ""
494
            },
495
            "require": {
496
                "league/flysystem": "~1.0",
497
                "php": ">=5.6.0",
498
                "phpseclib/phpseclib": "~2.0"
499
            },
500
            "require-dev": {
501
                "mockery/mockery": "0.9.*",
502
                "phpunit/phpunit": "^5.7.25"
503
            },
504
            "type": "library",
505
            "autoload": {
506
                "psr-4": {
507
                    "League\\Flysystem\\Sftp\\": "src/"
508
                }
509
            },
510
            "notification-url": "https://packagist.org/downloads/",
511
            "license": [
512
                "MIT"
513
            ],
514
            "authors": [
515
                {
516
                    "name": "Frank de Jonge",
517
                    "email": "info@frenky.net"
518
                }
519
            ],
520
            "description": "Flysystem adapter for SFTP",
521
            "time": "2019-01-07T11:56:21+00:00"
522
        },
523
        {
388 524
            "name": "maximebf/debugbar",
389 525
            "version": "v1.15.0",
390 526
            "source": {
......
1085 1221
        {
1086 1222
            "name": "roave/security-advisories",
1087 1223
            "version": "dev-master",
1224
            "source": {
1225
                "type": "git",
1226
                "url": "https://github.com/Roave/SecurityAdvisories.git",
1227
                "reference": "0abc14e0df387fe74b4b32e0b8647d1639256d38"
1228
            },
1229
            "dist": {
1230
                "type": "zip",
1231
                "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/0abc14e0df387fe74b4b32e0b8647d1639256d38",
1232
                "reference": "0abc14e0df387fe74b4b32e0b8647d1639256d38",
1233
                "shasum": ""
1234
            },
1088 1235
            "conflict": {
1089 1236
                "3f/pygmentize": "<1.2",
1090 1237
                "adodb/adodb-php": "<5.20.12",
......
1255 1402
                }
1256 1403
            ],
1257 1404
            "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it",
1258
            "time": "2018-09-17T20:20:31+00:00"
1405
            "time": "2018-08-14T15:39:17+00:00"
1259 1406
        },
1260 1407
        {
1261 1408
            "name": "sentry/sentry",
......
2419 2566
                "testing",
2420 2567
                "xunit"
2421 2568
            ],
2569
            "abandoned": true,
2422 2570
            "time": "2018-02-07T06:47:59+00:00"
2423 2571
        },
2424 2572
        {
......
3383 3531
                "syntax",
3384 3532
                "tree"
3385 3533
            ],
3534
            "abandoned": true,
3386 3535
            "time": "2018-04-12T08:44:34+00:00"
3387 3536
        },
3388 3537
        {
......
3711 3860
        }
3712 3861
    ],
3713 3862
    "aliases": [],
3714
    "minimum-stability": "stable",
3863
    "minimum-stability": "dev",
3715 3864
    "stability-flags": {
3716 3865
        "gambio/codeigniter-db": 20,
3717 3866
        "roave/security-advisories": 20,
......
3722 3871
    "prefer-stable": false,
3723 3872
    "prefer-lowest": false,
3724 3873
    "platform": {
3725
        "php": ">=5.4.0"
3874
        "php": ">=5.6.0"
3726 3875
    },
3727 3876
    "platform-dev": []
3728 3877
}
composer.json (date 1552063939000)
40 40
		"maximebf/debugbar": "^1.15",
41 41
	    "pclzip/pclzip": "2.8.2",
42 42
		"gambio/responsive-filemanager": "dev-master",
43
		"gambio/auto-updater": "v2.0.5",
44 43
		"monolog/monolog": "^1.23",
45 44
		"sentry/sentry": "^1.9",
46 45
		"mtdowling/cron-expression": "~1.2.1",
47
	    "guzzlehttp/guzzle": "~6.0"
46
	    "guzzlehttp/guzzle": "~6.0",
47
		"gambio/auto-updater": "v2.1.2"
48 48
    },
49 49
    "require-dev": {
50 50
		"phpunit/phpunit": "^7.0",
src/version_info/auto_updater-2_1_2.php (date 1552063995000)
1
<?php
2
die('');
3
?>
4
version: AutoUpdater v2.1.2
5
date: 2019-01-17 08:48
src/gambio_updater/updates/v3.12.0.0/dependent.inc.php (date 1552064400000)
51 51
		}
52 52
	}
53 53
}
54

  
55

  
56
// AutoUpdater v2.1.2
57

  
58
/* @var \DatabaseModel $this */
59

  
60
// Add or update AUTO_UPDATER_UPDATES_URL gm_configuration value
61
$check = $this->query('SELECT * FROM `gm_configuration` WHERE `gm_key` = "AUTO_UPDATER_UPDATES_URL";', true);
62
if($check->num_rows < 1)
63
{
64
	$t_success &= $this->query('
65
		INSERT INTO `gm_configuration`
66
		SET `gm_key`    = "AUTO_UPDATER_UPDATES_URL",
67
			`gm_value`  = "https://updates.gambio-support.de/v2/check.php";
68
	') !== false;
69
}
70
else
71
{
72
	$t_success &= $this->query('
73
		UPDATE  `gm_configuration`
74
		SET     `gm_value`  = "https://updates.gambio-support.de/v2/check.php"
75
		WHERE   `gm_key`    = "AUTO_UPDATER_UPDATES_URL";
76
	') !== false;
77
}
78

  
79
// Add or update AUTO_UPDATER_FEEDBACK_URL gm_configuration value
80
$check = $this->query('SELECT * FROM `gm_configuration` WHERE `gm_key` = "AUTO_UPDATER_FEEDBACK_URL";', true);
81
if($check->num_rows < 1)
82
{
83
	$t_success &= $this->query('
84
		INSERT INTO `gm_configuration`
85
		SET `gm_key`    = "AUTO_UPDATER_FEEDBACK_URL",
86
			`gm_value`  = "https://updates.gambio-support.de/v2/callingHome.php";
87
	') !== false;
88
}
89
else
90
{
91
	$t_success &= $this->query('
92
		UPDATE  `gm_configuration`
93
		SET     `gm_value`  = "https://updates.gambio-support.de/v2/callingHome.php"
94
		WHERE   `gm_key`    = "AUTO_UPDATER_FEEDBACK_URL";
95
	') !== false;
96
}
97

  
98
// Add or update AUTO_UPDATER_FEEDBACK_URL gm_configuration value
99
$check  = $this->query('SELECT * FROM `gm_configuration` WHERE `gm_key` = "UPDATE_DOWNLOADER_ACCEPT_DATA_PRIVACY";',
100
                       true);
101
$check2 = $this->query('SELECT * FROM `gm_configuration` WHERE `gm_key` = "AUTO_UPDATER_ACCEPT_DATA_PROCESSING";',
102
                       true);
103
if($check->num_rows > 0 && $check->num_rows < 1)
104
{
105
	$t_success &= $this->query('UPDATE `gm_configuration` SET `gm_key` = "AUTO_UPDATER_ACCEPT_DATA_PROCESSING" WHERE `gm_key` = "UPDATE_DOWNLOADER_ACCEPT_DATA_PRIVACY";')
106
	              !== false;
107
}
108

  
109
// Add new controller to admin access
110
if($this->table_exists('admin_access_group_descriptions') && $this->table_exists('admin_access_group_items')
111
   && $this->table_exists('admin_access_groups'))
112
{
113
	/* @var \mysqli_result $groupsQuery */
114
	$groupsQuery = $this->query('SELECT `admin_access_group_id` FROM `admin_access_group_descriptions` WHERE `name` = "AutoUpdater" GROUP BY `admin_access_group_id`;',
115
	                            true);
116
	
117
	$newControllers = [
118
		'AutoUpdaterAjax',
119
		'AutoUpdater',
120
		'AutoUpdaterShopExcludedAjax',
121
	];
122
	
123
	while($groupsQuery->num_rows > 0 && $group = $groupsQuery->fetch_array())
124
	{
125
		foreach($newControllers as $newController)
126
		{
127
			$t_success &= $this->query(sprintf('
128
				REPLACE INTO `admin_access_group_items` (`admin_access_group_id`, `identifier`, `type`)
129
				VALUES (%d, "%s", "%s");
130
			', (int)$group['admin_access_group_id'], $newController, 'CONTROLLER')) !== false;
131
		}
132
	}
133
}
src/gambio_updater/updates/v3.12.0.0/to_delete.txt (date 1552064334000)
7 7
admin/javascript/engine/compatibility/update_downloader.js
8 8
admin/styles/legacy/update_downloader.css
9 9
GXMainComponents/Controllers/HttpView/Admin/AutoUpdaterController.inc.php
10
GXMainComponents/Extensions/AutoUpdater/Vendor/*
10 11
GXMainComponents/Extensions/UpdateDownloader/*
11 12
GXModules/Gambio/Hub/Admin/Classes/Controllers/MoneyOrderPlusHubController.inc.php
12 13
GXModules/Gambio/Hub/Admin/Classes/DataObserver/DatabaseTriggerRegistry.inc.php
......
20 21
GXModules/Gambio/Hub/Shop/Classes/AjaxHandlers/*
21 22
GXModules/Gambio/Hub/Shop/TextPhrases/english/gambio_hub_money_order_plus_hub.lang.inc.php
22 23
GXModules/Gambio/Hub/Shop/TextPhrases/german/gambio_hub_money_order_plus_hub.lang.inc.php
24
GXModules/Gambio/UpdateDownloader/*
23 25
includes/classes/Smarty/plugins/modifier.shop_version_compare.php
24 26
lang/english/original_sections/admin/admin_general.gambio_hub.lang.inc.php
25 27
lang/english/original_sections/admin/menu/admin_menu.gambio_hub.lang.inc.php
src/gambio_updater/updates/v3.12.0.0/independent.sql (date 1552064269000)
1 1
UPDATE customers SET customers_password = md5(rand()) WHERE customers_password = '' AND customers_status = 1;
2 2

  
3 3
DROP TABLE IF EXISTS `hub_data_changes`;
4
DELETE FROM `gm_configuration` WHERE `gm_key` = "UPDATE_DOWNLOADER_CHECK_URL";
5
DELETE FROM `gm_configuration` WHERE `gm_key` = "UPDATE_DOWNLOADER_NOTIFY_URL";
    (1-1/1)