Use findAppInDirectories
The other function doesn't work if the appstore is disabled Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
parent
a68595742b
commit
d805df7bb3
|
@ -91,7 +91,12 @@ class Installer {
|
||||||
* @return integer
|
* @return integer
|
||||||
*/
|
*/
|
||||||
public function installApp($appId) {
|
public function installApp($appId) {
|
||||||
$basedir = OC_App::getInstallPath().'/'.$appId;
|
$app = \OC_App::findAppInDirectories($appId);
|
||||||
|
if($app === false) {
|
||||||
|
throw new \Exception('App not found in any app directory');
|
||||||
|
}
|
||||||
|
|
||||||
|
$basedir = $app['path'].'/'.$appId;
|
||||||
$info = OC_App::getAppInfo($basedir.'/appinfo/info.xml', true);
|
$info = OC_App::getAppInfo($basedir.'/appinfo/info.xml', true);
|
||||||
|
|
||||||
//install the database
|
//install the database
|
||||||
|
|
|
@ -555,7 +555,7 @@ class OC_App {
|
||||||
* @param string $appId
|
* @param string $appId
|
||||||
* @return false|string
|
* @return false|string
|
||||||
*/
|
*/
|
||||||
protected static function findAppInDirectories($appId) {
|
public static function findAppInDirectories($appId) {
|
||||||
$sanitizedAppId = self::cleanAppId($appId);
|
$sanitizedAppId = self::cleanAppId($appId);
|
||||||
if($sanitizedAppId !== $appId) {
|
if($sanitizedAppId !== $appId) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue