MDL-38147 fixed small bug on changed categories cache
authorMarina Glancy <marina@moodle.com>
Tue, 26 Mar 2013 03:09:00 +0000 (14:09 +1100)
committerMarina Glancy <marina@moodle.com>
Tue, 26 Mar 2013 03:09:00 +0000 (14:09 +1100)
lib/coursecatlib.php

index 5c10951..30752ce 100644 (file)
@@ -592,10 +592,10 @@ class coursecat implements renderable, cacheable_object, IteratorAggregate {
             $all[$defcoursecat->id] = array();
             $count++;
         }
+        $all['countall'] = $count;
         foreach ($all as $key => $children) {
             $coursecattreecache->set($key, $children);
         }
-        $coursecattreecache->set('countall', $count);
         if (array_key_exists($id, $all)) {
             return $all[$id];
         }