aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Apps.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Lib/Apps.php')
-rw-r--r--Zotlabs/Lib/Apps.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php
index 7e232af02..fd713a3f8 100644
--- a/Zotlabs/Lib/Apps.php
+++ b/Zotlabs/Lib/Apps.php
@@ -70,16 +70,25 @@ class Apps {
}
}
+ /**
+ * Install the system app if no system apps have been installed, or if a new system app
+ * is discovered, or if the version of a system app changes.
+ */
+
static public function check_install_system_app($app) {
if((! is_array(self::$installed_system_apps)) || (! count(self::$installed_system_apps))) {
return true;
}
+ $notfound = true;
foreach(self::$installed_system_apps as $iapp) {
- if(($iapp['app_id'] == hash('whirlpool',$app['name'])) && ($iapp['app_version'] != $app['version'])) {
- return true;
+ if($iapp['app_id'] == hash('whirlpool',$app['name'])) {
+ $notfound = false;
+ if($iapp['app_version'] != $app['version']) {
+ return true;
+ }
}
}
- return false;
+ return $notfound;
}