mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 22:57:14 +02:00
Fix: Userclass filtering was failing in admin -> users.
This commit is contained in:
@@ -227,7 +227,7 @@ class users_admin_ui extends e_admin_ui
|
||||
'user_email' => array('title' => LAN_EMAIL, 'tab'=>0, 'type' => 'text', 'inline'=>true, 'data'=>'str', 'width' => 'auto'),
|
||||
'user_hideemail' => array('title' => LAN_USER_10, 'tab'=>0, 'type' => 'boolean', 'data'=>'int', 'width' => 'auto', 'thclass'=>'center', 'class'=>'center', 'filter'=>true, 'batch'=>true, 'readParms'=>'trueonly=1'),
|
||||
'user_xup' => array('title' => 'Xup', 'tab'=>0, 'noedit'=>true, 'type' => 'text', 'data'=>'str', 'width' => 'auto'),
|
||||
'user_class' => array('title' => LAN_USER_12, 'tab'=>0, 'type' => 'userclasses' , 'inline'=>true, 'writeParms' => 'classlist=classes', 'filter'=>true, 'batch'=>true),
|
||||
'user_class' => array('title' => LAN_USER_12, 'tab'=>0, 'type' => 'userclasses' , 'data'=>'str', 'inline'=>true, 'writeParms' => 'classlist=classes', 'filter'=>true, 'batch'=>true),
|
||||
'user_join' => array('title' => LAN_USER_14, 'tab'=>0, 'noedit'=>true, 'type' => 'datestamp', 'width' => 'auto', 'writeParms'=>'readonly=1'),
|
||||
'user_lastvisit' => array('title' => LAN_USER_15, 'tab'=>0, 'noedit'=>true, 'type' => 'datestamp', 'width' => 'auto'),
|
||||
'user_currentvisit' => array('title' => LAN_USER_16, 'tab'=>0, 'noedit'=>true, 'type' => 'datestamp', 'width' => 'auto'),
|
||||
@@ -278,7 +278,7 @@ class users_admin_ui extends e_admin_ui
|
||||
|
||||
if($this->getAction() == 'edit')
|
||||
{
|
||||
$this->fields['user_class']['noedit'] = true;
|
||||
$this->fields['user_class']['noedit'] = true;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -3618,14 +3618,15 @@ class e_admin_controller_ui extends e_admin_controller
|
||||
|
||||
if($filterField && $filterValue !== '' && isset($this->fields[$filterField]))
|
||||
{
|
||||
$_type = $this->fields[$filterField]['data'];
|
||||
|
||||
if($this->fields[$filterField]['type'] === 'comma' || $this->fields[$filterField]['type'] === 'checkboxes')
|
||||
$_dataType = $this->fields[$filterField]['data'];
|
||||
$_fieldType = $this->fields[$filterField]['type'];
|
||||
|
||||
if($_fieldType === 'comma' || $_fieldType === 'checkboxes' || $_fieldType == 'userclasses')
|
||||
{
|
||||
$_type = 'set';
|
||||
$_dataType = 'set';
|
||||
}
|
||||
|
||||
switch ($_type)
|
||||
switch ($_dataType)
|
||||
{
|
||||
case 'set':
|
||||
$searchQry[] = "FIND_IN_SET('".$tp->toDB($filterValue)."', ".$this->fields[$filterField]['__tableField'].")";
|
||||
@@ -3633,7 +3634,7 @@ class e_admin_controller_ui extends e_admin_controller
|
||||
|
||||
case 'int':
|
||||
case 'integer':
|
||||
if($this->fields[$filterField]['type'] == 'datestamp') // Past Month, Past Year etc.
|
||||
if($_fieldType == 'datestamp') // Past Month, Past Year etc.
|
||||
{
|
||||
$searchQry[] = $this->fields[$filterField]['__tableField']." > ".intval($filterValue);
|
||||
}
|
||||
@@ -3654,7 +3655,7 @@ class e_admin_controller_ui extends e_admin_controller
|
||||
else
|
||||
{
|
||||
|
||||
if($this->fields[$filterField]['type'] == 'method') // More flexible filtering.
|
||||
if($_fieldType == 'method') // More flexible filtering.
|
||||
{
|
||||
|
||||
$searchQry[] = $this->fields[$filterField]['__tableField']." LIKE \"%".$tp->toDB($filterValue)."%\"";
|
||||
|
@@ -40,7 +40,7 @@ class e107TinyMceParser
|
||||
|
||||
if(!empty($_GET['debug']) && getperms('0'))
|
||||
{
|
||||
$debug = true; // For future use.
|
||||
$debug = true; // For future use.
|
||||
// $_POST['content'] = '';
|
||||
// $_POST['mode'] = $_GET['mode'];
|
||||
}
|
||||
|
Reference in New Issue
Block a user