Skip to content
Snippets Groups Projects
Commit ff71e128 authored by Rakesh Kumar Regar's avatar Rakesh Kumar Regar Committed by Kapil Kumar
Browse files

Issue #3392862: Bulk update does not update the updated timestamp

parent 2f8a172a
No related branches found
No related tags found
1 merge request!15Issue #3392862: Bulk update does not update the updated timestamp
......@@ -193,7 +193,10 @@ class ListscriptsForm extends FormBase {
switch ($action) {
case 'disable':
$res = $this->database->update('advance_script_manager')
->fields(['status' => 2])
->fields([
'status' => 2,
'updated' => time(),
])
->condition('id', $item_ids, 'IN')
->execute();
if ($res) {
......@@ -203,7 +206,10 @@ class ListscriptsForm extends FormBase {
case 'activate':
$res = $this->database->update('advance_script_manager')
->fields(['status' => 1])
->fields([
'status' => 1,
'updated' => time(),
])
->condition('id', $item_ids, 'IN')
->execute();
if ($res) {
......@@ -213,7 +219,10 @@ class ListscriptsForm extends FormBase {
case 'move_script_to_header':
$res = $this->database->update('advance_script_manager')
->fields(['visibility_section' => 'Header'])
->fields([
'visibility_section' => 'Header',
'updated' => time(),
])
->condition('id', $item_ids, 'IN')
->execute();
if ($res) {
......@@ -223,7 +232,10 @@ class ListscriptsForm extends FormBase {
case 'move_script_to_body':
$res = $this->database->update('advance_script_manager')
->fields(['visibility_section' => 'Body'])
->fields([
'visibility_section' => 'Body',
'updated' => time(),
])
->condition('id', $item_ids, 'IN')
->execute();
if ($res) {
......@@ -233,7 +245,10 @@ class ListscriptsForm extends FormBase {
case 'move_script_to_footer':
$res = $this->database->update('advance_script_manager')
->fields(['visibility_section' => 'Footer'])
->fields([
'visibility_section' => 'Footer',
'updated' => time(),
])
->condition('id', $item_ids, 'IN')
->execute();
if ($res) {
......
......@@ -214,6 +214,7 @@ class ScriptsForm extends ConfigFormBase {
'user_roles' => $user_roles,
'status' => $value['enable_code_script'],
'created' => time(),
'updated' => time(),
];
if (!empty($request_id)) {
unset($field['created']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment