1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-01 12:20:44 +02:00

PHP8 Compatibility and code cleanup.

This commit is contained in:
Cameron
2020-12-08 12:21:12 -08:00
parent a094a8fb73
commit afaac88003
49 changed files with 264 additions and 225 deletions

View File

@@ -15,21 +15,22 @@ if (!defined('e107_INIT')) { exit; }
$mes = e107::getMessage();
$buts = "";
$newarray = e107::getNav()->adminLinks('core');
while (list($key, $funcinfo) = each($newarray))
$newarray = e107::getNav()->adminLinks('core');
foreach($newarray as $key=>$funcinfo)
{
$buts .= e107::getNav()->renderAdminButton($funcinfo[0], $funcinfo[1], $funcinfo[2], $funcinfo[3], $funcinfo[6], "classis");
}
if($buts != "")
if(!empty($buts))
{
$text = "<div style='text-align:center'>
<table class='table'>";
$text .= $buts;
$text .= render_clean();
$text .= "</table></div>";
$ns->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text);
e107::getRender()->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text);
}
$text = "<div style='text-align:center'>
<table class='table'>";
@@ -39,6 +40,6 @@ $text .= render_clean();
$text .= "</table></div>";
$ns->tablerender(ADLAN_CL_7, $text,'infopanel');
e107::getRender()->tablerender(ADLAN_CL_7, $text,'infopanel');
?>

View File

@@ -19,7 +19,8 @@ $newarray = e107::getNav()->adminLinks('core');
$text = "<div style='text-align:center'>
<table class='table'>";
$buts = "";
while (list($key, $funcinfo) = each($newarray)) {
foreach($newarray as $key=>$funcinfo)
{
$buts .= e107::getNav()->renderAdminButton($funcinfo[0], $funcinfo[1], $funcinfo[2], $funcinfo[3], $funcinfo[5], 'default');
}
$text .= $buts;
@@ -29,8 +30,9 @@ while ($td <= 5) {
}
$td = 1;
$text .= "</tr></table></div>";
if($buts != ""){
$ns->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text);
if(!empty($buts))
{
e107::getRender()->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text);
}
$text = "<div style='text-align:center'>

View File

@@ -21,26 +21,28 @@ $newarray = e107::getNav()->adminLinks('core');
$buts = "";
$text = "<div style='text-align:center'>
<table class='table'>";
while (list($key, $funcinfo) = each($newarray))
foreach($newarray as $key=>$funcinfo)
{
$buts .= e107::getNav()->renderAdminButton($funcinfo[0], $funcinfo[1], $funcinfo[2], $funcinfo[3], $funcinfo[5], 'default');
}
$text .= $buts;
$text_cat = '';
$td = 0;
while ($td <= 5)
{
$text_cat .= "<td class='td' style='width:20%;' ></td>";
$td++;
}
$td = 1;
$text .= "</tr></table></div>";
if($buts !="")
if(!empty($buts))
{
$ns->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text);
e107::getRender()->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text);
}
$text = "<div style='text-align:center'>
@@ -53,8 +55,7 @@ $text .= e107::getNav()->pluginLinks( E_16_PLUGMANAGER, 'default');
$text .= "</tr>
</table></div>";
$ns->tablerender(ADLAN_CL_7, $text);
e107::getRender()->tablerender(ADLAN_CL_7, $text);
echo admin_info();
?>