summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-01-17 21:14:09 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-01-17 21:41:57 +0100
commit1e7b20f61585520b183a268662aa1b09c4f469b4 (patch)
treea0088dd7fb996e8af4fb42f7b5d976c3d3995ee6 /lib
parent09f8a755ec6897eb72aa1da4eff623807201623d (diff)
downloadnextcloud-server-1e7b20f61585520b183a268662aa1b09c4f469b4.tar.gz
nextcloud-server-1e7b20f61585520b183a268662aa1b09c4f469b4.zip
Remove IAppConfig::setValue
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/AllConfig.php2
-rw-r--r--lib/private/AppConfig.php1
-rw-r--r--lib/private/legacy/app.php6
-rw-r--r--lib/public/IAppConfig.php13
4 files changed, 4 insertions, 18 deletions
diff --git a/lib/private/AllConfig.php b/lib/private/AllConfig.php
index 601a5f113dc..745bab367d3 100644
--- a/lib/private/AllConfig.php
+++ b/lib/private/AllConfig.php
@@ -163,7 +163,7 @@ class AllConfig implements \OCP\IConfig {
* @param string|float|int $value the value that should be stored
*/
public function setAppValue($appName, $key, $value) {
- \OC::$server->getAppConfig()->setValue($appName, $key, $value);
+ \OC::$server->query(\OC\AppConfig::class)->setValue($appName, $key, $value);
}
/**
diff --git a/lib/private/AppConfig.php b/lib/private/AppConfig.php
index 62a2f8b3c99..59a340cb491 100644
--- a/lib/private/AppConfig.php
+++ b/lib/private/AppConfig.php
@@ -162,7 +162,6 @@ class AppConfig implements IAppConfig {
* @param string $key key
* @param string|float|int $value value
* @return bool True if the value was inserted or updated, false if the value was the same
- * @deprecated 8.0.0 use method setAppValue of \OCP\IConfig
*/
public function setValue($app, $key, $value) {
if (!$this->hasKey($app, $key)) {
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php
index 306d2667bca..ea44ac8a144 100644
--- a/lib/private/legacy/app.php
+++ b/lib/private/legacy/app.php
@@ -298,12 +298,12 @@ class OC_App {
$appData['types'] = [];
}
- \OC::$server->getAppConfig()->setValue($app, 'types', $appTypes);
+ \OC::$server->getConfig()->setAppValue($app, 'types', $appTypes);
if (\OC::$server->getAppManager()->hasProtectedAppType($appData['types'])) {
$enabled = \OC::$server->getConfig()->getAppValue($app, 'enabled', 'yes');
if ($enabled !== 'yes' && $enabled !== 'no') {
- \OC::$server->getAppConfig()->setValue($app, 'enabled', 'yes');
+ \OC::$server->getConfig()->setAppValue($app, 'enabled', 'yes');
}
}
}
@@ -1075,7 +1075,7 @@ class OC_App {
self::setAppTypes($appId);
$version = \OC_App::getAppVersion($appId);
- \OC::$server->getAppConfig()->setValue($appId, 'installed_version', $version);
+ \OC::$server->getConfig()->setAppValue($appId, 'installed_version', $version);
\OC::$server->getEventDispatcher()->dispatch(ManagerEvent::EVENT_APP_UPDATE, new ManagerEvent(
ManagerEvent::EVENT_APP_UPDATE, $appId
diff --git a/lib/public/IAppConfig.php b/lib/public/IAppConfig.php
index 5c831590859..2f268185e62 100644
--- a/lib/public/IAppConfig.php
+++ b/lib/public/IAppConfig.php
@@ -60,19 +60,6 @@ interface IAppConfig {
public function getFilteredValues($app);
/**
- * sets a value in the appconfig
- * @param string $app app
- * @param string $key key
- * @param string|float|int $value value
- * @deprecated 8.0.0 use method setAppValue of \OCP\IConfig
- *
- * Sets a value. If the key did not exist before it will be created.
- * @return void
- * @since 7.0.0
- */
- public function setValue($app, $key, $value);
-
- /**
* Get all apps using the config
* @return array an array of app ids
*
39;/../lib/base.php'; if (\OCP\Util::needUpgrade() || \OC::$server->getConfig()->getSystemValueBool('maintenance')) { // since the behavior of apps or remotes are unpredictable during // an upgrade, return a 503 directly http_response_code(503); $response = new \OC\OCS\Result(null, 503, 'Service unavailable'); OC_API::respond($response, OC_API::requestedFormat()); exit; } use Symfony\Component\Routing\Exception\ResourceNotFoundException; use Symfony\Component\Routing\Exception\MethodNotAllowedException; /* * Try old routes first * We first try the old routes since the appframework triggers more login stuff. */ try { OC_App::loadApps(['session']); OC_App::loadApps(['authentication']); // load all apps to get all api routes properly setup OC_App::loadApps(); OC::$server->getRouter()->match('/ocs'.\OC::$server->getRequest()->getRawPathInfo()); sleep(1); OC::$server->getLogger()->info('This uses an old OCP\API::register construct. This will be removed in a future version of Nextcloud. Please migrate to the OCSController'); return; } catch (ResourceNotFoundException $e) { // Fall through the not found } catch (MethodNotAllowedException $e) { OC_API::setContentType(); http_response_code(405); exit(); } catch (Exception $ex) { OC_API::respond($ex->getResult(), OC_API::requestedFormat()); exit(); } /* * Try the appframework routes */ try { if (!\OC::$server->getUserSession()->isLoggedIn()) { OC::handleLogin(\OC::$server->getRequest()); } OC::$server->getRouter()->match('/ocsapp'.\OC::$server->getRequest()->getRawPathInfo()); } catch (ResourceNotFoundException $e) { OC_API::setContentType(); $format = \OC::$server->getRequest()->getParam('format', 'xml'); $txt='Invalid query, please check the syntax. API specifications are here:' .' http://www.freedesktop.org/wiki/Specifications/open-collaboration-services.'."\n"; OC_API::respond(new \OC\OCS\Result(null, \OCP\API::RESPOND_NOT_FOUND, $txt), $format); } catch (MethodNotAllowedException $e) { OC_API::setContentType(); http_response_code(405); } catch (\OC\OCS\Exception $ex) { OC_API::respond($ex->getResult(), OC_API::requestedFormat()); } catch (\OC\User\LoginException $e) { OC_API::respond(new \OC\OCS\Result(null, \OCP\API::RESPOND_UNAUTHORISED, 'Unauthorised')); } catch (\Exception $e) { \OC::$server->getLogger()->logException($e); OC_API::setContentType(); $format = \OC::$server->getRequest()->getParam('format', 'xml'); $txt='Invalid query, please check the syntax. API specifications are here:' .' http://www.freedesktop.org/wiki/Specifications/open-collaboration-services.'."\n"; OC_API::respond(new \OC\OCS\Result(null, \OCP\API::RESPOND_NOT_FOUND, $txt), $format); }