1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

Fix for broken Admin-ui field columns when NULL values under some circumstances.

This commit is contained in:
Cameron 2015-03-01 22:02:02 -08:00
parent 31f86d0039
commit 4c68127618
2 changed files with 9 additions and 7 deletions

View File

@ -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_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', '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_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'),

View File

@ -2675,19 +2675,19 @@ class e_form
$trclass = vartrue($fieldvalues['__trclass']) ? ' class="'.$trclass.'"' : '';
unset($fieldvalues['__trclass']);
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']))
{
$fieldvalues[$data['alias']] = $fieldvalues[$data['field']];
$field = $data['alias'];
}
*/
//Not found
if((!varset($data['forced']) && !in_array($field, $currentlist)) || varset($data['nolist']))
@ -2738,7 +2738,9 @@ class e_form
}
$value = $this->renderValue($field, varset($fieldvalues[$field]), $data, varset($fieldvalues[$pid]));
if($tdclass)
{
$tdclass = ' class="'.$tdclass.'"';