allow to install apps by name

This commit is contained in:
Mario Vavti 2018-09-29 15:42:22 +02:00
parent d7ed5518d1
commit 7ca8f7b5cc

View File

@ -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))