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
2 changed files with 7 additions and 2 deletions
|
@ -91,7 +91,12 @@ class Installer {
|
|||
* @return integer
|
||||
*/
|
||||
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);
|
||||
|
||||
//install the database
|
||||
|
|
|
@ -555,7 +555,7 @@ class OC_App {
|
|||
* @param string $appId
|
||||
* @return false|string
|
||||
*/
|
||||
protected static function findAppInDirectories($appId) {
|
||||
public static function findAppInDirectories($appId) {
|
||||
$sanitizedAppId = self::cleanAppId($appId);
|
||||
if($sanitizedAppId !== $appId) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue