moodle_page: MDL-12212 reimplement user_is_editing, deprecate isediting
[moodle.git] / course / category.php
index 73f88cc..394a769 100644 (file)
@@ -39,9 +39,9 @@
 
     if (update_category_button($category->id)) {
         if ($categoryedit !== -1) {
-            $USER->categoryediting = $categoryedit;
+            $USER->editing = $categoryedit;
         }
-        $editingon = !empty($USER->categoryediting);
+        $editingon = $PAGE->user_is_editing();
         $navbaritem = update_category_button($category->id); // Must call this again after updating the state.
     } else {
         $navbaritem = print_course_search('', true, 'navbar');