mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 17:14:36 +01:00
formatting
This commit is contained in:
parent
290aa0d6da
commit
77a7f314b4
@ -37,7 +37,7 @@
|
|||||||
while (list($field,$value) = @each($fields))
|
while (list($field,$value) = @each($fields))
|
||||||
{
|
{
|
||||||
/* Depending on how the array was built, this is needed. */
|
/* Depending on how the array was built, this is needed. */
|
||||||
if (gettype($value) == "integer")
|
if (gettype($value) == 'integer')
|
||||||
{
|
{
|
||||||
$value = $field;
|
$value = $field;
|
||||||
}
|
}
|
||||||
@ -68,7 +68,7 @@
|
|||||||
/* This will take an array or integer */
|
/* This will take an array or integer */
|
||||||
function delete($id)
|
function delete($id)
|
||||||
{
|
{
|
||||||
if (gettype($id) == "array")
|
if (gettype($id) == 'array')
|
||||||
{
|
{
|
||||||
while (list($null,$t_id) = each($id))
|
while (list($null,$t_id) = each($id))
|
||||||
{
|
{
|
||||||
@ -189,11 +189,12 @@
|
|||||||
function filter_ldap ($ldap_fields,$filterfields,$DEBUG=0)
|
function filter_ldap ($ldap_fields,$filterfields,$DEBUG=0)
|
||||||
{
|
{
|
||||||
$match = 0;
|
$match = 0;
|
||||||
if($DEBUG) { echo "<br>"; }
|
if($DEBUG) { echo '<br>'; }
|
||||||
for($i=0;$i<count($ldap_fields);$i++) {
|
for($i=0;$i<count($ldap_fields);$i++)
|
||||||
|
{
|
||||||
$yes = True;
|
$yes = True;
|
||||||
|
|
||||||
if ($ldap_fields[$i]["uidnumber"][0])
|
if ($ldap_fields[$i]['uidnumber'][0])
|
||||||
{
|
{
|
||||||
reset($filterfields);
|
reset($filterfields);
|
||||||
while (list($col,$filt) = each($filterfields))
|
while (list($col,$filt) = each($filterfields))
|
||||||
@ -208,7 +209,7 @@
|
|||||||
if($DEBUG) { echo ' Testing "'.$col.'" for "'.$val.'"'; }
|
if($DEBUG) { echo ' Testing "'.$col.'" for "'.$val.'"'; }
|
||||||
if ($val == $filt)
|
if ($val == $filt)
|
||||||
{
|
{
|
||||||
if($DEBUG) { echo ', and number '.$ldap_fields[$i]["uidnumber"][0].' matched.'." "; }
|
if($DEBUG) { echo ', and number '.$ldap_fields[$i]['uidnumber'][0].' matched.'.' '; }
|
||||||
$yes &= True;
|
$yes &= True;
|
||||||
$match++;
|
$match++;
|
||||||
break;
|
break;
|
||||||
@ -220,13 +221,13 @@
|
|||||||
if($DEBUG) { echo ' Testing "'.$col.'" for "'.$filt.'"'; }
|
if($DEBUG) { echo ' Testing "'.$col.'" for "'.$filt.'"'; }
|
||||||
if ($ldap_fields[$i][$col][0] == $filt)
|
if ($ldap_fields[$i][$col][0] == $filt)
|
||||||
{
|
{
|
||||||
if($DEBUG) { echo ', and number '.$ldap_fields[$i]["uidnumber"][0].' matched.'." "; }
|
if($DEBUG) { echo ', and number '.$ldap_fields[$i]['uidnumber'][0].' matched.'.' '; }
|
||||||
$yes &= True;
|
$yes &= True;
|
||||||
$match++;
|
$match++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if($DEBUG) { echo ', but number '.$ldap_fields[$i]["uidnumber"][0].' did not match.'." "; }
|
if($DEBUG) { echo ', but number '.$ldap_fields[$i]['uidnumber'][0].' did not match.'.' '; }
|
||||||
$yes &= False;
|
$yes &= False;
|
||||||
$match--;
|
$match--;
|
||||||
}
|
}
|
||||||
@ -237,13 +238,13 @@
|
|||||||
if($DEBUG) { echo ' Testing "'.$col.'" for "'.$filt.'"'; }
|
if($DEBUG) { echo ' Testing "'.$col.'" for "'.$filt.'"'; }
|
||||||
if ($ldap_fields[$i][$col][0] == $filt)
|
if ($ldap_fields[$i][$col][0] == $filt)
|
||||||
{
|
{
|
||||||
if($DEBUG) { echo ', and number '.$ldap_fields[$i]["uidnumber"][0].' matched.'." "; }
|
if($DEBUG) { echo ', and number '.$ldap_fields[$i]['uidnumber'][0].' matched.'.' '; }
|
||||||
$yes &= True;
|
$yes &= True;
|
||||||
$match++;
|
$match++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if($DEBUG) { echo ', but number '.$ldap_fields[$i]["uidnumber"][0].' did not match.'." "; }
|
if($DEBUG) { echo ', but number '.$ldap_fields[$i]['uidnumber'][0].' did not match.'.' '; }
|
||||||
$yes &= False;
|
$yes &= False;
|
||||||
$match--;
|
$match--;
|
||||||
}
|
}
|
||||||
@ -252,12 +253,12 @@
|
|||||||
|
|
||||||
if ($yes)
|
if ($yes)
|
||||||
{
|
{
|
||||||
if($DEBUG) { echo $ldap_fields[$i]["uidnumber"][0].' matched all!'."<br>"; }
|
if($DEBUG) { echo $ldap_fields[$i]['uidnumber'][0].' matched all!'.'<br>'; }
|
||||||
$new_ldap[] = $ldap_fields[$i];
|
$new_ldap[] = $ldap_fields[$i];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if($DEBUG) { echo $ldap_fields[$i]["uidnumber"][0].' did not match all.'."<br>"; }
|
if($DEBUG) { echo $ldap_fields[$i]['uidnumber'][0].' did not match all.'.'<br>'; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -279,12 +280,9 @@
|
|||||||
|
|
||||||
function formatted_address($id = '',$fields = '',$business = True)
|
function formatted_address($id = '',$fields = '',$business = True)
|
||||||
{
|
{
|
||||||
global $phpgw,$phpgw_info;
|
$font = $GLOBALS['phpgw_info']['theme']['font'];
|
||||||
|
|
||||||
$font = $phpgw_info['theme']['font'];
|
|
||||||
|
|
||||||
$t = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('addressbook'));
|
|
||||||
|
|
||||||
|
$t = CreateObject('phpgwapi.Template',$GLOBALS['phpgw']->common->get_tpl_dir('addressbook'));
|
||||||
$s = CreateObject('phpgwapi.sbox');
|
$s = CreateObject('phpgwapi.sbox');
|
||||||
|
|
||||||
$address = $this->read_single_entry($id,$fields);
|
$address = $this->read_single_entry($id,$fields);
|
||||||
@ -313,7 +311,7 @@
|
|||||||
|
|
||||||
if (! $country)
|
if (! $country)
|
||||||
{
|
{
|
||||||
$country = $phpgw_info['user']['preferences']['common']['country'];
|
$country = $GLOBALS['phpgw_info']['user']['preferences']['common']['country'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file_exists(PHPGW_SERVER_ROOT . SEP . 'addressbook' . SEP . 'templates' . SEP .'default' . SEP . 'format_' . strtolower($country) . '.tpl'))
|
if (file_exists(PHPGW_SERVER_ROOT . SEP . 'addressbook' . SEP . 'templates' . SEP .'default' . SEP . 'format_' . strtolower($country) . '.tpl'))
|
||||||
|
Loading…
Reference in New Issue
Block a user