From 255d191a1dd95a4e376ddb50a4cc4635ac8c46f0 Mon Sep 17 00:00:00 2001 From: Dave Cooper Date: Wed, 15 Oct 2014 14:47:08 +0800 Subject: [PATCH] MDL-47657 mod_glossary: Fixed wrong error message on edit timeout. --- mod/glossary/edit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/glossary/edit.php b/mod/glossary/edit.php index 3ccb42c3f5d..ab5b179f93e 100644 --- a/mod/glossary/edit.php +++ b/mod/glossary/edit.php @@ -40,7 +40,7 @@ if ($id) { // if entry is specified $ineditperiod = ((time() - $entry->timecreated < $CFG->maxeditingtime) || $glossary->editalways); if (!has_capability('mod/glossary:manageentries', $context) and !($entry->userid == $USER->id and ($ineditperiod and has_capability('mod/glossary:write', $context)))) { - if ($USER->id != $fromdb->userid) { + if ($USER->id != $entry->userid) { print_error('errcannoteditothers', 'glossary', "view.php?id=$cm->id&mode=entry&hook=$id"); } elseif (!$ineditperiod) { print_error('erredittimeexpired', 'glossary', "view.php?id=$cm->id&mode=entry&hook=$id");