diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-03 02:09:15 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-03 02:09:15 +0000 |
commit | b541e8d324c3feeaa50d185013837c31bae32c6a (patch) | |
tree | c974faf1345b70d27dc4671cfaac689bb7186f83 /engine/classes/ElggPluginManifest.php | |
parent | 24daa0a2d86484d559467279780e1e662aff0a08 (diff) | |
download | elgg-b541e8d324c3feeaa50d185013837c31bae32c6a.tar.gz elgg-b541e8d324c3feeaa50d185013837c31bae32c6a.tar.bz2 |
Fixes #2763. Better normalizing for unused 1.7 manifest options. Added logging when ElggPluginPackage can't be loaded. Better disabling of deleted physical plugins.
git-svn-id: http://code.elgg.org/elgg/trunk@7819 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/classes/ElggPluginManifest.php')
-rw-r--r-- | engine/classes/ElggPluginManifest.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/engine/classes/ElggPluginManifest.php b/engine/classes/ElggPluginManifest.php index 9fcdaaf55..290a59a0c 100644 --- a/engine/classes/ElggPluginManifest.php +++ b/engine/classes/ElggPluginManifest.php @@ -330,7 +330,12 @@ class ElggPluginManifest { * @return array */ public function getProvides() { - $provides = $this->parser->getAttribute('provides'); + // normalize for 1.7 + if ($this->getApiVersion() < 1.8) { + $provides = array(); + } else { + $provides = $this->parser->getAttribute('provides'); + } if (!$provides) { $provides = array(); @@ -370,6 +375,8 @@ class ElggPluginManifest { 'comparison' => 'ge' ) ); + } else { + $reqs = array(); } } else { $reqs = $this->parser->getAttribute('requires'); @@ -465,7 +472,12 @@ class ElggPluginManifest { * @return array */ public function getConflicts() { - $conflicts = $this->parser->getAttribute('conflicts'); + // normalize for 1.7 + if ($this->getApiVersion() < 1.8) { + $conflicts = array(); + } else { + $conflicts = $this->parser->getAttribute('conflicts'); + } if (!$conflicts) { $conflicts = array(); |