@@ -26,10 +26,10 @@ |
||
| 26 | 26 | * @param string $msg =null message, default "Entry not found!" |
| 27 | 27 | * @param int $code =99 numerical code, default 2 |
| 28 | 28 | */ |
| 29 | - function __construct($msg=null,$code=2) |
|
| 29 | + function __construct($msg = null, $code = 2) |
|
| 30 | 30 | { |
| 31 | 31 | if (is_null($msg)) $msg = lang('Entry not found!'); |
| 32 | 32 | |
| 33 | - parent::__construct($msg,$code); |
|
| 33 | + parent::__construct($msg, $code); |
|
| 34 | 34 | } |
| 35 | 35 | } |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | * @param string $msg |
| 34 | 34 | * @param int $code |
| 35 | 35 | */ |
| 36 | - function __construct($url,$app=null,$msg=null,$code=301) |
|
| 36 | + function __construct($url, $app = null, $msg = null, $code = 301) |
|
| 37 | 37 | { |
| 38 | 38 | $this->url = $url; |
| 39 | 39 | $this->app = $app; |
@@ -27,10 +27,10 @@ |
||
| 27 | 27 | * @param string $msg =null message, default "Permission denied!" |
| 28 | 28 | * @param int $code =100 numerical code, default 100 |
| 29 | 29 | */ |
| 30 | - function __construct($msg=null,$code=100) |
|
| 30 | + function __construct($msg = null, $code = 100) |
|
| 31 | 31 | { |
| 32 | 32 | if (is_null($msg)) $msg = lang('Permisson denied!'); |
| 33 | 33 | |
| 34 | - parent::__construct($msg,$code); |
|
| 34 | + parent::__construct($msg, $code); |
|
| 35 | 35 | } |
| 36 | 36 | } |
@@ -99,13 +99,13 @@ discard block |
||
| 99 | 99 | * @param array $params =array() additional parameters, row is always first parameter |
| 100 | 100 | * @param $key_callback =null optional callback, if you want different keys |
| 101 | 101 | */ |
| 102 | - public function __construct(\Traversable $rs, $callback, $params=array(), $key_callback=null) |
|
| 102 | + public function __construct(\Traversable $rs, $callback, $params = array(), $key_callback = null) |
|
| 103 | 103 | { |
| 104 | 104 | $this->callback = $callback; |
| 105 | 105 | $this->params = $params; |
| 106 | 106 | $this->key_callback = $key_callback; |
| 107 | 107 | |
| 108 | - if (is_a($rs,'IteratorAggregate')) |
|
| 108 | + if (is_a($rs, 'IteratorAggregate')) |
|
| 109 | 109 | { |
| 110 | 110 | $this->rs = $rs->getIterator(); |
| 111 | 111 | } |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | */ |
| 123 | 123 | public function current() |
| 124 | 124 | { |
| 125 | - if (is_a($this->rs,'iterator')) |
|
| 125 | + if (is_a($this->rs, 'iterator')) |
|
| 126 | 126 | { |
| 127 | 127 | $params = $this->params; |
| 128 | 128 | array_unshift($params, $this->rs->current()); |
@@ -138,11 +138,10 @@ discard block |
||
| 138 | 138 | */ |
| 139 | 139 | public function key() |
| 140 | 140 | { |
| 141 | - if (is_a($this->rs,'iterator')) |
|
| 141 | + if (is_a($this->rs, 'iterator')) |
|
| 142 | 142 | { |
| 143 | 143 | return $this->key_callback ? |
| 144 | - call_user_func($this->key_callback, $this->rs->current()) : |
|
| 145 | - $this->rs->key(); |
|
| 144 | + call_user_func($this->key_callback, $this->rs->current()) : $this->rs->key(); |
|
| 146 | 145 | } |
| 147 | 146 | return 0; |
| 148 | 147 | } |
@@ -152,7 +151,7 @@ discard block |
||
| 152 | 151 | */ |
| 153 | 152 | public function next() |
| 154 | 153 | { |
| 155 | - if (is_a($this->rs,'iterator')) |
|
| 154 | + if (is_a($this->rs, 'iterator')) |
|
| 156 | 155 | { |
| 157 | 156 | return $this->rs->next(); |
| 158 | 157 | } |
@@ -163,7 +162,7 @@ discard block |
||
| 163 | 162 | */ |
| 164 | 163 | public function rewind() |
| 165 | 164 | { |
| 166 | - if (is_a($this->rs,'iterator')) |
|
| 165 | + if (is_a($this->rs, 'iterator')) |
|
| 167 | 166 | { |
| 168 | 167 | return $this->rs->rewind(); |
| 169 | 168 | } |
@@ -174,9 +173,9 @@ discard block |
||
| 174 | 173 | * |
| 175 | 174 | * @return boolean |
| 176 | 175 | */ |
| 177 | - public function valid () |
|
| 176 | + public function valid() |
|
| 178 | 177 | { |
| 179 | - if (is_a($this->rs,'iterator')) |
|
| 178 | + if (is_a($this->rs, 'iterator')) |
|
| 180 | 179 | { |
| 181 | 180 | return $this->rs->valid(); |
| 182 | 181 | } |
@@ -27,10 +27,10 @@ |
||
| 27 | 27 | * @param string $msg =null message, default "Database error!" |
| 28 | 28 | * @param int $code =100 |
| 29 | 29 | */ |
| 30 | - function __construct($msg=null,$code=100) |
|
| 30 | + function __construct($msg = null, $code = 100) |
|
| 31 | 31 | { |
| 32 | 32 | if (is_null($msg)) $msg = lang('Database error!'); |
| 33 | 33 | |
| 34 | - parent::__construct($msg,$code); |
|
| 34 | + parent::__construct($msg, $code); |
|
| 35 | 35 | } |
| 36 | 36 | } |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | * @return ADORecordSet or false, if the query fails |
| 55 | 55 | * @throws EGroupware\Api\Db\Exception\InvalidSql with $this->Link_ID->ErrorNo() as code |
| 56 | 56 | */ |
| 57 | - function query($Query_String, $line = '', $file = '', $offset=0, $num_rows=-1, $inputarr=false, $fetchmode=self::FETCH_BOTH, $reconnect=true) |
|
| 57 | + function query($Query_String, $line = '', $file = '', $offset = 0, $num_rows = -1, $inputarr = false, $fetchmode = self::FETCH_BOTH, $reconnect = true) |
|
| 58 | 58 | { |
| 59 | 59 | // New query, discard previous result. |
| 60 | 60 | if ($this->Query_ID) |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | */ |
| 103 | 103 | function free() |
| 104 | 104 | { |
| 105 | - unset($this->Query_ID); // else copying of the db-object does not work |
|
| 105 | + unset($this->Query_ID); // else copying of the db-object does not work |
|
| 106 | 106 | $this->Query_ID = 0; |
| 107 | 107 | } |
| 108 | 108 | |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | * @param int $fetch_mode self::FETCH_BOTH = numerical+assoc keys (eGW default), self::FETCH_ASSOC or self::FETCH_NUM |
| 116 | 116 | * @return bool was another row found? |
| 117 | 117 | */ |
| 118 | - function next_record($fetch_mode=self::FETCH_BOTH) |
|
| 118 | + function next_record($fetch_mode = self::FETCH_BOTH) |
|
| 119 | 119 | { |
| 120 | 120 | if (!$this->Query_ID) |
| 121 | 121 | { |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | } |
| 136 | 136 | if ($this->capabilities[self::CAPABILITY_NAME_CASE] == 'upper') // maxdb, oracle, ... |
| 137 | 137 | { |
| 138 | - switch($fetch_mode) |
|
| 138 | + switch ($fetch_mode) |
|
| 139 | 139 | { |
| 140 | 140 | case self::FETCH_ASSOC: |
| 141 | 141 | $this->Record = array_change_key_case($this->Record); |
@@ -172,9 +172,9 @@ discard block |
||
| 172 | 172 | */ |
| 173 | 173 | function seek($pos = 0) |
| 174 | 174 | { |
| 175 | - if (!$this->Query_ID || !$this->Query_ID->Move($this->Row = $pos)) |
|
| 175 | + if (!$this->Query_ID || !$this->Query_ID->Move($this->Row = $pos)) |
|
| 176 | 176 | { |
| 177 | - throw new Exception("seek($pos) failed: resultset has " . $this->num_rows() . " rows"); |
|
| 177 | + throw new Exception("seek($pos) failed: resultset has ".$this->num_rows()." rows"); |
|
| 178 | 178 | } |
| 179 | 179 | return True; |
| 180 | 180 | } |
@@ -187,9 +187,9 @@ discard block |
||
| 187 | 187 | * @param string $mode type of lock required (optional), default write |
| 188 | 188 | * @return bool True if sucessful, False if fails |
| 189 | 189 | */ |
| 190 | - function lock($table, $mode='write') |
|
| 190 | + function lock($table, $mode = 'write') |
|
| 191 | 191 | { |
| 192 | - unset($table, $mode); // not used anymore |
|
| 192 | + unset($table, $mode); // not used anymore |
|
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | /** |
@@ -278,18 +278,18 @@ discard block |
||
| 278 | 278 | * @param string $strip ='' string to strip of the column-name, default '' |
| 279 | 279 | * @return array/bool the associative array or False if no (more) result-row is availible |
| 280 | 280 | */ |
| 281 | - function row($do_next_record=False,$strip='') |
|
| 281 | + function row($do_next_record = False, $strip = '') |
|
| 282 | 282 | { |
| 283 | 283 | if ($do_next_record && !$this->next_record(self::FETCH_ASSOC) || !is_array($this->Record)) |
| 284 | 284 | { |
| 285 | 285 | return False; |
| 286 | 286 | } |
| 287 | 287 | $result = array(); |
| 288 | - foreach($this->Record as $column => $value) |
|
| 288 | + foreach ($this->Record as $column => $value) |
|
| 289 | 289 | { |
| 290 | 290 | if (!is_numeric($column)) |
| 291 | 291 | { |
| 292 | - if ($strip) $column = str_replace($strip,'',$column); |
|
| 292 | + if ($strip) $column = str_replace($strip, '', $column); |
|
| 293 | 293 | |
| 294 | 294 | $result[$column] = $value; |
| 295 | 295 | } |
@@ -64,12 +64,12 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | static $sub_objects = array( |
| 66 | 66 | 'log' => 'errorlog', |
| 67 | - 'link' => 'bolink', // depricated use static egw_link methods |
|
| 67 | + 'link' => 'bolink', // depricated use static egw_link methods |
|
| 68 | 68 | 'datetime' => 'egw_datetime', |
| 69 | 69 | // classes moved to new api dir |
| 70 | 70 | 'template' => true, |
| 71 | 71 | 'applications' => 'EGroupware\\Api\\Egw\\Applications', |
| 72 | - 'framework' => true, // special handling in __get() |
|
| 72 | + 'framework' => true, // special handling in __get() |
|
| 73 | 73 | 'ldap' => true, |
| 74 | 74 | ); |
| 75 | 75 | |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | { |
| 96 | 96 | //error_log(__METHOD__."($name)".function_backtrace()); |
| 97 | 97 | |
| 98 | - if ($name == 'js') $name = 'framework'; // javascript class is integrated now into framework |
|
| 98 | + if ($name == 'js') $name = 'framework'; // javascript class is integrated now into framework |
|
| 99 | 99 | |
| 100 | 100 | if (isset($this->$name)) |
| 101 | 101 | { |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | if ($name != 'ADOdb') error_log(__METHOD__.": There's NO $name object! ".function_backtrace()); |
| 108 | 108 | return null; |
| 109 | 109 | } |
| 110 | - switch($name) |
|
| 110 | + switch ($name) |
|
| 111 | 111 | { |
| 112 | 112 | case 'framework': |
| 113 | 113 | return $this->framework = Api\Framework::factory(); |
@@ -106,17 +106,17 @@ discard block |
||
| 106 | 106 | * @param array $old =null old/last state of the entry or null for a new entry |
| 107 | 107 | * @return mixed |
| 108 | 108 | */ |
| 109 | - function get_config($name,$data,$old=null) |
|
| 109 | + function get_config($name, $data, $old = null) |
|
| 110 | 110 | { |
| 111 | - unset($old); // not used, but required by function signature |
|
| 111 | + unset($old); // not used, but required by function signature |
|
| 112 | 112 | |
| 113 | - switch($name) |
|
| 113 | + switch ($name) |
|
| 114 | 114 | { |
| 115 | 115 | case 'copy': |
| 116 | 116 | if ($data['is_contactform']) |
| 117 | 117 | { |
| 118 | - $copy = preg_split('/, ?/',$data['email_contactform']); |
|
| 119 | - if ($data['email_copytoreceiver']) $copy[] = $data['email']; |
|
| 118 | + $copy = preg_split('/, ?/', $data['email_contactform']); |
|
| 119 | + if ($data['email_copytoreceiver']) $copy[] = $data['email']; |
|
| 120 | 120 | return $copy; |
| 121 | 121 | } |
| 122 | 122 | break; |
@@ -144,27 +144,27 @@ discard block |
||
| 144 | 144 | * @param array $changed_fields =null changed fields from ealier call to $this->changed_fields($data,$old), to not compute it again |
| 145 | 145 | * @return int number of log-entries made |
| 146 | 146 | */ |
| 147 | - protected function save_history(array $data,array $old=null,$deleted=null,array $changed_fields=null) |
|
| 147 | + protected function save_history(array $data, array $old = null, $deleted = null, array $changed_fields = null) |
|
| 148 | 148 | { |
| 149 | 149 | if (is_null($changed_fields)) |
| 150 | 150 | { |
| 151 | - $changed_fields = self::changed_fields($data,$old); |
|
| 151 | + $changed_fields = self::changed_fields($data, $old); |
|
| 152 | 152 | } |
| 153 | 153 | if (!$changed_fields) return 0; |
| 154 | 154 | |
| 155 | - foreach(array('adr_one_countryname' => 'adr_one_countrycode', 'adr_two_countryname' => 'adr_two_countrycode') as $name => $code) |
|
| 155 | + foreach (array('adr_one_countryname' => 'adr_one_countrycode', 'adr_two_countryname' => 'adr_two_countrycode') as $name => $code) |
|
| 156 | 156 | { |
| 157 | 157 | // Only codes involved, but old text name is automatically added when loaded |
| 158 | - if($old[$code] && $data[$code] && ($key = array_search($name, $changed_fields)) !== false) |
|
| 158 | + if ($old[$code] && $data[$code] && ($key = array_search($name, $changed_fields)) !== false) |
|
| 159 | 159 | { |
| 160 | 160 | unset($changed_fields[$key]); |
| 161 | 161 | continue; |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | // Code and a text name |
| 165 | - if(in_array($name, $changed_fields) && in_array($code, $changed_fields)) |
|
| 165 | + if (in_array($name, $changed_fields) && in_array($code, $changed_fields)) |
|
| 166 | 166 | { |
| 167 | - if($data[$code]) |
|
| 167 | + if ($data[$code]) |
|
| 168 | 168 | { |
| 169 | 169 | $data[$name] = Api\Country::get_full_name($data[$code], true); |
| 170 | 170 | } |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | } |
| 173 | 173 | } |
| 174 | 174 | //error_log(__METHOD__.__LINE__.' ChangedFields:'.array2string($changed_fields)); |
| 175 | - return parent::save_history($data,$old,$deleted,$changed_fields); |
|
| 175 | + return parent::save_history($data, $old, $deleted, $changed_fields); |
|
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | /** |
@@ -183,9 +183,9 @@ discard block |
||
| 183 | 183 | * @param int|string $receiver nummeric account_id or email address |
| 184 | 184 | * @return string |
| 185 | 185 | */ |
| 186 | - protected function get_message($data,$old,$receiver=null) |
|
| 186 | + protected function get_message($data, $old, $receiver = null) |
|
| 187 | 187 | { |
| 188 | - unset($receiver); // not used, but required by function signature |
|
| 188 | + unset($receiver); // not used, but required by function signature |
|
| 189 | 189 | |
| 190 | 190 | if (!$data['modified'] || !$old) |
| 191 | 191 | { |
@@ -207,9 +207,9 @@ discard block |
||
| 207 | 207 | * @param int|string $receiver nummeric account_id or email address |
| 208 | 208 | * @return string |
| 209 | 209 | */ |
| 210 | - protected function get_subject($data,$old,$deleted=null,$receiver=null) |
|
| 210 | + protected function get_subject($data, $old, $deleted = null, $receiver = null) |
|
| 211 | 211 | { |
| 212 | - unset($old, $deleted, $receiver); // not used, but required by function signature |
|
| 212 | + unset($old, $deleted, $receiver); // not used, but required by function signature |
|
| 213 | 213 | |
| 214 | 214 | if ($data['is_contactform']) |
| 215 | 215 | { |
@@ -225,15 +225,15 @@ discard block |
||
| 225 | 225 | * @param int|string $receiver nummeric account_id or email address |
| 226 | 226 | * @return array of details as array with values for keys 'label','value','type' |
| 227 | 227 | */ |
| 228 | - function get_details($data,$receiver=null) |
|
| 228 | + function get_details($data, $receiver = null) |
|
| 229 | 229 | { |
| 230 | - unset($receiver); // not used, but required by function signature |
|
| 230 | + unset($receiver); // not used, but required by function signature |
|
| 231 | 231 | |
| 232 | - foreach($this->contacts->contact_fields as $name => $label) |
|
| 232 | + foreach ($this->contacts->contact_fields as $name => $label) |
|
| 233 | 233 | { |
| 234 | 234 | if (!$data[$name] && $name != 'owner') continue; |
| 235 | 235 | |
| 236 | - switch($name) |
|
| 236 | + switch ($name) |
|
| 237 | 237 | { |
| 238 | 238 | case 'n_prefix': case 'n_given': case 'n_middle': case 'n_family': case 'n_suffix': // already in n_fn |
| 239 | 239 | case 'n_fileas': case 'id': case 'tid': |
@@ -263,13 +263,13 @@ discard block |
||
| 263 | 263 | if ($data[$name]) |
| 264 | 264 | { |
| 265 | 265 | $cats = array(); |
| 266 | - foreach(is_array($data[$name]) ? $data[$name] : explode(',',$data[$name]) as $cat_id) |
|
| 266 | + foreach (is_array($data[$name]) ? $data[$name] : explode(',', $data[$name]) as $cat_id) |
|
| 267 | 267 | { |
| 268 | 268 | $cats[] = $GLOBALS['egw']->cats->id2name($cat_id); |
| 269 | 269 | } |
| 270 | 270 | $details[$name] = array( |
| 271 | 271 | 'label' => $label, |
| 272 | - 'value' => explode(', ',$cats), |
|
| 272 | + 'value' => explode(', ', $cats), |
|
| 273 | 273 | ); |
| 274 | 274 | } |
| 275 | 275 | case 'note': |
@@ -35,8 +35,8 @@ discard block |
||
| 35 | 35 | * minimum: $this->columns_to_search = array('n_family','n_given','org_name','email'); |
| 36 | 36 | */ |
| 37 | 37 | var $search_attributes = array( |
| 38 | - 'n_family','n_middle','n_given','org_name','org_unit', |
|
| 39 | - 'adr_one_location','note','email','samaccountname', |
|
| 38 | + 'n_family', 'n_middle', 'n_given', 'org_name', 'org_unit', |
|
| 39 | + 'adr_one_location', 'note', 'email', 'samaccountname', |
|
| 40 | 40 | ); |
| 41 | 41 | |
| 42 | 42 | /** |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | * |
| 51 | 51 | * @var string |
| 52 | 52 | */ |
| 53 | - var $dn_attribute='cn'; |
|
| 53 | + var $dn_attribute = 'cn'; |
|
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | 56 | * Do NOT attempt to change DN (dn-attribute can NOT be part of schemas used in addressbook!) |
@@ -82,11 +82,11 @@ discard block |
||
| 82 | 82 | * @param array $ldap_config =null default use from $GLOBALS['egw_info']['server'] |
| 83 | 83 | * @param resource $ds =null ldap connection to use |
| 84 | 84 | */ |
| 85 | - function __construct(array $ldap_config=null, $ds=null) |
|
| 85 | + function __construct(array $ldap_config = null, $ds = null) |
|
| 86 | 86 | { |
| 87 | - if (false) parent::__construct (); // quiten IDE warning, we are explicitly NOT calling parrent constructor! |
|
| 87 | + if (false) parent::__construct(); // quiten IDE warning, we are explicitly NOT calling parrent constructor! |
|
| 88 | 88 | |
| 89 | - $this->accountName = $GLOBALS['egw_info']['user']['account_lid']; |
|
| 89 | + $this->accountName = $GLOBALS['egw_info']['user']['account_lid']; |
|
| 90 | 90 | |
| 91 | 91 | if ($ldap_config) |
| 92 | 92 | { |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | } |
| 95 | 95 | else |
| 96 | 96 | { |
| 97 | - $this->ldap_config =& $GLOBALS['egw_info']['server']; |
|
| 97 | + $this->ldap_config = & $GLOBALS['egw_info']['server']; |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | $this->accounts_ads = $GLOBALS['egw']->accounts->backend; |
@@ -119,15 +119,15 @@ discard block |
||
| 119 | 119 | 'account_id' => 'objectsid', |
| 120 | 120 | 'id' => 'objectguid', |
| 121 | 121 | 'uid' => 'objectguid', |
| 122 | - 'n_fn' => 'displayname', // leave CN used in DN untouched |
|
| 123 | - 'accountexpires', 'useraccountcontrol', // needed to exclude deactivated or expired accounts |
|
| 122 | + 'n_fn' => 'displayname', // leave CN used in DN untouched |
|
| 123 | + 'accountexpires', 'useraccountcontrol', // needed to exclude deactivated or expired accounts |
|
| 124 | 124 | )); |
| 125 | 125 | unset($this->schema2egw['user']['n_fileas']); |
| 126 | 126 | unset($this->schema2egw['inetorgperson']); |
| 127 | 127 | |
| 128 | - foreach($this->schema2egw as $attributes) |
|
| 128 | + foreach ($this->schema2egw as $attributes) |
|
| 129 | 129 | { |
| 130 | - $this->all_attributes = array_merge($this->all_attributes,array_values($attributes)); |
|
| 130 | + $this->all_attributes = array_merge($this->all_attributes, array_values($attributes)); |
|
| 131 | 131 | } |
| 132 | 132 | $this->all_attributes = array_values(array_unique($this->all_attributes)); |
| 133 | 133 | |
@@ -139,9 +139,9 @@ discard block |
||
| 139 | 139 | * |
| 140 | 140 | * @param boolean $admin =false true (re-)connect with admin not user credentials, eg. to modify accounts |
| 141 | 141 | */ |
| 142 | - function connect($admin=false) |
|
| 142 | + function connect($admin = false) |
|
| 143 | 143 | { |
| 144 | - unset($admin); // not used, but required by function signature |
|
| 144 | + unset($admin); // not used, but required by function signature |
|
| 145 | 145 | |
| 146 | 146 | $this->ds = $this->accounts_ads->ldap_connection(); |
| 147 | 147 | } |
@@ -174,15 +174,14 @@ discard block |
||
| 174 | 174 | function read($_contact_id) |
| 175 | 175 | { |
| 176 | 176 | if (is_array($_contact_id) && isset($_contact_id['account_id']) || |
| 177 | - !is_array($_contact_id) && substr($_contact_id,0,8) == 'account:') |
|
| 177 | + !is_array($_contact_id) && substr($_contact_id, 0, 8) == 'account:') |
|
| 178 | 178 | { |
| 179 | - $account_id = (int)(is_array($_contact_id) ? $_contact_id['account_id'] : substr($_contact_id,8)); |
|
| 179 | + $account_id = (int)(is_array($_contact_id) ? $_contact_id['account_id'] : substr($_contact_id, 8)); |
|
| 180 | 180 | $_contact_id = $GLOBALS['egw']->accounts->id2name($account_id, 'person_id'); |
| 181 | 181 | } |
| 182 | - $contact_id = !is_array($_contact_id) ? $_contact_id : |
|
| 183 | - (isset ($_contact_id['id']) ? $_contact_id['id'] : $_contact_id['uid']); |
|
| 182 | + $contact_id = !is_array($_contact_id) ? $_contact_id : (isset ($_contact_id['id']) ? $_contact_id['id'] : $_contact_id['uid']); |
|
| 184 | 183 | |
| 185 | - $rows = $this->_searchLDAP($this->allContactsDN, $filter=$this->id_filter($contact_id), $this->all_attributes, Ldap::ALL); |
|
| 184 | + $rows = $this->_searchLDAP($this->allContactsDN, $filter = $this->id_filter($contact_id), $this->all_attributes, Ldap::ALL); |
|
| 186 | 185 | //error_log(__METHOD__."('$contact_id') _searchLDAP($this->allContactsDN, '$filter',...)=".array2string($rows)); |
| 187 | 186 | return $rows ? $rows[0] : false; |
| 188 | 187 | } |