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 #1414 from evolution-cms/master
Browse files Browse the repository at this point in the history
1.4.4
  • Loading branch information
Dmi3yy committed Jun 20, 2018
2 parents c79c717 + 9b79900 commit 83ab6d1
Show file tree
Hide file tree
Showing 197 changed files with 4,951 additions and 2,953 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

# Manager
/manager/includes/config.inc.php
/manager/includes/config_mutator.php

# Composer
/composer.phar
Expand All @@ -71,4 +72,4 @@ Desktop.ini
.rocketeer

# except do not ignore .gitignore
!.gitignore
!.gitignore
126 changes: 126 additions & 0 deletions assets/docs/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,132 @@
This file shows the changes in recent releases of Evolution CMS. The most current release is usually the
development release, and is only shown to give an idea of what's currently in the pipeline.

Evolution CMS 1.4.4 (Jun 08, 2018)
* [GitHub:#5d177a4ea] - [I] Auto set Sender (Евгений Борисов)
* [GitHub:#f13d19d60] - [I] Move color switcher icon (Mr B)
* [GitHub:#ee5cb56b2] - [I] Remove css / colour switch conflict (Mr B)
* [GitHub:#32d2165c7] - [I] Update save_user.processor.php (Mr B)
* [GitHub:#a450d22af] - [I] Trim user/webuser email address (Mr B)
* [GitHub:#cdbeaf8b9] - [I] Update web_user_management.static.php (Mr B)
* [GitHub:#82cda9654] - [I] Replace gender on user/webuser tables (Mr B)
* [GitHub:#b9c3e474c] - [F] - Ignored if default class is extended (Евгений Борисов)
* [GitHub:#dda339c27] - [I] config_mutator.php (Agel_Nash)
* [GitHub:#cb55e213c] - [I] Define MODX_CLI (Agel_Nash)
* [GitHub:#a3fc8c57c] - [I] refactoring webAlertAndQuit (Agel_Nash)
* [GitHub:#bbefb5a28] - [I] $_lang['invalid_event_response'] (Agel_Nash)
* [GitHub:#c60c6a8e6] - [I] OnBeforeMinifyCss (Agel_Nash)
* [GitHub:#81c160eea] - [I] Native support mixed types in a output statement (Agel_Nash)
* [GitHub:#019462178] - [F] Conflict with DLTemplate::renderDoc() (Евгений Борисов)
* [GitHub:#0f0095dd7] - [F] style for 1200px - (dmi3yy)
* [GitHub:#21b31569c] - Update preload.functions.inc.php (Евгений Борисов)
* [GitHub:#d568f89d2] - [I] Code style (Agel_Nash)
* [GitHub:#769270b96] - [S] Cross-Site Scripting https://www.exploit-db.com/exploits/44775/ Site name field XSS fix: https://github.com/nathunandwani/ClipperCMS/commit/f286fbfa81dc3728dbbf6d9d817c8848edcad0b2 (Agel_Nash)
* [GitHub:#ddb47a7d0] - [F] Fix buttons transition and focus background-color (Serg)
* [GitHub:#5edac57c8] - [I] Moving tv parameters without a category to the General tab (Serg)
* [GitHub:#2950b760d] - [F] correct install finish (dmi3yy)
* [GitHub:#ebed40c60] - [F] undeclared variable (Serg)
* [GitHub:#f399f2ea8] - [F] broken OnParseProperties event (Pathologic)
* [GitHub:#ef95a606a] - [F] update DocLister and FormLister (dmi3yy)
* [GitHub:#8c873d61a] - [F] Update tab6_filemanager_settings.inc.php (Mr B)
* [GitHub:#3608ab90f] - [F] Update tab5_security_settings.inc.php (Mr B)
* [GitHub:#0c2fa0ddd] - [I] Add missing events for System Settings tabs (Mr B)
* [GitHub:#323e9cdc9] - [F] tab3 invokeEvent to last tr (Mr B)
* [GitHub:#8d1a0ebac] - [F] revert tab change (Mr B)
* [GitHub:#aff400f72] - [F] Correct message urls (Mr B)
* [GitHub:#6fa23c6a7] - [I] Show element icon (Mr B)
* [GitHub:#7b3692125] - [F] fix locked (Ser1ous)
* [GitHub:#e32d25e19] - [F] Fix strict mode bug on get tv list (Ser1ous)
* [GitHub:#67117ab6b] - [F] fix error log in phpmailer (Pathologic)
* [GitHub:#569a1533c] - [I] singleton (Pathologic)
* [GitHub:#946f7f5de] - [F] fix code format (Ser1ous)
* [GitHub:#bb174a09d] - [I] Ctr+Alt+L on PhpStorm (Ser1ous)
* [GitHub:#4c5a44233] - [I] Add event pub/unpub documents (Ser1ous)
* [GitHub:#99edc5fb5] - [F] Fix ios iframe scroll so only applied to ios (Mr B)
* [GitHub:#bd7237579] - [F] Update qm.inc.php (Mr B)
* [GitHub:#2905e58c7] - [I] Give custom QM buttons a title (Mr B)
* [GitHub:#d287e2b85] - [F] Update execute_module.processor.php (Mr B)
* [GitHub:#12c151b13] - [I] Make store fit iframe width (Mr B)
* [GitHub:#ccb4ac7a6] - [I] Change html check for scroller (Mr B)
* [GitHub:#e100bef00] - [I] iframe scroller for for Module if no need fix add to GET &api=1 (dmi3yy)
* [GitHub:#97179a3bd] - [I] Stacked table cells for system configuration (Piotr Matysiak)
* [GitHub:#84617f23b] - [I] Stacked table cells on small screens (Piotr Matysiak)
* [GitHub:#4db235560] - [F] fix for module iframe scrolling (Mr B)
* [GitHub:#c07af3d5f] - [F] Update modx.min.js (Mr B)
* [GitHub:#c84388af0] - [I] Restrict menu tree auto hide to small mobile (Mr B)
* [GitHub:#7acb549af] - [I] Polish translation (Piotr Matysiak)
* [GitHub:#dbd75f74f] - [I] move login page and menu setting to tab 4 (dmi3yy)
* [GitHub:#f266be8b6] - [F] TinyMCE darcness theme by default - need set lightgray by default #613 (dmi3yy)
* [GitHub:#5c6d120ed] - [F] update DocLister 2.3.15 (dmi3yy)
* [GitHub:#8aed61699] - [F] update FormLister to 1.7.19 (dmi3yy)
* [GitHub:#10a9a62b0] - [I] add params for manager_menu_position (dmi3yy)
* [GitHub:#816c645a0] - [F] welcome widget fix (Piotr Matysiak)
* [GitHub:#cc0e2294c] - [F] Fix manager restrict by day login (Mr B)
* [GitHub:#3658514a8] - [I] welcome widget change (Piotr Matysiak)
* [GitHub:#631286ca9] - [F] welcome and online widgets stacked (Piotr Matysiak)
* [GitHub:#a0198c207] - [F] #650 Display valid-hostnames after setting them (Deesen)
* [GitHub:#ffd97e6bf] - [F] #616 Fix TinyMCE4 custom-theme´s toolbars with global settings (Deesen)
* [GitHub:#657088dc1] - [F] Update .htaccess (Евгений Борисов)
* [GitHub:#454f4f975] - [F] Update index.css (Mr B)
* [GitHub:#bdc53cbf2] - [F] Update modx.min.js (Mr B)
* [GitHub:#135e9b047] - [F] Update modx.js (Mr B)
* [GitHub:#009388364] - [F] iOS iframe Scrolling/jumping (Mr B)
* [GitHub:#bec6c2f09] - [F] #643 Fix TinyMCE4 mobile-mode (Deesen)
* [GitHub:#c26f0eaa6] - [I] Add space to bottom of menu tree (Mr B)
* [GitHub:#8ecd06ecf] - [I] Remove 'Top how many' option as not used (Mr B)
* [GitHub:#30673e780] - refactor stay icons (Serg)
* [GitHub:#adc145943] - [S] Secutiy fix for old version (dmi3yy)
* [GitHub:#1c7f67c1b] - [F] #629 Fix issue with HTTP2/SSL & check connection to server (Deesen)
* [GitHub:#aa7892eea] - [F] store sql fixed (mnoskov)
* [GitHub:#4e6d54387] - [F] box-shadow (Piotr Matysiak)
* [GitHub:#57821c93c] - [I] Remove scrollbars in centered layout (Piotr Matysiak)
* [GitHub:#be9830839] - [I] Login form positions (Piotr Matysiak)
* [GitHub:#e6fec0458] - [F] Set loginbox position CSS class (Piotr Matysiak)
* [GitHub:#160590f23] - [I] Login page - set images placeholders (Piotr Matysiak)
* [GitHub:#009833f50] - [I] Manager Polish Translation update (Piotr Matysiak)
* [GitHub:#28a082472] - [I] Manager Polish Translation (Piotr Matysiak)
* [GitHub:#b69d83b50] - [I] Optimized images (Piotr Matysiak)
* [GitHub:#60cc4b893] - [I] First commit of new login page (Piotr Matysiak)
* [GitHub:#0e628b256] - [I] setting for customize login page (dmi3yy)
* [GitHub:#9b0f507c2] - [F] for TinyMCE skin by default lightgray (dmi3yy)
* [GitHub:#73ebfee5a] - [F] missing tabheader border (Piotr Matysiak)
* [GitHub:#0840e3a31] - [F] minify css default theme (Serg)
* [GitHub:#3cf94bf7d] - [F] width auto for select size=1 (Serg)
* [GitHub:#c2a4032d7] - [F] logo page help (Serg)
* [GitHub:#74da26055] - [F] class input-group-addon (Serg)
* [GitHub:#f8f91e41a] - [F] pagination darkness theme (Serg)
* [GitHub:#4eb2414d3] - [F] hover background-color mainMenu item version (Serg)
* [GitHub:#19b1f5534] - [F] fix for darkness mode (Piotr Matysiak)
* [GitHub:#27b5a37fb] - [F] Fix missing border (Piotr Matysiak)

Evolution CMS 1.4.3 (Apr 04, 2018)
* [GitHub:#e10383b14] - update DocLister (dmi3yy)
* [GitHub:#2654f2c59] - update Formlister (dmi3yy)
* [GitHub:#64c4e9adf] - add select for theme mode in managers settings (dmi3yy)
* [GitHub:#44f8f6c88] - fix for not touch composer.json on update (dmi3yy)
* [GitHub:#4fd89e618] - add Darkness style for tinyMCE (dmi3yy)
* [GitHub:#8526ee4b5] - add styles for modes theme (Serg)
* [GitHub:#097a1076b] - more checks in cli mode (Pathologic)
* [GitHub:#6fb277896] - Missing introtext in Recent Resources (Piotr Matysiak)
* [GitHub:#998f3a2fa] - Fix #603 bug for resource tree scrolling (Piotr Matysiak)
* [GitHub:#f8c17c495] - moved JS code to a file manager/media/script/main.js (Serg)
* [GitHub:#060e49f1d] - fix empty template on save tv (Serg)
* [GitHub:#3fb227540] - [F] #577 Fix TinyMCE for [*introtext*] (Deesen)
* [GitHub:#1a5a68027] - Fix Extras buttons on 1.4.1 #571 (dmi3yy)
* [GitHub:#263737fbe] - add user_agent info to manager_log (dmi3yy)
* [GitHub:#36dfe9c6d] - write manager IP address to manager_log (dmi3yy)
* [GitHub:#8a3bee0ce] - new settings manager_theme_mode (dmi3yy)
* [GitHub:#745f633af] - setting color schema for manager template (dmi3yy)
* [GitHub:#f25ec1e59] - fix 577 TinyMCE introtext mode not work (dmi3yy)
* [GitHub:#d27e12bdc] - fix notice (Serg)
* [GitHub:#10ce1f270] - fix TinyMCE disable after update to 1.4.2 (dmi3yy)
* [GitHub:#dc06fb72f] - fix possible wrong path calculation (Pathologic)
* [GitHub:#b6fecddec] - [I] Wrap TinyMCE3 Toolbar (Mr B)
* [GitHub:#f55089ba7] - [F] Prevent long select option text values overflowing container (Mr B)
* [GitHub:#40f2a53d4] - add view ability for ini files in manager files (dmi3yy)
* [GitHub:#d3117b1c2] - fix demo site (Formlister, param reply-to) (dmi3yy)
* [GitHub:#a5aff20db] - formlister fix typo (dmi3yy)


Evolution CMS 1.4.2 (Mar 23, 2018)
* [GitHub:#6a33e6f2b] - now you can use argv like this: php cli-install.php --database_server=localhost --database=db --database_user=dbuser --database_password=dbpass --table_prefix=evo_ --cmsadmin=admin [email protected] --cmspassword=123456 --language=ru --mode=new --installData=n --removeInstall=y (dmi3yy)
* [GitHub:#d8e7ec072] - run install file (dmi3yy)
Expand Down
Binary file added assets/js/easy-ui/themes/modx/images/loading.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions assets/lib/APIHelpers.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,39 @@ public static function checkString($value, $minLen = 1, $alph = array(), $mixArr
return $flag;
}

/**
* @param $IDs
* @param string $sep
* @param integer[] $ignore
* @return array
* @throws Exception
*/
public static function cleanIDs($IDs, $sep = ',', $ignore = array())
{
$out = array();
if (!is_array($IDs)) {
if (is_scalar($IDs)) {
$IDs = explode($sep, $IDs);
} else {
$IDs = array();
throw new Exception('Invalid IDs list <pre>' . print_r($IDs, 1) . '</pre>');
}
}
foreach ($IDs as $item) {
$item = trim($item);
if (is_scalar($item) && (int)$item >= 0) { //Fix 0xfffffffff
if (!empty($ignore) && in_array((int)$item, $ignore, true)) {
$this->log[] = 'Ignore id ' . (int)$item;
} else {
$out[] = (int)$item;
}
}
}
$out = array_unique($out);

return $out;
}

/**
* Переменовывание элементов массива
*
Expand Down
21 changes: 1 addition & 20 deletions assets/lib/MODxAPI/MODx.php
Original file line number Diff line number Diff line change
Expand Up @@ -559,26 +559,7 @@ public function isChanged($key)
*/
final public function cleanIDs($IDs, $sep = ',', $ignore = array())
{
$out = array();
if (!is_array($IDs)) {
if (is_scalar($IDs)) {
$IDs = explode($sep, $IDs);
} else {
$IDs = array();
throw new Exception('Invalid IDs list <pre>' . print_r($IDs, 1) . '</pre>');
}
}
foreach ($IDs as $item) {
$item = trim($item);
if (is_scalar($item) && (int)$item >= 0) { //Fix 0xfffffffff
if (!empty($ignore) && in_array((int)$item, $ignore, true)) {
$this->log[] = 'Ignore id ' . (int)$item;
} else {
$out[] = (int)$item;
}
}
}
$out = array_unique($out);
$out = APIhelpers::cleanIDs($IDs, $sep, $ignore);

return $out;
}
Expand Down
2 changes: 1 addition & 1 deletion assets/lib/MODxAPI/modManagers.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function edit($id)
$result = $this->query("
SELECT * from {$this->makeTable('user_attributes')} as attribute
LEFT JOIN {$this->makeTable('manager_users')} as user ON user.id=attribute.internalKey
WHERE BINARY {$find}='{$this->escape($id)}'
WHERE {$find}='{$this->escape($id)}'
");
$this->field = $this->modx->db->getRow($result);

Expand Down
30 changes: 19 additions & 11 deletions assets/lib/MODxAPI/modResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ public function get($key)
$tvID = APIHelpers::getkey($this->tv, $key, 0);
if (in_array($tvID, $tvTPL) && is_null($out)) {
$out = APIHelpers::getkey($this->tvd, $key, null);
$out = $out['default'];
}
}

Expand Down Expand Up @@ -444,7 +445,7 @@ public function create($data = array())
$this->close();
$fld = array();
foreach ($this->tvd as $name => $tv) {
$fld[$name] = $tv;
$fld[$name] = $tv['default'];
};
$this->store($fld);

Expand All @@ -468,24 +469,29 @@ public function edit($id)
$this->close();
$this->markAllEncode();
$this->newDoc = false;

$result = $this->query("SELECT * from {$this->makeTable('site_content')} where `id`=" . (int)$id);
$this->fromArray($this->modx->db->getRow($result));
$result = $this->query("SELECT * from {$this->makeTable('site_tmplvar_contentvalues')} where `contentid`=" . (int)$id);
while ($row = $this->modx->db->getRow($result)) {
$this->field[$this->tvid[$row['tmplvarid']]] = $row['value'];
}
$fld = array();
foreach ($this->tvd as $name => $tv) {
if ($this->belongsToTemplate($this->tv[$name])) {
$fld[$name] = $tv['default'];
}
};
$this->store(array_merge($fld, $this->field));
if (empty($this->field['id'])) {
$this->id = null;
} else {
$this->id = $this->field['id'];
$this->set('editedby', null)->touch();
$this->decodeFields();
}
$this->store($this->toArray(null, null, null, false));
unset($this->field['id']);
}

return $this;
}

Expand Down Expand Up @@ -590,7 +596,7 @@ public function save($fire_events = false, $clearCache = false)
foreach ($fld as $key => $value) {
if (empty($this->tv[$key]) || !$this->isChanged($key) || !$this->belongsToTemplate($this->tv[$key])) {
continue;
} elseif ($value === '') {
} elseif ($value === '' || is_null($value) || (isset($this->tvd[$key]) && $value == $this->tvd[$key]['default'])) {
$_deleteTVs[] = $this->tv[$key];
} else {
$_insertTVs[$this->tv[$key]] = $this->escape($value);
Expand Down Expand Up @@ -794,7 +800,7 @@ protected function checkAlias($alias)
*/
public function issetField($key)
{
return (array_key_exists($key, $this->default_field) || array_key_exists($key, $this->tv));
return (array_key_exists($key, $this->default_field) || (array_key_exists($key, $this->tv) && $this->belongsToTemplate($this->tv[$key])));
}

/**
Expand All @@ -806,12 +812,14 @@ protected function get_TV($reload = false)
$this->modx->_TVnames = $this->loadFromCache('_TVnames');
if ($this->modx->_TVnames === false || empty($this->modx->_TVnames) || $reload) {
$this->modx->_TVnames = array();
$result = $this->query('SELECT `id`,`name`,`default_text`,`type` FROM ' . $this->makeTable('site_tmplvars'));
$result = $this->query('SELECT `id`,`name`,`default_text`,`type`,`display`,`display_params` FROM ' . $this->makeTable('site_tmplvars'));
while ($row = $this->modx->db->GetRow($result)) {
$this->modx->_TVnames[$row['name']] = array(
"id" => $row['id'],
"type" => $row['type'],
"default" => $row['default_text']
'id' => $row['id'],
'type' => $row['type'],
'default' => $row['default_text'],
'display' => $row['display'],
'display_params' => $row['display_params']
);
}
$this->saveToCache($this->modx->_TVnames, '_TVnames');
Expand Down Expand Up @@ -861,7 +869,7 @@ protected function loadTVDefault(array $tvId = array())
$this->tvd = array();
foreach ($tvId as $id) {
$name = $this->tvid[$id];
$this->tvd[$name] = $this->modx->_TVnames[$name]['default'];
$this->tvd[$name] = $this->modx->_TVnames[$name];
}
}

Expand Down
Loading

0 comments on commit 83ab6d1

Please sign in to comment.