Index: /branches/2.2/phpgwapi/inc/class.accounts_ldap.inc.php
===================================================================
--- /branches/2.2/phpgwapi/inc/class.accounts_ldap.inc.php	(revision 1904)
+++ /branches/2.2/phpgwapi/inc/class.accounts_ldap.inc.php	(revision 3234)
@@ -63,5 +63,5 @@
 			{
 				/* jakjr: using justthese with ldap_search */
-				$justthese = array("uidnumber", "gidnumber", "uid", "cn", "givenname", "sn", "mail", "phpgwaccountstatus", "phpgwaccountexpires", "phpgwaccounttype", "phpgwlastpasswdchange","phpgwagreeterm","telephonenumber");
+				$justthese = array("uidnumber", "gidnumber", "uid", "cn", "givenname", "sn", "mail", "phpgwaccountstatus", "phpgwaccountexpires", "phpgwaccounttype", "phpgwlastpasswdchange","phpgwagreeterm","telephonenumber","mobile");
 				$sri = @ldap_search($this->ds, $this->user_context, ("(&(uidnumber=" . (int)$this->account_id.")(phpgwaccounttype=u))"), $justthese);
 			}
@@ -90,4 +90,5 @@
 				}
 				$this->data['telephonenumber']   = $allValues[0]['telephonenumber'][0];
+				$this->data['mobile']   = $allValues[0]['mobile'][0];
 				/* jakjr: this is not used for expressoLivre */
 				/*
Index: /branches/2.2/preferences/changepersonaldata.php
===================================================================
--- /branches/2.2/preferences/changepersonaldata.php	(revision 1225)
+++ /branches/2.2/preferences/changepersonaldata.php	(revision 3234)
@@ -38,7 +38,8 @@
 	));
 
-	$GLOBALS['phpgw']->template->set_var('lang_commercial_telephonenumber',lang('Commercial Telephone number'));
+	$GLOBALS['phpgw']->template->set_var('lang_commercial_telephonenumber',lang('%1 telephone number',lang('Commercial')));
 	$GLOBALS['phpgw']->template->set_var('lang_ps_commercial_telephonenumber',
 	lang('Observation') . ': ' . lang('This telephone number will apear in searches for your name, and it will be visible for all ExpressoLivre Users') . '.');
+	$GLOBALS['phpgw']->template->set_var('lang_mobile_telephonenumber',lang('%1 telephone number',lang('Mobile')));
 	$GLOBALS['phpgw']->template->set_var('lang_change',lang('Change'));
 	$GLOBALS['phpgw']->template->set_var('lang_cancel',lang('Cancel'));
@@ -47,7 +48,22 @@
 	/* Get telephone number from ldap or from post */
 	$ldap_conn = $GLOBALS['phpgw']->common->ldapConnect();
-	$result = ldap_search($ldap_conn, $GLOBALS['phpgw_info']['server']['ldap_context'], 'uid='.$GLOBALS['phpgw_info']['user']['account_lid'], array('telephonenumber'));
+	$result = ldap_search($ldap_conn, $GLOBALS['phpgw_info']['server']['ldap_context'], 'uid='.$GLOBALS['phpgw_info']['user']['account_lid'], array('telephonenumber','mobile'));
 	$entrie = ldap_get_entries($ldap_conn, $result);
-	$GLOBALS['phpgw']->template->set_var('telephonenumber',$_POST['telephonenumber'] ? $_POST['telephonenumber'] : $entrie[0]['telephonenumber'][0]);
+
+	/* BEGIN ACL Check for Personal Data Fields.*/
+	$disabledTelephoneNumber = false;
+	$disabledMobile = false;
+	 
+	if ($GLOBALS['phpgw']->acl->check('blockpersonaldata',1)) {
+		$disabledTelephoneNumber = '"disabled=true"';
+	}
+	if ($GLOBALS['phpgw']->acl->check('blockpersonaldata',2)) {
+		$disabledMobile = '"disabled=true"';
+	}
+	/* END ACL Check for Personal Data Fields.*/
+	
+	$GLOBALS['phpgw']->template->set_var('telephonenumber',($_POST['telephonenumber'] ? $_POST['telephonenumber'] : $entrie[0]['telephonenumber'][0]).$disabledTelephoneNumber);
+	$GLOBALS['phpgw']->template->set_var('mobile',($_POST['mobile'] ? $_POST['mobile'] : $entrie[0]['mobile'][0]).$disabledMobile);
+
 	ldap_close($ldap_conn);
 
@@ -59,12 +75,16 @@
 	if ($_POST['change'])
 	{
-		if ($_POST['telephonenumber'] != $GLOBALS['phpgw_info']['user']['telephonenumber'])
+		if ($_POST['telephonenumber'] != $GLOBALS['phpgw_info']['user']['telephonenumber'] || $_POST['mobile'] != $GLOBALS['phpgw_info']['user']['mobile'])
 		{
 			$pattern = '/\([0-9]{2,3}\)[0-9]{4}-[0-9]{4}$/';
 			if ((strlen($_POST['telephonenumber']) != 0) && (!preg_match($pattern, $_POST['telephonenumber'])))
 			{
-				$errors[] = lang('Format of telephone number is invalid.');
+				$errors[] = lang('Format of %1 telephone number is invalid.', lang("Commercial"));
 			}
-			else
+			if ((strlen($_POST['mobile']) != 0) && (!preg_match($pattern, $_POST['mobile'])))
+			{
+				$errors[] = lang('Format of %1 telephone number is invalid.', lang("Mobile"));
+			}
+			if(!is_array($errors))
 			{
 				// Use LDAP Replication mode, if available
@@ -84,20 +104,34 @@
 				}
 				
-				if ($GLOBALS['phpgw_info']['user']['telephonenumber'])
-				{
+				if(!$disabledTelephoneNumber && ($_POST['telephonenumber'] != $GLOBALS['phpgw_info']['user']['telephonenumber'])) {
 					if (strlen($_POST['telephonenumber']) == 0) {
 						$info['telephonenumber'] = $GLOBALS['phpgw_info']['user']['telephonenumber'];
 						$result = @ldap_mod_del($ldap_conn, $GLOBALS['phpgw_info']['user']['account_dn'], $info);
 					}
+					elseif(strlen($GLOBALS['phpgw_info']['user']['telephonenumber']) == 0) {
+						$info['telephonenumber'] = $_POST['telephonenumber'];
+						$result = @ldap_mod_add($ldap_conn, $GLOBALS['phpgw_info']['user']['account_dn'], $info);
+					}					
 					else {
 						$info['telephonenumber'] = $_POST['telephonenumber'];
 						$result = @ldap_mod_replace($ldap_conn, $GLOBALS['phpgw_info']['user']['account_dn'], $info);
 					}
+					unset($info['telephonenumber']);
 				}
-				else
-				{
-					$info['telephonenumber'] = $_POST['telephonenumber'];
-					$result = @ldap_mod_add($ldap_conn, $GLOBALS['phpgw_info']['user']['account_dn'], $info);
+				if (!$disabledMobile && ($_POST['mobile'] != $GLOBALS['phpgw_info']['user']['mobile'])) {
+					if (strlen($_POST['mobile']) == 0) {
+						$info['mobile'] = $GLOBALS['phpgw_info']['user']['mobile'];
+						$result = @ldap_mod_del($ldap_conn, $GLOBALS['phpgw_info']['user']['account_dn'], $info);
+					}
+					elseif(strlen($GLOBALS['phpgw_info']['user']['mobile']) == 0) {
+						$info['mobile'] = $_POST['mobile'];
+						$result = @ldap_mod_add($ldap_conn, $GLOBALS['phpgw_info']['user']['account_dn'], $info);
+					}
+					else {
+						$info['mobile'] = $_POST['mobile'];
+						$result = @ldap_mod_replace($ldap_conn, $GLOBALS['phpgw_info']['user']['account_dn'], $info);
+					}
 				}
+				ldap_close($ldap_conn);	
 			}
 			
Index: /branches/2.2/preferences/templates/default/changepersonaldata.tpl
===================================================================
--- /branches/2.2/preferences/templates/default/changepersonaldata.tpl	(revision 1132)
+++ /branches/2.2/preferences/templates/default/changepersonaldata.tpl	(revision 3234)
@@ -18,4 +18,13 @@
      	</td>
      </tr>
+     <tr><td colspan=2 height="20px"></td></tr>
+     <tr>
+       <td>
+        {lang_mobile_telephonenumber}:
+       </td>
+       <td>
+        <input type="input" autocomplete="off" name="mobile" size=12 value="{mobile}" maxlength="13" onkeyUp="FormatTelephoneNumber(event, this);">&nbsp;(xx)xxxx-xxxx
+       </td>
+     </tr>
      <tr>
        <td colspan="3">
