Prefer OCS Id from database

To be consistent with other logic the app id from the database needs to be prefered. Especially when it comes to be able to replace an outdated OCS id.
This commit is contained in:
Lukas Reschke 2015-07-17 08:31:42 +02:00
parent 947e3d7ab5
commit 7c6d811584
1 changed files with 6 additions and 0 deletions

View File

@ -656,6 +656,12 @@ class OC_App {
if (is_array($data)) {
$data = OC_App::parseAppInfo($data);
}
if(isset($data['ocsid'])) {
$storedId = \OC::$server->getConfig()->getAppValue($appId, 'ocsid');
if($storedId !== '' && $storedId !== $data['ocsid']) {
$data['ocsid'] = $storedId;
}
}
self::$appInfo[$appId] = $data;