mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-08 02:01:58 +01:00
minor gui fixes
This commit is contained in:
parent
d0ef91ea72
commit
d3073dd444
@ -370,7 +370,7 @@ class ModelSearchMessage extends Model {
|
||||
}
|
||||
|
||||
|
||||
private function highlight_search_terms($s = '', $terms = array()) {
|
||||
private function highlight_search_terms($s = '', $terms = '') {
|
||||
$terms = preg_replace("/(\'|\")/", "", $terms);
|
||||
|
||||
$terms = explode(" ", $terms);
|
||||
@ -378,7 +378,7 @@ class ModelSearchMessage extends Model {
|
||||
if(count($terms) <= 0) { return $s; }
|
||||
|
||||
while(list($k, $v) = each($terms)) {
|
||||
if($v == '') { continue; }
|
||||
if(strlen($v) < 3) { continue; }
|
||||
|
||||
$s = preg_replace("/$v/i", "<span class=\"message_highlight\">$v</span>", $s);
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ class ModelUserAuth extends Model {
|
||||
|
||||
$query = $ldap->query(LDAP_BASE_DN, "(&(objectClass=" . LDAP_ACCOUNT_OBJECTCLASS . ")(" . LDAP_MAIL_ATTR . "=$username))", array());
|
||||
|
||||
if(isset($query->row['dn'])) {
|
||||
if(isset($query->row['dn']) && $query->row['dn']) {
|
||||
$a = $query->row;
|
||||
|
||||
$ldap_auth = new LDAP(LDAP_HOST, $a['dn'], $password);
|
||||
|
Loading…
Reference in New Issue
Block a user