Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nicodim99 committed Nov 30, 2018
1 parent c8f1b58 commit c81ef59
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* Bugfix. https://pm.cetera.ru/browse/CCD-1308

3.58.4

* BackOffice. Улучшена работа сортировки порядка полей при редактировании типа материала
Expand Down
2 changes: 1 addition & 1 deletion cms/include/action_types.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
list($type_id) = $application->getConn()->fetchArray('select id from types_fields where field_id=?', array($_REQUEST['id']));
$count = $application->getConn()->fetchColumn('select count(tag) as c from types_fields where id=? group by tag having c>1', [$type_id]);
if ($count) {
$application->getConn()->executeQuery('SET @v := 10; UPDATE `types_fields` SET tag = (@v := @v + 10) WHERE id = ? ORDER BY TAG', [$type_id]);
$application->getConn()->executeQuery('SET @v := 0; UPDATE `types_fields` SET tag = (@v := @v + 10) WHERE id = ? ORDER BY TAG', [$type_id]);
}
}

Expand Down
6 changes: 4 additions & 2 deletions cms/include/classes/Cetera/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -880,8 +880,10 @@ public function parseSchema($module) {
if ($value['tag'] == 'key') {
if ($value['type'] == 'open') $key = $value['attributes'];
if ($value['type'] == 'close') {
if (!isset($table['keys'])) $table['keys'] = array();
$table['keys'][$key['name']] = $key;
if ($key['name']) {
if (!isset($table['keys'])) $table['keys'] = array();
$table['keys'][$key['name']] = $key;
}
}
}

Expand Down
4 changes: 4 additions & 0 deletions cms/include/data_theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
$theme->setConfig($r->config, $s);

}

echo json_encode(array(
'success' => true
));

} else {

Expand Down

0 comments on commit c81ef59

Please sign in to comment.