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

Issue #5443 - PHP 8.4 test fixes.

This commit is contained in:
camer0n
2025-03-17 13:44:04 -07:00
parent d58f199f28
commit 1b54602be1
17 changed files with 362 additions and 158 deletions

View File

@@ -11,7 +11,7 @@
*
*/
require_once(__DIR__ . '/../class2.php');
if(!ADMIN)
if(!deftrue('ADMIN'))
{
e107::redirect();
exit;
@@ -129,7 +129,7 @@ class docs_ui extends e_admin_ui
$text .= "
<div class='docs-item' id='{$id}' {$display}>
<h4>" . LAN_DOCS . SEP . str_replace("_", " ", $helpdata['fname']) . "</h4>
<h4>" . LAN_DOCS . defset('SEP') . str_replace("_", " ", $helpdata['fname']) . "</h4>
{$tmp}
</div>";

View File

@@ -356,13 +356,14 @@ class frontpage
elseif(vartrue($_GET['id']))
{
$key = intval($_GET['id']);
$text = $this->edit_rule($fp_settings[$key]); // Display edit form as well
$val = $fp_settings[$key] ?? array();
$text = $this->edit_rule($val); // Display edit form as well
// $text .= $this->select_class($fp_settings, FALSE);
$ns->tablerender(FRTLAN_PAGE_TITLE.SEP.FRTLAN_46, $text);
$ns->tablerender(FRTLAN_PAGE_TITLE.defset('SEP').FRTLAN_46, $text);
}
else
{ // Just show existing rules
$ns->tablerender(FRTLAN_PAGE_TITLE.SEP.FRTLAN_13, $mes->render().$this->select_class($fp_settings, TRUE));
$ns->tablerender(FRTLAN_PAGE_TITLE.defset('SEP').FRTLAN_13, $mes->render().$this->select_class($fp_settings, TRUE));
}
}
@@ -475,13 +476,13 @@ class frontpage
$text_tmp_1 .= "
<tr>
".$this->show_front_val('frontpage', $front_key, $front_value, $is_other_home, $rule_info['page'])."
".$this->show_front_val('frontpage', $front_key, $front_value, $is_other_home, varset($rule_info['page']))."
</tr>
";
$text_tmp_2 .= "
<tr>
".$this->show_front_val('fp_force_page', $front_key, $front_value, $is_other_force, $rule_info['force'])."
".$this->show_front_val('fp_force_page', $front_key, $front_value, $is_other_force, varset($rule_info['force']))."
</tr>
";
@@ -491,12 +492,12 @@ class frontpage
$text = "
<form method='post' action='".e_SELF."'>
<input type='hidden' name='e-token' value='".e_TOKEN."' />
<input type='hidden' name='e-token' value='".defset('e_TOKEN')."' />
";
$text .= '<ul class="nav nav-tabs" id="myTabs">
<li class="active"><a data-toggle="tab" data-bs-toggle="tab" href="#home">'.FRTLAN_49.'</a></li>
<li><a data-toggle="tab" data-bs-toggle="tab" href="#postlogin">'.FRTLAN_35.'</a></li>
<li class="active"><a data-toggle="tab" data-bs-toggle="tab" href="#home">'.defset('FRTLAN_49').'</a></li>
<li><a data-toggle="tab" data-bs-toggle="tab" href="#postlogin">'.defset('FRTLAN_35').'</a></li>
</ul>
';
@@ -558,11 +559,11 @@ class frontpage
</colgroup>
<tr>
<td>".FRTLAN_43."</td>
<td>".e107::getUserClass()->uc_dropdown('class', $rule_info['class'], 'public,guest,member,admin,main,classes')."</td>
<td>".e107::getUserClass()->uc_dropdown('class', varset($rule_info['class']), 'public,guest,member,admin,main,classes')."</td>
</tr>
<tr>
<td>".LAN_ORDER."</td>
<td>".$this->frm->number('fp_order', $rule_info['order'], 3, 'min=0')."</td>
<td>".$this->frm->number('fp_order', varset($rule_info['order']), 3, 'min=0')."</td>
</tr>
</table>

View File

@@ -69,7 +69,7 @@ foreach ($admin_cat['id'] as $cat_key => $cat_id)
$text .= "</table></div>";
$ns->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text);
e107::getRender()->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text);
echo admin_info();

View File

@@ -345,7 +345,7 @@ $text = "
<form method='post' action='".e_SELF."' autocomplete='off'>
<input type='hidden' name='e-token' value='".defset('e_TOKEN')."' />
<fieldset id='core-prefs-main'>
<h4 class='caption'>".PRFLAN_53.SEP.PRFLAN_1."</h4>
<h4 class='caption'>".PRFLAN_53.defset('SEP').PRFLAN_1."</h4>
<table class='table adminform'>
<colgroup>
<col class='col-label' />
@@ -447,7 +447,7 @@ $text .= "
// Email and Contact Information --------------
$text .= "<fieldset class='e-hideme' id='core-prefs-email'>
<h4 class='caption'>".PRFLAN_53.SEP.PRFLAN_13."</h4>
<h4 class='caption'>".PRFLAN_53.defset('SEP').PRFLAN_13."</h4>
<table class='table adminform'>
<colgroup>
<col class='col-label' />
@@ -622,7 +622,7 @@ $text .= "<fieldset class='e-hideme' id='core-prefs-email'>
// GDPR Settings -----------------------------
$text .= "
<fieldset class='e-hideme' id='core-prefs-gdpr'>
<h4 class='caption'>".PRFLAN_53.SEP.PRFLAN_277."</h4>
<h4 class='caption'>".PRFLAN_53.defset('SEP').PRFLAN_277."</h4>
<table class='table adminform'>
<colgroup>
<col class='col-label' />
@@ -658,7 +658,7 @@ $text .= "
$text .= "
<fieldset class='e-hideme' id='core-prefs-display'>
<h4 class='caption'>".PRFLAN_53.SEP.PRFLAN_13."</h4>
<h4 class='caption'>".PRFLAN_53.defset('SEP').PRFLAN_13."</h4>
<table class='table adminform'>
<colgroup>
<col class='col-label' />
@@ -708,7 +708,7 @@ $text .= "
*/
$text .= "
<fieldset class='e-hideme' id='core-prefs-admindisp'>
<h4 class='caption'>".PRFLAN_53.SEP.PRFLAN_77."</h4>
<h4 class='caption'>".PRFLAN_53.defset('SEP').PRFLAN_77."</h4>
<table class='table adminform'>
<colgroup>
<col class='col-label' />
@@ -781,7 +781,7 @@ $date4 = $tp->toDate(time(),"input");
$text .= "
<fieldset class='e-hideme' id='core-prefs-date'>
<h4 class='caption'>".PRFLAN_53.SEP.PRFLAN_21."</h4>
<h4 class='caption'>".PRFLAN_53.defset('SEP').PRFLAN_21."</h4>
<table class='table adminform'>
<colgroup>
<col class='col-label' />
@@ -853,7 +853,7 @@ $elements = array(1=> PRFLAN_259, 2=> PRFLAN_260, 0=>LAN_DISABLED);
$text .= "
<fieldset class='e-hideme' id='core-prefs-registration'>
<h4 class='caption'>".PRFLAN_53.SEP.PRFLAN_28."</h4>
<h4 class='caption'>".PRFLAN_53.defset('SEP').PRFLAN_28."</h4>
<table class='table adminform'>
<colgroup>
<col class='col-label' />
@@ -998,7 +998,7 @@ $prefOptionPassword = (isset($pref['signup_option_password'])) ? $pref['signup_o
$text .= "
<fieldset class='e-hideme' id='core-prefs-signup'>
<h4 class='caption'>".PRFLAN_53.SEP.PRFLAN_19."</h4>
<h4 class='caption'>".PRFLAN_53.defset('SEP').PRFLAN_19."</h4>
<table class='table adminform'>
<colgroup>
<col class='col-label' />
@@ -1202,7 +1202,7 @@ if ($savePrefs) $core_pref->setPref($pref)->save(false, true);
$text .= "
<fieldset class='e-hideme' id='core-prefs-textpost'>
<h4 class='caption'>".PRFLAN_53.SEP.PRFLAN_286."</h4>
<h4 class='caption'>".PRFLAN_53.defset('SEP').PRFLAN_286."</h4>
<table class='table adminform'>
<colgroup>
<col class='col-label' />
@@ -1368,7 +1368,7 @@ $hasGD = extension_loaded("gd");
$text .= "
<fieldset class='e-hideme' id='core-prefs-security'>
<h4 class='caption'>".PRFLAN_53.SEP.PRFLAN_47."</h4>
<h4 class='caption'>".PRFLAN_53.defset('SEP').PRFLAN_47."</h4>
<table class='table adminform'>
<colgroup>
<col class='col-label' />
@@ -1611,7 +1611,7 @@ $text .= "
$text .= "
<fieldset class='e-hideme' id='core-prefs-comments'>
<h4 class='caption'>".PRFLAN_53.SEP.PRFLAN_87."</h4>
<h4 class='caption'>".PRFLAN_53.defset('SEP').PRFLAN_87."</h4>
<table class='table adminform'>
<colgroup>
<col class='col-label' />
@@ -1715,7 +1715,7 @@ $text .= "
$text .= "
<fieldset class='e-hideme' id='core-prefs-uploads'>
<h4 class='caption'>".PRFLAN_53.SEP.PRFLAN_238."</h4>";
<h4 class='caption'>".PRFLAN_53.defset('SEP').PRFLAN_238."</h4>";
$upload_max_filesize = ini_get('upload_max_filesize');
@@ -1847,7 +1847,7 @@ $text .= "
$text .= "<fieldset class='e-hideme' id='core-prefs-javascript'>
<h4 class='caption'>".PRFLAN_53.SEP.PRFLAN_257 . "</h4>";
<h4 class='caption'>".PRFLAN_53.defset('SEP').PRFLAN_257 . "</h4>";
if(E107_DEBUG_LEVEL > 0)
{
@@ -2057,7 +2057,7 @@ $text .= "</fieldset>";
$text .= "
<fieldset class='e-hideme' id='core-prefs-advanced'>
<h4 class='caption'>".PRFLAN_53.SEP.PRFLAN_149."</h4>
<h4 class='caption'>".PRFLAN_53.defset('SEP').PRFLAN_149."</h4>
<table class='table adminform'>
<colgroup>
<col class='col-label' />