MDL-48210 plugin_manager: Invalidate caches after fetching updates info
authorDavid Mudrák <david@moodle.com>
Tue, 18 Nov 2014 22:37:06 +0000 (23:37 +0100)
committerDavid Mudrák <david@moodle.com>
Mon, 24 Nov 2014 10:44:02 +0000 (11:44 +0100)
lib/classes/update/checker.php

index b6ad407..38e9d55 100644 (file)
@@ -116,9 +116,14 @@ class checker {
      * @throws checker_exception
      */
     public function fetch() {
+
         $response = $this->get_response();
         $this->validate_response($response);
         $this->store_response($response);
+
+        // We need to reset plugin manager's caches - the currently existing
+        // singleton is not aware of eventually available updates we just fetched.
+        \core_plugin_manager::reset_caches();
     }
 
     /**