From 9a67986473cee003dd594c8f67eecab0eee547d8 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Mon, 2 Jun 2014 18:31:43 +0200 Subject: [PATCH] add OCP\Config:deleteSystemValue --- apps/files/appinfo/update.php | 6 +++--- lib/public/config.php | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/apps/files/appinfo/update.php b/apps/files/appinfo/update.php index 5f054f266bc..de635e5ce6b 100644 --- a/apps/files/appinfo/update.php +++ b/apps/files/appinfo/update.php @@ -2,7 +2,7 @@ // this drops the keys below, because they aren't needed anymore // core related -if (version_compare(\OC_Config::getValue('version', '0.0.0'), '7.0.0', '<')) { - \OC_Config::deleteKey('allowZipDownload'); - \OC_Config::deleteKey('maxZipInputSize'); +if (version_compare(\OCP\Config::getSystemValue('version', '0.0.0'), '7.0.0', '<')) { + \OCP\Config::deleteSystemValue('allowZipDownload'); + \OCP\Config::deleteSystemValue('maxZipInputSize'); } diff --git a/lib/public/config.php b/lib/public/config.php index 8e3791b449b..ea3e0c1372a 100644 --- a/lib/public/config.php +++ b/lib/public/config.php @@ -70,6 +70,16 @@ class Config { return true; } + /** + * Deletes a value from config.php + * @param string $key key + * + * This function deletes the value from config.php. + */ + public static function deleteSystemValue( $key ) { + return \OC_Config::deleteKey( $key ); + } + /** * Gets the config value * @param string $app app -- 2.39.5