MDL-38121 tell admins when plugin installed into wrong dir

This commit is contained in:
Petr Škoda
2013-02-23 18:16:42 +01:00
parent f29e62cb6c
commit bdbcb6d7fa
4 changed files with 49 additions and 3 deletions
+4
View File
@@ -2857,9 +2857,13 @@ class plugininfo_mod extends plugininfo_base {
$versionfile = $this->full_path('version.php');
$module = new stdClass();
$plugin = new stdClass();
if (is_readable($versionfile)) {
include($versionfile);
}
if (!isset($module->version) and isset($plugin->version)) {
$module = $plugin;
}
return $module;
}