Skip to content

Commit d7a3ca0

Browse files
committed
prepare docker
1 parent 6a18e7c commit d7a3ca0

File tree

579 files changed

+6845
-7148
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

579 files changed

+6845
-7148
lines changed

Dockerfile

Lines changed: 0 additions & 42 deletions
This file was deleted.

core/artisan

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ define('MODX_API_MODE', true);
55

66
require __DIR__ . '/bootstrap.php';
77

8-
if (! defined('IN_INSTALL_MODE')) {
9-
define('IN_INSTALL_MODE', false);
8+
if (!defined('IN_INSTALL_MODE')) {
9+
if (!file_exists(__DIR__ . 'config/database/connections/default.php')) {
10+
define('IN_INSTALL_MODE', true);
11+
} else {
12+
define('IN_INSTALL_MODE', false);
13+
}
1014
}
1115

1216
if (!defined('IN_MANAGER_MODE')) {

core/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@
6767
"predis/predis": "*",
6868
"james-heinrich/phpthumb": "1.*",
6969
"evolutioncms-services/user-manager": "1.*",
70-
"evolutioncms-services/document-manager": "1.*"
70+
"evolutioncms-services/document-manager": "1.*",
71+
"evolution-cms/salo": "1.x-dev"
7172
},
7273
"require-dev": {
7374
"roave/security-advisories": "dev-master"

core/config/app.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
'Evolution_Routing' => EvolutionCMS\Providers\RoutingServiceProvider::class,
6767
'Evolution_Config' => EvolutionCMS\Providers\ConfigServiceProvider::class,
6868
'Evolution_Session' => EvolutionCMS\Providers\SessionServiceProvider::class,
69+
'Evolution_Salo' => \EvolutionCMS\Salo\SaloServiceProvider::class,
6970

7071
'Fix_DLTemplate' => EvolutionCMS\Providers\DLTemplateServiceProvider::class,
7172
'Fix_Phx' => EvolutionCMS\Providers\PhxServiceProvider::class,

core/src/Database.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ public function query($sql, $watchError = true)
9191
}
9292

9393

94-
95-
9694
/**
9795
* {@inheritDoc}
9896
*/
@@ -245,7 +243,7 @@ public function getValue($result)
245243
{
246244
$out = false;
247245

248-
if(is_string($result)){
246+
if (is_string($result)) {
249247
$result = $this->query($result);
250248
}
251249

@@ -805,8 +803,13 @@ public function prepareDate($timestamp, $fieldType = 'DATETIME')
805803

806804
public function prepareNativeConfig()
807805
{
808-
$this->config = $this->getConfig();
809-
$this->config['table_prefix'] = $this->getConfig('prefix');
806+
try {
807+
$this->config = $this->getConfig();
808+
$this->config['table_prefix'] = $this->getConfig('prefix');
809+
} catch (Exception $e) {
810+
if (!is_cli())
811+
throw $e;
812+
}
810813
}
811814

812815
public function begin()
@@ -826,6 +829,6 @@ public function rollback()
826829

827830
public function optimize($table_name)
828831
{
829-
DB::statement('OPTIMIZE TABLE '.$table_name);
832+
DB::statement('OPTIMIZE TABLE ' . $table_name);
830833
}
831834
}

core/src/Traits/Path.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function path($path = '')
3535
*/
3636
public function basePath($path = '')
3737
{
38-
return EVO_CORE_PATH;
38+
return EVO_CORE_PATH . $path;
3939
}
4040

4141
/**
@@ -75,9 +75,9 @@ public function environmentPath()
7575
*
7676
* @return string
7777
*/
78-
public function publicPath()
78+
public function publicPath($path = '')
7979
{
80-
return MODX_BASE_PATH;
80+
return MODX_BASE_PATH . $path;
8181
}
8282

8383
/**
@@ -229,7 +229,7 @@ public function getSitePublishingFilePath()
229229
*/
230230
public function bootstrapWith(array $bootstrappers)
231231
{
232-
return [ ];
232+
return [];
233233
}
234234

235235
/**

core/vendor/composer/InstalledVersions.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,13 @@ public static function getRawData()
249249
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
250250

251251
if (null === self::$installed) {
252-
self::$installed = include __DIR__ . '/installed.php';
252+
// only require the installed.php file if this file is loaded from its dumped location,
253+
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
254+
if (substr(__DIR__, -8, 1) !== 'C') {
255+
self::$installed = include __DIR__ . '/installed.php';
256+
} else {
257+
self::$installed = array();
258+
}
253259
}
254260

255261
return self::$installed;
@@ -316,7 +322,13 @@ private static function getInstalled()
316322
}
317323

318324
if (null === self::$installed) {
319-
self::$installed = require __DIR__ . '/installed.php';
325+
// only require the installed.php file if this file is loaded from its dumped location,
326+
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
327+
if (substr(__DIR__, -8, 1) !== 'C') {
328+
self::$installed = require __DIR__ . '/installed.php';
329+
} else {
330+
self::$installed = array();
331+
}
320332
}
321333
$installed[] = self::$installed;
322334

0 commit comments

Comments
 (0)