Commit 81881cb9 authored by Petr Škoda's avatar Petr Škoda
Browse files

MDL-41787 make sure maturity constants are defined before they are used in core_component class

parent 7f3836d1
......@@ -24,6 +24,20 @@
defined('MOODLE_INTERNAL') || die();
// Constants used in version.php files, these must exist when core_component executes.
/** Software maturity level - internals can be tested using white box techniques. */
define('MATURITY_ALPHA', 50);
/** Software maturity level - feature complete, ready for preview and testing. */
define('MATURITY_BETA', 100);
/** Software maturity level - tested, will be released unless there are fatal bugs. */
define('MATURITY_RC', 150);
/** Software maturity level - ready for production deployment. */
define('MATURITY_STABLE', 200);
/** Any version - special value that can be used in $plugin->dependencies in version.php files. */
define('ANY_VERSION', 'any');
/**
* Collection of components related methods.
*/
......@@ -268,6 +282,7 @@ $cache = '.var_export($cache, true).';
protected static function fetch_core_version() {
global $CFG;
if (self::$version === null) {
$version = null; // Prevent IDE complaints.
require($CFG->dirroot . '/version.php');
self::$version = $version;
}
......
......@@ -51,19 +51,6 @@ define('MEMORY_EXTRA', -3);
/** Extremely large memory limit - not recommended for standard scripts */
define('MEMORY_HUGE', -4);
/**
* Software maturity levels used by the core and plugins
*/
define('MATURITY_ALPHA', 50); // internals can be tested using white box techniques
define('MATURITY_BETA', 100); // feature complete, ready for preview and testing
define('MATURITY_RC', 150); // tested, will be released unless there are fatal bugs
define('MATURITY_STABLE', 200); // ready for production deployment
/**
* Special value that can be used in $plugin->dependencies in version.php files.
*/
define('ANY_VERSION', 'any');
/**
* Simple class. It is usually used instead of stdClass because it looks
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment