Skip to content

Commit

Permalink
Migrate more admin page default view settings (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-lerch committed Jul 24, 2020
1 parent c5af1b7 commit 05ec73c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kool_update_r45_r46.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,15 @@ function saveLeuteSnapshot($ids) {
// transform admin default view in settings and userprefs
db_update_data(
'ko_settings',
"WHERE `key` = 'default_view_admin' AND `value` = 'set_layout'",
"WHERE `key` = 'default_view_admin' AND (`value` = 'set_layout' OR `value` = 'set_allgemein')",
array('key' => 'default_view_admin', 'value' => 'admin_settings')
);

$users = db_select_distinct('ko_userprefs', 'user_id', '', "WHERE `key` = 'default_view_admin' ");

foreach ($users as $user) {
$value = ko_get_userpref($user, 'default_view_admin');
if ($value == 'set_layout') ko_save_userpref($user, 'default_view_admin', 'admin_settings');
if ($value == 'set_layout' || $value == 'set_allgemein') ko_save_userpref($user, 'default_view_admin', 'admin_settings');
}


Expand Down

0 comments on commit 05ec73c

Please sign in to comment.