Code Duplication    Length = 8-8 lines in 2 locations

lib/backend/abstractbackend.php 1 location

@@ 447-454 (lines=8) @@
444
	 * @param array the preferences, format array('param1' => 'value', 'param2' => 'value')
445
	 * @return boolean
446
	 */
447
	public function setPreferences($addressbookid, array $params) {
448
		$key = 'prefs_' . $this->combinedKey($addressbookid);
449
450
		$data = json_encode($params);
451
		return $data
452
			? \OCP\Config::setUserValue($this->userid, 'contacts', $key, $data)
453
			: false;
454
	}
455
	
456
	/**
457
	 * @param string $addressbookid

lib/backend/ldap.php 1 location

@@ 762-769 (lines=8) @@
759
	 * @param the new list
760
	 * @returns result|false
761
	 */
762
	protected function setAddressbookList(array $addressbookList) {
763
		$key = $this->name . "_list";
764
		$data = json_encode($addressbookList);
765
		
766
		return $data
767
			? \OCP\Config::setUserValue($this->userid, 'contacts', $key, $data)
768
			: false;
769
	}
770
	
771
	/**
772
	 * @brief gets the list of ldap addressbooks in the preferences