diff options
author | Simon Rettberg | 2021-01-29 14:29:41 +0100 |
---|---|---|
committer | Simon Rettberg | 2021-01-29 14:29:41 +0100 |
commit | 023db3416788f4ef23a0365db74878fde44970fe (patch) | |
tree | f2f78fcfbd90cb8b6734e399a1f07b406146bafd /modules-available | |
parent | [systemstatus] Add permissions for service restarting (diff) | |
download | slx-admin-023db3416788f4ef23a0365db74878fde44970fe.tar.gz slx-admin-023db3416788f4ef23a0365db74878fde44970fe.tar.xz slx-admin-023db3416788f4ef23a0365db74878fde44970fe.zip |
[permissionmanager] Fix install always reporting UPDATE_DONE
Diffstat (limited to 'modules-available')
-rw-r--r-- | modules-available/permissionmanager/install.inc.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules-available/permissionmanager/install.inc.php b/modules-available/permissionmanager/install.inc.php index 9ff5a2d4..292a5f52 100644 --- a/modules-available/permissionmanager/install.inc.php +++ b/modules-available/permissionmanager/install.inc.php @@ -199,8 +199,10 @@ if (Database::exec("INSERT INTO `role` (roleid, rolename, builtin, roledescripti (2,'webinterface.*')"); Database::exec("OPTIMIZE TABLE role_x_permission"); // Assign the first user to the superadmin role (if one exists) - Database::exec("INSERT IGNORE INTO `role_x_user` VALUES (1,1)"); - $res[] = UPDATE_DONE; + $num = Database::exec("INSERT IGNORE INTO `role_x_user` VALUES (1,1)"); + if ($num > 0) { + $res[] = UPDATE_DONE; + } } // |