| @@ 54-60 (lines=7) @@ | ||
| 51 | * @NoAdminRequired |
|
| 52 | * @NoCSRFRequired |
|
| 53 | */ |
|
| 54 | public function enableBackend() { |
|
| 55 | $response = new JSONResponse(); |
|
| 56 | $params = $this->request->urlParams; |
|
| 57 | $backend = $params['backend']; |
|
| 58 | $enable = $params['enable']; |
|
| 59 | return $response->setData(\OCP\Config::setAppValue('contacts', 'backend_'.$backend, $enable)); |
|
| 60 | } |
|
| 61 | /** |
|
| 62 | * @NoAdminRequired |
|
| 63 | * @NoCSRFRequired |
|
| @@ 65-71 (lines=7) @@ | ||
| 62 | * @NoAdminRequired |
|
| 63 | * @NoCSRFRequired |
|
| 64 | */ |
|
| 65 | public function backendStatus() { |
|
| 66 | $response = new JSONResponse(); |
|
| 67 | $params = $this->request->urlParams; |
|
| 68 | $backend = $params['backend']; |
|
| 69 | $enabled = \OCP\Config::getAppValue('contacts', 'backend_'.$backend, "false"); |
|
| 70 | return $response->setData($enabled); |
|
| 71 | } |
|
| 72 | } |
|
| 73 | ||
| 74 | ||