} // END - if
} // END - foreach
unset($modArray);
-} elseif ((getConfig('cache_modreg') == 'Y') && ($GLOBALS['output_mode'] != '1') && ($GLOBALS['output_mode'] != '-1')) {
+} elseif ((getConfig('cache_modreg') == 'Y') && (getOutputMode() != '1') && (getOutputMode() != '-1')) {
// Create cache file here
$GLOBALS['cache_instance']->init('MODULES');
$GLOBALS['cache_instance']->storeExtensionVersion('sql_patches');