aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggPluginManifestParser17.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes/ElggPluginManifestParser17.php')
-rw-r--r--engine/classes/ElggPluginManifestParser17.php19
1 files changed, 15 insertions, 4 deletions
diff --git a/engine/classes/ElggPluginManifestParser17.php b/engine/classes/ElggPluginManifestParser17.php
index f439b5af0..5658ee804 100644
--- a/engine/classes/ElggPluginManifestParser17.php
+++ b/engine/classes/ElggPluginManifestParser17.php
@@ -12,10 +12,13 @@ class ElggPluginManifestParser17 extends ElggPluginManifestParser {
*/
protected $validAttributes = array(
'author', 'version', 'description', 'website',
- 'copyright', 'license', 'elgg_version',
+ 'copyright', 'license', 'licence', 'elgg_version',
// were never really used and not enforced in code.
- 'requires', 'recommends', 'conflicts'
+ 'requires', 'recommends', 'conflicts',
+
+ // not a 1.7 field, but we need it
+ 'name',
);
/**
@@ -28,6 +31,8 @@ class ElggPluginManifestParser17 extends ElggPluginManifestParser {
return false;
}
+ $elements = array();
+
foreach ($this->manifestObject->children as $element) {
$key = $element->attributes['key'];
$value = $element->attributes['value'];
@@ -45,7 +50,13 @@ class ElggPluginManifestParser17 extends ElggPluginManifestParser {
}
}
- if (!$this->manifest = $elements) {
+ if ($elements && !array_key_exists('name', $elements)) {
+ $elements['name'] = $this->caller->getName();
+ }
+
+ $this->manifest = $elements;
+
+ if (!$this->manifest) {
return false;
}
@@ -68,4 +79,4 @@ class ElggPluginManifestParser17 extends ElggPluginManifestParser {
return false;
}
-} \ No newline at end of file
+}