Mercurial > hg > rc2
comparison program/include/rcmail.php @ 27:c32b53434b47
more compensation for deprecated empty cases
| author | Charlie Root |
|---|---|
| date | Sun, 18 Jan 2026 14:20:29 -0500 |
| parents | 303b85d5b561 |
| children |
comparison
equal
deleted
inserted
replaced
| 25:bea5a38be938 | 27:c32b53434b47 |
|---|---|
| 198 * @return rcube_contacts Address book object | 198 * @return rcube_contacts Address book object |
| 199 */ | 199 */ |
| 200 public function get_address_book($id, $writeable = false) | 200 public function get_address_book($id, $writeable = false) |
| 201 { | 201 { |
| 202 $contacts = null; | 202 $contacts = null; |
| 203 $default = false; | |
| 203 $ldap_config = (array)$this->config->get('ldap_public'); | 204 $ldap_config = (array)$this->config->get('ldap_public'); |
| 204 | 205 |
| 205 // 'sql' is the alias for '0' used by autocomplete | 206 // 'sql' is the alias for '0' used by autocomplete |
| 206 if ($id == 'sql') | 207 if ($id == 'sql') |
| 207 $id = '0'; | 208 $id = '0'; |
| 1494 if ($pos !== false) { | 1495 if ($pos !== false) { |
| 1495 $subFolders = substr($folder, $pos+1); | 1496 $subFolders = substr($folder, $pos+1); |
| 1496 $currentFolder = substr($folder, 0, $pos); | 1497 $currentFolder = substr($folder, 0, $pos); |
| 1497 | 1498 |
| 1498 // sometimes folder has a delimiter as the last character | 1499 // sometimes folder has a delimiter as the last character |
| 1499 if (!strlen($subFolders)) { | 1500 if (empty($subFolders)) { |
| 1500 $virtual = false; | 1501 $virtual = false; |
| 1501 } | 1502 } |
| 1502 else if (!isset($arrFolders[$currentFolder])) { | 1503 else if (!isset($arrFolders[$currentFolder])) { |
| 1503 $virtual = true; | 1504 $virtual = true; |
| 1504 } | 1505 } |
| 2426 if (is_string($_uid)) | 2427 if (is_string($_uid)) |
| 2427 $_uid = explode(',', $_uid); | 2428 $_uid = explode(',', $_uid); |
| 2428 | 2429 |
| 2429 // create a per-folder UIDs array | 2430 // create a per-folder UIDs array |
| 2430 foreach ((array)$_uid as $uid) { | 2431 foreach ((array)$_uid as $uid) { |
| 2431 list($uid, $mbox) = explode('-', $uid, 2); | 2432 list($uid, $mbox) = array_pad(explode('-', $uid, 2), 2, ""); |
| 2432 if (!strlen($mbox)) { | 2433 if (empty($mbox)) { |
| 2433 $mbox = $_mbox; | 2434 $mbox = $_mbox; |
| 2434 } | 2435 } |
| 2435 else { | 2436 else { |
| 2436 $is_multifolder = true; | 2437 $is_multifolder = true; |
| 2437 } | 2438 } |
