MDL-38756 JavaScript: Handle missing jsrev during installation
authorAndrew Robert Nicols <andrew.nicols@luns.net.uk>
Wed, 27 Mar 2013 13:12:58 +0000 (13:12 +0000)
committerAndrew Robert Nicols <andrew.nicols@luns.net.uk>
Wed, 27 Mar 2013 13:13:01 +0000 (13:13 +0000)
During installation, jsrev is unset so unavailable for the cache checks.
The installation sets the initial jsrev value and this is updated
periodically, unless it is set to -1 for JS developer.

During installation, we shouldn't really use any caches so if jsrev is
unset, then we should act as though it is set to developer.

lib/outputrequirementslib.php

index 2129100..2c49b1b 100644 (file)
@@ -1356,7 +1356,7 @@ class YUI_config {
         }
 
         $cache = cache::make('core', 'yuimodules');
-        if ($CFG->jsrev == -1) {
+        if (!isset($CFG->jsrev) || $CFG->jsrev == -1) {
             $metadata = array();
             $cache->delete('metadata');
         } else {