diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-09-29 15:42:22 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-09-29 15:42:22 +0200 |
commit | 7ca8f7b5ccd8f0526d7b96676a15440d8068d58d (patch) | |
tree | 27f2da21c642c81dc53be450cc0236ea36cca51a /Zotlabs/Lib | |
parent | d7ed5518d1f9d1d75c7f59256ba4dcf9d7d96b50 (diff) | |
download | volse-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.php | 11 |
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)) |