From e8db1e884e2792476de1ea2b33804c9665526b7d Mon Sep 17 00:00:00 2001
From: Arthur Schiwon <blizzz@owncloud.com>
Date: Wed, 30 Jan 2013 03:44:11 +0100
Subject: [PATCH] LDAP: some inline documentation

---
 apps/user_ldap/lib/connection.php | 7 +++++++
 apps/user_ldap/lib/helper.php     | 5 +++++
 2 files changed, 12 insertions(+)

diff --git a/apps/user_ldap/lib/connection.php b/apps/user_ldap/lib/connection.php
index 124ebe7aab..2d34013c9d 100644
--- a/apps/user_ldap/lib/connection.php
+++ b/apps/user_ldap/lib/connection.php
@@ -264,6 +264,9 @@ class Connection {
 		}
 	}
 
+	/**
+	 * @return returns an array that maps internal variable names to database fields
+	 */
 	private function getConfigTranslationArray() {
 		static $array = array('ldap_host'=>'ldapHost', 'ldap_port'=>'ldapPort', 'ldap_backup_host'=>'ldapBackupHost', 'ldap_backup_port'=>'ldapBackupPort', 'ldap_override_main_server' => 'ldapOverrideMainServer', 'ldap_dn'=>'ldapAgentName', 'ldap_agent_password'=>'ldapAgentPassword', 'ldap_base'=>'ldapBase', 'ldap_base_users'=>'ldapBaseUsers', 'ldap_base_groups'=>'ldapBaseGroups', 'ldap_userlist_filter'=>'ldapUserFilter', 'ldap_login_filter'=>'ldapLoginFilter', 'ldap_group_filter'=>'ldapGroupFilter', 'ldap_display_name'=>'ldapUserDisplayName', 'ldap_group_display_name'=>'ldapGroupDisplayName',
 
@@ -303,6 +306,10 @@ class Connection {
 		return $this->configured;
 	}
 
+	/**
+	 * @brief saves the current Configuration in the database
+ingle parameters
+	 */
 	public function saveConfiguration() {
 		$trans = array_flip($this->getConfigTranslationArray());
 		foreach($this->config as $key => $value) {
diff --git a/apps/user_ldap/lib/helper.php b/apps/user_ldap/lib/helper.php
index 263d95f898..3c4b98af1a 100644
--- a/apps/user_ldap/lib/helper.php
+++ b/apps/user_ldap/lib/helper.php
@@ -69,6 +69,11 @@ class Helper {
 		return $prefixes;
 	}
 
+	/**
+	 * @brief deletes a given saved LDAP/AD server configuration.
+	 * @param string the configuration prefix of the config to delete
+	 * @return bool true on success, false otherweise
+	 */
 	static public function deleteServerConfiguration($prefix) {
 		//just to be on the safe side
 		\OCP\User::checkAdminUser();
-- 
GitLab