aboutsummaryrefslogtreecommitdiff
path: root/engine/classes
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes')
-rw-r--r--engine/classes/ElggPluginManifest.php19
1 files changed, 14 insertions, 5 deletions
diff --git a/engine/classes/ElggPluginManifest.php b/engine/classes/ElggPluginManifest.php
index fcd0094c4..e230cd3f2 100644
--- a/engine/classes/ElggPluginManifest.php
+++ b/engine/classes/ElggPluginManifest.php
@@ -8,8 +8,8 @@
* as $this->parser.
*
* To add new parser versions, name them ElggPluginManifestParserXX
- * where XX is the version specified in the top-level <plugin-manifest>
- * tag.
+ * where XX is the version specified in the top-level <plugin_manifest>
+ * tag's XML namespace.
*
* @package Elgg.Core
* @subpackage Plugins
@@ -23,6 +23,12 @@ class ElggPluginManifest {
protected $parser;
/**
+ * The root for plugin manifest namespaces.
+ * This is in the format http://www.elgg.org/plugin_manifest/<version>
+ */
+ protected $namespace_root = 'http://www.elgg.org/plugin_manifest/';
+
+ /**
* The expected structure of a plugins requires element
*/
private $depsStructPlugin = array(
@@ -144,12 +150,15 @@ class ElggPluginManifest {
}
// set manifest api version
- if (isset($manifest_obj->attributes['version'])) {
- $this->apiVersion = (float)$manifest_obj->attributes['version'];
+ if (isset($manifest_obj->attributes['xmlns'])) {
+ $namespace = $manifest_obj->attributes['xmlns'];
+ $version = str_replace($this->namespace_root, '', $namespace);
} else {
- $this->apiVersion = 1.7;
+ $version = 1.7;
}
+ $this->apiVersion = $version;
+
$parser_class_name = 'ElggPluginManifestParser' . str_replace('.', '', $this->apiVersion);
// @todo currently the autoloader freaks out if a class doesn't exist.