mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Fix for broken Admin-ui field columns when NULL values under some circumstances.
This commit is contained in:
@@ -219,7 +219,7 @@ class users_admin_ui extends e_admin_ui
|
|||||||
'user_image' => array('title' => LAN_USER_07, 'tab'=>0, 'type' => 'dropdown', 'data'=>'str', 'width' => 'auto'), // Avatar
|
'user_image' => array('title' => LAN_USER_07, 'tab'=>0, 'type' => 'dropdown', 'data'=>'str', 'width' => 'auto'), // Avatar
|
||||||
'user_email' => array('title' => LAN_EMAIL, 'tab'=>0, 'type' => 'text', 'inline'=>true, 'data'=>'str', 'width' => 'auto'),
|
'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_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', 'width' => 'auto'),
|
'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' , '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_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_lastvisit' => array('title' => LAN_USER_15, 'tab'=>0, 'noedit'=>true, 'type' => 'datestamp', 'width' => 'auto'),
|
||||||
|
@@ -2676,18 +2676,18 @@ class e_form
|
|||||||
$trclass = vartrue($fieldvalues['__trclass']) ? ' class="'.$trclass.'"' : '';
|
$trclass = vartrue($fieldvalues['__trclass']) ? ' class="'.$trclass.'"' : '';
|
||||||
unset($fieldvalues['__trclass']);
|
unset($fieldvalues['__trclass']);
|
||||||
|
|
||||||
|
|
||||||
foreach ($fieldarray as $field => $data)
|
foreach ($fieldarray as $field => $data)
|
||||||
{
|
{
|
||||||
// shouldn't happen...
|
|
||||||
|
|
||||||
|
// shouldn't happen... test with Admin->Users with user_xup visible and NULL values in user_xup table column before re-enabling this code.
|
||||||
|
/*
|
||||||
if(!isset($fieldvalues[$field]) && vartrue($data['alias']))
|
if(!isset($fieldvalues[$field]) && vartrue($data['alias']))
|
||||||
{
|
{
|
||||||
$fieldvalues[$data['alias']] = $fieldvalues[$data['field']];
|
$fieldvalues[$data['alias']] = $fieldvalues[$data['field']];
|
||||||
$field = $data['alias'];
|
$field = $data['alias'];
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Not found
|
//Not found
|
||||||
if((!varset($data['forced']) && !in_array($field, $currentlist)) || varset($data['nolist']))
|
if((!varset($data['forced']) && !in_array($field, $currentlist)) || varset($data['nolist']))
|
||||||
@@ -2739,6 +2739,8 @@ class e_form
|
|||||||
}
|
}
|
||||||
$value = $this->renderValue($field, varset($fieldvalues[$field]), $data, varset($fieldvalues[$pid]));
|
$value = $this->renderValue($field, varset($fieldvalues[$field]), $data, varset($fieldvalues[$pid]));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if($tdclass)
|
if($tdclass)
|
||||||
{
|
{
|
||||||
$tdclass = ' class="'.$tdclass.'"';
|
$tdclass = ' class="'.$tdclass.'"';
|
||||||
|
Reference in New Issue
Block a user