diff --git a/lib/backend/abstractbackend.php b/lib/backend/abstractbackend.php index aa1b78ff..3085806b 100644 --- a/lib/backend/abstractbackend.php +++ b/lib/backend/abstractbackend.php @@ -434,8 +434,7 @@ abstract class AbstractBackend { */ public function getPreferences($addressBookId) { - $key = $this->combinedKey($addressBookId); - $key = 'prefs_' . $key; + $key = 'prefs_' . $this->combinedKey($addressBookId); $data = \OCP\Config::getUserValue($this->userid, 'contacts', $key, false); return $data ? json_decode($data, true) : array(); @@ -448,8 +447,7 @@ abstract class AbstractBackend { * @return boolean */ public function setPreferences($addressbookid, array $params) { - $key = $this->combinedKey($addressbookid); - $key = 'prefs_' . $key; + $key = 'prefs_' . $this->combinedKey($addressbookid); $data = json_encode($params); return $data diff --git a/lib/controller/addressbookcontroller.php b/lib/controller/addressbookcontroller.php index c854a73c..757c74ee 100644 --- a/lib/controller/addressbookcontroller.php +++ b/lib/controller/addressbookcontroller.php @@ -359,34 +359,5 @@ class AddressBookController extends Controller { return $response->setParams($serialized); } - /** - * @NoAdminRequired - * @NoCSRFRequired - */ - public function getLdapConnectors() { - $params = $this->request->urlParams; - //$targetInfo = $this->request->post['target']; - - $response = new JSONResponse(); - $prefix = "backend_ldap_"; - $suffix = "_connector.xml"; - $path = __DIR__ . "/../../formats/"; - $files = scandir($path); - $formats = array(); - foreach ($files as $file) { - if (!strncmp($file, $prefix, strlen($prefix)) && substr($file, - strlen($suffix)) === $suffix) { - if (file_exists($path.$file)) { - $format = simplexml_load_file ( $path.$file ); - if ($format) { - if (isset($format['name'])) { - $formatId = substr($file, strlen($prefix), - strlen($suffix)); - $formats[$formatId] = array('id' => $formatId, 'name' => (string)$format['name'], 'xml' => $format->asXML()); - } - } - } - } - } - return $response->setData($formats); - } } diff --git a/lib/controller/backendcontroller.php b/lib/controller/backendcontroller.php index 8d268957..40b77dbf 100644 --- a/lib/controller/backendcontroller.php +++ b/lib/controller/backendcontroller.php @@ -25,9 +25,6 @@ class BackendController extends Controller { * @NoCSRFRequired */ public function getLdapConnectors() { - $params = $this->request->urlParams; - //$targetInfo = $this->request->post['target']; - $response = new JSONResponse(); $prefix = "backend_ldap_"; $suffix = "_connector.xml";