Skip to content

Commit

Permalink
Delete OCS ID from DB if none is specified
Browse files Browse the repository at this point in the history
If no OCS ID is specified in appinfo.xml and an app update is triggered and a OCS ID is stored in the DB we should clean the value.

Ref owncloud/activity#320 (comment)
  • Loading branch information
LukasReschke committed Jul 2, 2015
1 parent f29af9c commit 6170aa5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/private/app.php
Expand Up @@ -1201,6 +1201,8 @@ public static function updateApp($appId) {
$appData = self::getAppInfo($appId);
if (array_key_exists('ocsid', $appData)) {
OC_Appconfig::setValue($appId, 'ocsid', $appData['ocsid']);
} elseif(OC_Appconfig::getValue($appId, 'ocsid', null) !== null) {
OC_Appconfig::deleteKey($appId, 'ocsid');
}
foreach ($appData['remote'] as $name => $path) {
OCP\CONFIG::setAppValue('core', 'remote_' . $name, $appId . '/' . $path);
Expand Down

0 comments on commit 6170aa5

Please sign in to comment.