mirror of
https://github.com/e107inc/e107.git
synced 2025-08-16 11:36:08 +02:00
Private Messages: Fixes #1485. Also check language files for changes. 'fw' (fixed width) option added to $tp->toGlyph()
This commit is contained in:
@@ -1097,6 +1097,11 @@ class e_form
|
||||
case 'matchclass':
|
||||
$where = "user_class REGEXP '(^|,)(".str_replace(",","|", USERCLASS).")(,|$)'";
|
||||
$classList = USERCLASS;
|
||||
$clist = explode(",",USERCLASS);
|
||||
if(count($clist) > 1 && !isset($options['group'])) // group classes by default if more than one found.
|
||||
{
|
||||
$options['group'] = 'class';
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1106,8 +1111,14 @@ class e_form
|
||||
}
|
||||
|
||||
|
||||
|
||||
$users = e107::getDb()->retrieve("user",$fields, "WHERE ".$where." ORDER BY user_name LIMIT 1000",true);
|
||||
|
||||
if(empty($users))
|
||||
{
|
||||
return "Unavailable";
|
||||
}
|
||||
|
||||
$opt = array();
|
||||
|
||||
if(!empty($options['group']) && $options['group'] == 'class')
|
||||
@@ -1159,7 +1170,7 @@ class e_form
|
||||
* @param array|string $options [optional] 'readonly' (make field read only), 'name' (db field name, default user_name)
|
||||
* @return string HTML text for display
|
||||
*/
|
||||
function userpicker($name_fld, $id_fld, $default_name, $default_id, $options = array())
|
||||
function userpicker($name_fld, $id_fld='', $default_name, $default_id, $options = array())
|
||||
{
|
||||
if(!is_array($options))
|
||||
{
|
||||
@@ -1188,6 +1199,8 @@ class e_form
|
||||
'options' => $default_options,
|
||||
);
|
||||
|
||||
//TODO FIXME Filter by userclass. - see $frm->userlist().
|
||||
|
||||
$options = array_replace_recursive($defaults, $options);
|
||||
|
||||
$ret = $this->text($name_fld, $default_id, 20, $options);
|
||||
|
Reference in New Issue
Block a user