mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
PHP8 fixes
This commit is contained in:
parent
7da26c73b4
commit
96827c6180
@ -2026,6 +2026,8 @@ e107::getDebug()->log("Timezone: ".USERTIMEZONE); // remove later on.
|
|||||||
define('USEREMAIL', '');
|
define('USEREMAIL', '');
|
||||||
define('USERCLASS_LIST', '253,254,250,251,0'); // needed to run some queries.
|
define('USERCLASS_LIST', '253,254,250,251,0'); // needed to run some queries.
|
||||||
define('USERJOINED', '');
|
define('USERJOINED', '');
|
||||||
|
define('e_CLASS_REGEXP', '(^|,)(253|254|250|251|0)(,|$)');
|
||||||
|
define('e_NOBODY_REGEXP', '(^|,)255(,|$)');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@
|
|||||||
|
|
||||||
if ($parms[1] == 'value')
|
if ($parms[1] == 'value')
|
||||||
{
|
{
|
||||||
$uVal = str_replace(chr(1), '', $udata['user_'.$parms[0]]);
|
$uVal = isset($parms[0]) && isset($udata['user_'.$parms[0]]) ? str_replace(chr(1), '', $udata['user_'.$parms[0]]) : '';
|
||||||
switch ($ueStruct["user_".$parms[0]]['user_extended_struct_type'])
|
switch ($ueStruct["user_".$parms[0]]['user_extended_struct_type'])
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -178,6 +178,13 @@
|
|||||||
break;
|
break;
|
||||||
case EUF_DB_FIELD : // check for db_lookup type
|
case EUF_DB_FIELD : // check for db_lookup type
|
||||||
$tmp = explode(',',$ueStruct['user_'.$parms[0]]['user_extended_struct_values']);
|
$tmp = explode(',',$ueStruct['user_'.$parms[0]]['user_extended_struct_values']);
|
||||||
|
|
||||||
|
if(empty($tmp[1]) || empty($tmp[2]))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$sql_ue = new db; // Use our own DB object to avoid conflicts
|
$sql_ue = new db; // Use our own DB object to avoid conflicts
|
||||||
if($sql_ue->select($tmp[0],"{$tmp[1]}, {$tmp[2]}","{$tmp[1]} = '{$uVal}'"))
|
if($sql_ue->select($tmp[0],"{$tmp[1]}, {$tmp[2]}","{$tmp[1]} = '{$uVal}'"))
|
||||||
{
|
{
|
||||||
@ -202,10 +209,12 @@
|
|||||||
default :
|
default :
|
||||||
$ret_data = $uVal;
|
$ret_data = $uVal;
|
||||||
}
|
}
|
||||||
if($ret_data != '')
|
|
||||||
|
if(!empty($ret_data))
|
||||||
{
|
{
|
||||||
return $tp->toHTML($ret_data, TRUE, 'no_make_clickable', "class:{$udata['user_class']}");
|
return $tp->toHTML($ret_data, TRUE, 'no_make_clickable', "class:{$udata['user_class']}");
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
// return TRUE;
|
// return TRUE;
|
||||||
|
@ -38,7 +38,7 @@ class news_related // include plugin-folder in the name.
|
|||||||
'title' => varset($row['news_title']),
|
'title' => varset($row['news_title']),
|
||||||
'url' => e107::getUrl()->create('news/view/item',$row), // '{e_BASE}news.php?extend.'.$row['news_id'],
|
'url' => e107::getUrl()->create('news/view/item',$row), // '{e_BASE}news.php?extend.'.$row['news_id'],
|
||||||
'summary' => varset($row['news_summary']),
|
'summary' => varset($row['news_summary']),
|
||||||
'image' => $thumbs[0],
|
'image' => varset($thumbs[0]),
|
||||||
'date' => e107::getParser()->toDate(varset($row['news_datestamp']), 'short'),
|
'date' => e107::getParser()->toDate(varset($row['news_datestamp']), 'short'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user