diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-15 21:46:30 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-15 21:46:30 +0000 |
commit | 1c61bbef8f87c9bc96b7b265816f638899ea3e13 (patch) | |
tree | e7c9d859b194237f0ac2dd6afa24fe6be03cf528 /engine | |
parent | 06e270fa999bccf1ea82f0ff340c09e2fa9e4655 (diff) | |
download | elgg-1c61bbef8f87c9bc96b7b265816f638899ea3e13.tar.gz elgg-1c61bbef8f87c9bc96b7b265816f638899ea3e13.tar.bz2 |
Fixes #2728 creating a name for plugins with 1.7 manifests based on hellekin's patch
git-svn-id: http://code.elgg.org/elgg/trunk@7638 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r-- | engine/classes/ElggPluginManifestParser17.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/engine/classes/ElggPluginManifestParser17.php b/engine/classes/ElggPluginManifestParser17.php index 8e4a79e4f..eb7ccadc1 100644 --- a/engine/classes/ElggPluginManifestParser17.php +++ b/engine/classes/ElggPluginManifestParser17.php @@ -15,7 +15,10 @@ class ElggPluginManifestParser17 extends ElggPluginManifestParser { 'copyright', 'license', '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,6 +50,10 @@ class ElggPluginManifestParser17 extends ElggPluginManifestParser { } } + if ($elements && !array_key_exists('name', $elements)) { + $elements['name'] = $this->caller->getName(); + } + $this->manifest = $elements; if (!$this->manifest) { |