aboutsummaryrefslogtreecommitdiff
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/index.php b/index.php
index 3abb55d..243d574 100644
--- a/index.php
+++ b/index.php
@@ -65,11 +65,8 @@ if (!empty($deleteid) && confirm_sesskey()) {
/* Updates an existing token */
if (!empty($hideshowid) && confirm_sesskey()) {
- if ($record = tool_managertokens_find_record($hideshowid)) {
- $record->enabled = !boolval($record->enabled);
- tool_managertokens_update_record($record);
- redirect($baseurl, new lang_string("changessaved", "moodle"));
- }
+ tool_managertokens_change_status($hideshowid);
+ redirect($baseurl, new lang_string("changessaved", "moodle"));
}
/* Specifies the title of the page */