Skip to content
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.

Commit

Permalink
Merge pull request #3 from evolution-cms/2.1.x
Browse files Browse the repository at this point in the history
2.1.x
  • Loading branch information
dkoroliov authored Jul 3, 2020
2 parents 69ac6b3 + 58f140b commit 67e66e6
Show file tree
Hide file tree
Showing 167 changed files with 12,143 additions and 10,561 deletions.
9 changes: 4 additions & 5 deletions assets/plugins/codemirror/codemirror.plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
*/
switch($modx->event->name) {
case 'OnTempFormRender' :
$object_name = $content['templatename'];
$rte = ($prte ? $prte : 'none');
break;
case 'OnChunkFormRender' :
Expand All @@ -72,7 +71,6 @@
return;
}
$textarea_name = $modx->event->params['elements'];
$object_name = $content['pagetitle'];
$rte = 'none';
$tvMode = true;
$contentType = $content['contentType'] ? $content['contentType'] : $modx->event->params['contentType'];
Expand Down Expand Up @@ -104,7 +102,6 @@
return;
}
$textarea_name = 'ta';
$object_name = isset($content['pagetitle']) ? $content['pagetitle'] : '';
$xrte = (('htmlmixed' == $mode) ? $xrte : 0);
$rte = ($prte ? $prte : (isset($content['id']) ? ($xrte ? $srte : 'none') : $srte));
$contentType = $content['contentType'];
Expand Down Expand Up @@ -344,8 +341,10 @@ function makeMarker(symbol) {
} else {
$setHeight = '';
};

$object_id = md5($modx->event->name . '-' . $content['id'] . '-' . $el);
if(isset($content['id']))
$object_id = md5($modx->event->name . '-' . $content['id'] . '-' . $el);
else
$object_id = md5($modx->event->name . '-' . $el);

$output .= "
<script>
Expand Down
3 changes: 3 additions & 0 deletions core/artisan
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ define('MODX_API_MODE', true);

require __DIR__ . '/bootstrap.php';

if (! defined('IN_INSTALL_MODE')) {
define('IN_INSTALL_MODE', false);
}
/*
|--------------------------------------------------------------------------
| Run The Artisan Application
Expand Down
3 changes: 2 additions & 1 deletion core/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@
"tracy/tracy": "~2.5",
"wikimedia/composer-merge-plugin": "dev-master",
"symfony/process": "^4.3",
"i-rocky/eloquent-dynamic-relation": "^1.0"
"i-rocky/eloquent-dynamic-relation": "^1.0",
"dmitry-suffi/redis-session-handler": "*"
},
"require-dev": {
"roave/security-advisories": "dev-master"
Expand Down
2 changes: 2 additions & 0 deletions core/config/database/default.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
return 'default';
6 changes: 5 additions & 1 deletion core/config/database/migrations.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
<?php
return 'migrations';
if (IN_INSTALL_MODE === false)
return 'migrations';
else
return 'migrations_install';

6 changes: 3 additions & 3 deletions core/factory/version.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
return [
'version' => '2.0.2', // Current version number
'release_date' => 'Mar 13, 2020', // Date of release
'version' => '2.1.0', // Current version number
'release_date' => 'Jul 1, 2020', // Date of release
'branch' => 'Evolution CMS', // Codebase name
'full_appname' => 'Evolution CMS 2.0.2 (Mar 13, 2020)'
'full_appname' => 'Evolution CMS 2.1.0 (Jul 1, 2020)'
];
219 changes: 94 additions & 125 deletions core/functions/nodes.php

Large diffs are not rendered by default.

15 changes: 12 additions & 3 deletions core/functions/preload.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ function startCMSSession()
, $secure
, true
);

if (SESSION_STORAGE == 'redis' && class_exists('Redis')) {
$redis = new Redis();
if ($redis->connect(REDIS_HOST, REDIS_PORT) && $redis->select(0)) {
$handler = new \suffi\RedisSessionHandler\RedisSessionHandler($redis);
session_set_save_handler($handler);
}
}

session_start();
$key = "modx.mgr.session.cookie.lifetime";

Expand Down Expand Up @@ -125,7 +134,7 @@ function removeInvalidCmsSessionIds($session_name)
* @param int $depth
* @return array|string
*/
function modx_sanitize_gpc(& $values, $depth = 0)
function modx_sanitize_gpc(&$values, $depth = 0)
{
if (200 < $depth) {
exit('GPC Array nested too deep!');
Expand All @@ -148,7 +157,7 @@ function modx_sanitize_gpc(& $values, $depth = 0)
}
}

if (! function_exists('getSanitizedValue')) {
if (!function_exists('getSanitizedValue')) {
/**
* @param string $value
* @return string
Expand Down Expand Up @@ -177,7 +186,7 @@ function getSanitizedValue($value = '')
return $value;
}
}
if (! function_exists('removeSanitizeSeed')) {
if (!function_exists('removeSanitizeSeed')) {
/**
* @param string $string
* @return string
Expand Down
Loading

0 comments on commit 67e66e6

Please sign in to comment.