aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-09-29 15:42:22 +0200
committerMario Vavti <mario@mariovavti.com>2018-09-29 15:42:22 +0200
commit7ca8f7b5ccd8f0526d7b96676a15440d8068d58d (patch)
tree27f2da21c642c81dc53be450cc0236ea36cca51a /Zotlabs/Lib
parentd7ed5518d1f9d1d75c7f59256ba4dcf9d7d96b50 (diff)
downloadvolse-hubzilla-7ca8f7b5ccd8f0526d7b96676a15440d8068d58d.tar.gz
volse-hubzilla-7ca8f7b5ccd8f0526d7b96676a15440d8068d58d.tar.bz2
volse-hubzilla-7ca8f7b5ccd8f0526d7b96676a15440d8068d58d.zip
allow to install apps by name
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r--Zotlabs/Lib/Apps.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php
index aef6756b5..c54a5a111 100644
--- a/Zotlabs/Lib/Apps.php
+++ b/Zotlabs/Lib/Apps.php
@@ -546,6 +546,17 @@ class Apps {
}
static public function app_install($uid,$app) {
+
+ if(! is_array($app)) {
+ $r = q("select * from app where app_name = '%s' and app_channel = 0",
+ dbesc($app)
+ );
+ if(! $r)
+ return false;
+
+ $app = self::app_encode($r[0]);
+ }
+
$app['uid'] = $uid;
if(self::app_installed($uid,$app,true))