Skip to content

Commit 724de67

Browse files
committed
Merge branch 'develop'
2 parents d744a3a + 065836d commit 724de67

25 files changed

+1136
-392
lines changed

assets/docs/changelog.txt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,44 @@
11
This file shows the changes in recent releases of MODX. The most current release is usually the
22
development release, and is only shown to give an idea of what's currently in the pipeline.
33

4+
Evolution CMS 1.3.0(Jul 10, 2017)
5+
* [GitHub:#3dda520a] - [R] update sortables list delete mootools sortables (64j)
6+
* [GitHub:#9cafe6db] - [F] fix toggle menu (64j)
7+
* [GitHub:#6c316c18] - [I] Update DocLister add DLmenu (dmi3yy)
8+
* [GitHub:#fd23c498] - [I] Update FormLister to 1.7.3 (dmi3yy)
9+
* [GitHub:#30a552fd] - [F] fix autoloader paths (Pathologic)
10+
* [GitHub:#21ec58cf] - [F] fix show icon dragndrop (Serg)
11+
* [GitHub:#56f57ec1] - [F] fix for OnManagerNodePrerender (dmi3yy)
12+
* [GitHub:#aa04955b] - [F] fix issues #60 (Serg)
13+
* [GitHub:#14503447] - [F] fix issues #62 (Serg)
14+
* [GitHub:#c316e0d7] - [F] update tv rank (64j)
15+
* [GitHub:#534deada] - [F] fix width logo in IE (64j)
16+
* [GitHub:#0c3f8780] - [R] update plugins priority (64j)
17+
* [GitHub:#aee4c3ed] - [R] format code style logs (64j)
18+
* [GitHub:#8777bbf3] - [F] fix file managment (64j)
19+
* [GitHub:#eaaaf777] - [R] upd actions buttons managment files (64j)
20+
* [GitHub:#16cbb4f1] - [F] fix showChildren in tree (64j)
21+
* [GitHub:#9258c4be] - [R] update actionbuttons (64j)
22+
* [GitHub:#92f954fa] - [F] fixed issues #15 (64j)
23+
* [GitHub:#328ad309] - [F] fix #12 (dmi3yy)
24+
* [GitHub:#2bcc9874] - [F] change home ico from modx to home ) (dmi3yy)
25+
* [GitHub:#626b416f] - [F] fix bkmanager header error (dmi3yy)
26+
* [GitHub:#c43f140e] - [F] fix #9 (dmi3yy)
27+
* [GitHub:#9da575f7] - [F] add favicon (64j)
28+
* [GitHub:#2ff3f724] - [R] update loader (64j)
29+
* [GitHub:#8df7c747] - [F] for update from older version (from security-fix) (dmi3yy)
30+
* [GitHub:#f17a35ab] - [R] ajaxSearch 1.11.0 no use index-ajax.php for ajax (dmi3yy)
31+
* [GitHub:#78e656e6] - [I] add updater plugin in core (dmi3yy)
32+
* [GitHub:#8bbe38ae] - [F] Error : Undefined property (Serg)
33+
* [GitHub:#ca775306] - [R] min php version set to 5.4 (dmi3yy)
34+
* [GitHub:#95ea0349] - [F] update lang (dmi3yy)
35+
* [GitHub:#e6224f43] - [С] rename modx to EVO (dmi3yy)
36+
* [GitHub:#9e319a67] - [F] fix file path (dmi3yy)
37+
* [GitHub:#524052e3] - [С] move new file from theme to core (dmi3yy)
38+
* [GitHub:#1af46a1c] - [С] change logos, delete old theme, rename new theme to default (dmi3yy)
39+
* [GitHub:#14d2a8f2] - [F] fix mysql_info (dmi3yy)
40+
41+
442
MODX Evolution 1.2.2(Jul 10, 2017)
543
* [GitHub:#99d1b62cd] - [F] fix properties for instal snippet,modules,plugins (dmi3yy)
644
* [GitHub:#e18d5d373] - [F] mm multiplefields for php 7 (dmi3yy)

assets/snippets/DocLister/core/controller/onetable.php

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,15 @@ public function _render($tpl = '')
9898
"dl") . '.iteration'] = $i; //[+iteration+] - Number element. Starting from zero
9999

100100
$date = $this->getCFGDef('dateSource', 'pub_date');
101-
$date = isset($item[$date]) ? $item[$date] + $this->modx->config['server_offset_time'] : '';
102-
if ($date != '' && $this->getCFGDef('dateFormat', '%d.%b.%y %H:%M') != '') {
103-
$item[$this->getCFGDef("sysKey", "dl") . '.date'] = strftime($this->getCFGDef('dateFormat',
104-
'%d.%b.%y %H:%M'), $date);
101+
if (isset($item[$date])) {
102+
$_date = is_numeric($item[$date]) && $item[$date] == (int)$item[$date] ? $item[$date] : strtotime($item[$date]);
103+
if ($_date !== false) {
104+
$_date = $_date + $this->modx->config['server_offset_time'];
105+
$dateFormat = $this->getCFGDef('dateFormat', '%d.%b.%y %H:%M');
106+
if ($dateFormat) {
107+
$item['date'] = strftime($dateFormat, $_date);
108+
}
109+
}
105110
}
106111

107112
$findTpl = $this->renderTPL;
@@ -163,18 +168,24 @@ public function getJSON($data, $fields, $array = array())
163168
*/
164169
$extE = $this->getExtender('e', true, true);
165170

166-
foreach ($data as $num => $item) {
167-
$row = $item;
171+
foreach ($data as $num => $row) {
168172

169173
switch (true) {
170174
case ((array('1') == $fields || in_array('summary', $fields)) && $extSummary):
171-
$row['summary'] = $this->getSummary($this->_docs[$num], $extSummary, 'introtext');
175+
$row['summary'] = $this->getSummary($row, $extSummary, 'introtext');
172176
//without break
173177
case ((array('1') == $fields || in_array('date', $fields)) && $date != 'date'):
174-
$tmp = (isset($this->_docs[$num][$date]) && $date != 'createdon' && $this->_docs[$num][$date] != 0 && $this->_docs[$num][$date] == (int)$this->_docs[$num][$date]) ? $this->_docs[$num][$date] : $this->_docs[$num]['createdon'];
175-
$row['date'] = strftime($this->getCFGDef('dateFormat', '%d.%b.%y %H:%M'),
176-
$tmp + $this->modx->config['server_offset_time']);
177-
// no break
178+
if (isset($row[$date])) {
179+
$_date = is_numeric($row[$date]) && $row[$date] == (int)$row[$date] ? $row[$date] : strtotime($row[$date]);
180+
if ($_date !== false) {
181+
$_date = $_date + $this->modx->config['server_offset_time'];
182+
$dateFormat = $this->getCFGDef('dateFormat', '%d.%b.%y %H:%M');
183+
if ($dateFormat) {
184+
$row['date'] = strftime($dateFormat, $_date);
185+
}
186+
}
187+
}
188+
//nobreak
178189
}
179190

180191
if ($extE && $tmp = $extE->init($this, array('data' => $row))) {

assets/snippets/DocLister/core/controller/shopkeeper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public function getChildrenCount()
203203
if (trim($where) == 'WHERE') {
204204
$where = '';
205205
}
206-
$group = $this->getGroupSQL($this->getCFGDef('groupBy', 'c.id'));
206+
$group = $this->getGroupSQL($this->getCFGDef('groupBy', ''));
207207
$sort = $this->SortOrderSQL("c.createdon");
208208
list($from) = $this->injectSortByTV($from, $sort);
209209

@@ -251,7 +251,7 @@ protected function getDocList()
251251

252252

253253
$fields = $this->getCFGDef('selectFields', 'c.*');
254-
$group = $this->getGroupSQL($this->getCFGDef('groupBy', 'c.id'));
254+
$group = $this->getGroupSQL($this->getCFGDef('groupBy', ''));
255255
$sort = $this->SortOrderSQL("c.createdon");
256256
list($tbl_site_content, $sort) = $this->injectSortByTV($tbl_site_content . ' ' . $this->_filters['join'],
257257
$sort);
@@ -363,7 +363,7 @@ protected function getChildrenList()
363363
$where = '';
364364
}
365365
$fields = $this->getCFGDef('selectFields', 'c.*');
366-
$group = $this->getGroupSQL($this->getCFGDef('groupBy', 'c.id'));
366+
$group = $this->getGroupSQL($this->getCFGDef('groupBy', ''));
367367
if ($sanitarInIDs != "''" || $this->getCFGDef('ignoreEmpty', '0')) {
368368
$sql = $this->dbQuery("SELECT {$fields} FROM " . $from . " " . $where . " " .
369369
$group . " " .

assets/snippets/DocLister/core/controller/site_content.php

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,15 @@ public function _render($tpl = '')
149149
}
150150

151151
if (isset($item[$date])) {
152+
if (!$item[$date] && $date == 'pub_date' && isset($item['createdon'])) {
153+
$date = 'createdon';
154+
}
152155
$_date = is_numeric($item[$date]) && $item[$date] == (int)$item[$date] ? $item[$date] : strtotime($item[$date]);
153156
if ($_date !== false) {
154157
$_date = $_date + $this->modx->config['server_offset_time'];
155-
if ($this->getCFGDef('dateFormat', '%d.%b.%y %H:%M') != '') {
156-
$item['date'] = strftime($this->getCFGDef('dateFormat', '%d.%b.%y %H:%M'), $_date);
158+
$dateFormat = $this->getCFGDef('dateFormat', '%d.%b.%y %H:%M');
159+
if ($dateFormat) {
160+
$item['date'] = strftime($dateFormat, $_date);
157161
}
158162
}
159163
}
@@ -205,7 +209,6 @@ public function getJSON($data, $fields, $array = array())
205209
$out = array();
206210
$fields = is_array($fields) ? $fields : explode(",", $fields);
207211
$date = $this->getCFGDef('dateSource', 'pub_date');
208-
209212
/**
210213
* @var $extSummary summary_DL_Extender
211214
*/
@@ -221,22 +224,27 @@ public function getJSON($data, $fields, $array = array())
221224
*/
222225
$extE = $this->getExtender('e', true, true);
223226

224-
foreach ($data as $num => $item) {
225-
$row = $item;
227+
foreach ($data as $num => $row) {
226228
if ((array('1') == $fields || in_array('summary', $fields)) && $extSummary) {
227-
$row['summary'] = $this->getSummary($this->_docs[$num], $extSummary, 'introtext', 'content');
229+
$row['summary'] = $this->getSummary($row, $extSummary, 'introtext', 'content');
228230
}
231+
229232
if (array('1') == $fields || in_array('date', $fields)) {
230-
if (isset($this->_docs[$num][$date])) {
231-
$_date = is_numeric($this->_docs[$num][$date]) && $this->_docs[$num][$date] == (int)$this->_docs[$num][$date] ? $this->_docs[$num][$date] : strtotime($this->_docs[$num][$date]);
233+
if (isset($row[$date])) {
234+
if (!$row[$date] && $date == 'pub_date' && isset($row['createdon'])) {
235+
$date = 'createdon';
236+
}
237+
$_date = is_numeric($row[$date]) && $row[$date] == (int)$row[$date] ? $row[$date] : strtotime($row[$date]);
232238
if ($_date !== false) {
233239
$_date = $_date + $this->modx->config['server_offset_time'];
234-
if ($this->getCFGDef('dateFormat', '%d.%b.%y %H:%M') != '') {
235-
$row['date'] = strftime($this->getCFGDef('dateFormat', '%d.%b.%y %H:%M'), $_date);
240+
$dateFormat = $this->getCFGDef('dateFormat', '%d.%b.%y %H:%M');
241+
if ($dateFormat) {
242+
$row['date'] = strftime($dateFormat, $_date);
236243
}
237244
}
238245
}
239246
}
247+
240248
if (array('1') == $fields || in_array(array('menutitle', 'pagetitle'), $fields)) {
241249
$row['title'] = ($row['menutitle'] == '' ? $row['pagetitle'] : $row['menutitle']);
242250
}
@@ -340,11 +348,11 @@ public function getChildrenCount()
340348
if (trim($where) == 'WHERE') {
341349
$where = '';
342350
}
343-
$group = $this->getGroupSQL($this->getCFGDef('groupBy', 'c.id'));
351+
$group = $this->getGroupSQL($this->getCFGDef('groupBy', ''));
344352
$sort = $this->SortOrderSQL("if(c.pub_date=0,c.createdon,c.pub_date)");
345353
list($from) = $this->injectSortByTV($from, $sort);
346354

347-
$q_true = $q_true ? $q_true : $group != 'GROUP BY c.id';
355+
$q_true = $q_true ? $q_true : $group != '';
348356

349357
if ( $q_true ){
350358
$rs = $this->dbQuery("SELECT count(*) FROM (SELECT count(*) FROM {$from} {$where} {$group}) as `tmp`");
@@ -395,7 +403,7 @@ protected function getDocList()
395403

396404

397405
$fields = $this->getCFGDef('selectFields', 'c.*');
398-
$group = $this->getGroupSQL($this->getCFGDef('groupBy', 'c.id'));
406+
$group = $this->getGroupSQL($this->getCFGDef('groupBy', ''));
399407
$sort = $this->SortOrderSQL("if(c.pub_date=0,c.createdon,c.pub_date)");
400408
list($tbl_site_content, $sort) = $this->injectSortByTV($tbl_site_content . ' ' . $this->_filters['join'],
401409
$sort);
@@ -520,7 +528,7 @@ protected function getChildrenList()
520528
$where = '';
521529
}
522530
$fields = $this->getCFGDef('selectFields', 'c.*');
523-
$group = $this->getGroupSQL($this->getCFGDef('groupBy', 'c.id'));
531+
$group = $this->getGroupSQL($this->getCFGDef('groupBy', ''));
524532

525533
if ($sanitarInIDs != "''" || $this->getCFGDef('ignoreEmpty', '0')) {
526534
$sql = $this->dbQuery("SELECT {$fields} FROM " . $from . " " . $where . " " .

0 commit comments

Comments
 (0)