aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/plugins.php
diff options
context:
space:
mode:
authorSteve Clay <steve@mrclay.org>2013-02-04 20:51:07 -0500
committerCash Costello <cash.costello@gmail.com>2013-02-09 07:53:45 -0500
commit707df9db27cf2154910978427b9844448bcf931a (patch)
tree6ca8ba536758fe2f34ac6a55a18b7befa76bc74c /engine/lib/plugins.php
parent85e4c16f39a8b00b229644bcd175663541dfd51a (diff)
downloadelgg-707df9db27cf2154910978427b9844448bcf931a.tar.gz
elgg-707df9db27cf2154910978427b9844448bcf931a.tar.bz2
Small changes to remove static analysis noise and simplify flow
Diffstat (limited to 'engine/lib/plugins.php')
-rw-r--r--engine/lib/plugins.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php
index 3a42cb9b8..973ca4026 100644
--- a/engine/lib/plugins.php
+++ b/engine/lib/plugins.php
@@ -261,6 +261,8 @@ function elgg_get_max_plugin_priority() {
$data = get_data($q);
if ($data) {
$max = $data[0]->max;
+ } else {
+ $max = 1;
}
// can't have a priority of 0.
@@ -442,6 +444,7 @@ function elgg_set_plugin_priorities(array $order) {
// though we do start with 1
$order = array_values($order);
+ $missing_plugins = array();
foreach ($plugins as $plugin) {
$plugin_id = $plugin->getID();
@@ -640,19 +643,18 @@ function elgg_get_plugins_provides($type = null, $name = null) {
* @access private
*/
function elgg_check_plugins_provides($type, $name, $version = null, $comparison = 'ge') {
- if (!$provided = elgg_get_plugins_provides($type, $name)) {
+ $provided = elgg_get_plugins_provides($type, $name);
+ if (!$provided) {
return array(
'status' => false,
'version' => ''
);
}
- if ($provided) {
- if ($version) {
- $status = version_compare($provided['version'], $version, $comparison);
- } else {
- $status = true;
- }
+ if ($version) {
+ $status = version_compare($provided['version'], $version, $comparison);
+ } else {
+ $status = true;
}
return array(