Fix PHP 8.3 htmlentities null safety, remove unused themes, rename OGP_LANG_ to LANG_
Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/9909a053-0a66-4453-a844-d3b80d727b27 Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
parent
53e0b68f4f
commit
7377f955fd
796 changed files with 38947 additions and 43914 deletions
|
|
@ -127,7 +127,7 @@ class FormTable {
|
|||
print_failure(get_lang_f('invalid_setting_type',$type));
|
||||
}
|
||||
|
||||
if ( defined("OGP_LANG_".$name."_info") )
|
||||
if ( defined("LANG_".$name."_info") )
|
||||
{
|
||||
echo "</td><td><div class='image-tip' id='".$this->i."' ><img src='images/icon_help_small.gif' ><span class='tip' id='".$this->i."' >".str_replace("'",'"',get_lang($name."_info"))."</span></div></td></tr>";
|
||||
$this->i++;
|
||||
|
|
@ -143,7 +143,7 @@ class FormTable {
|
|||
echo "<tr><td align='right' $td_extra><label for='".$name."'>".get_lang($name).":</label></td>";
|
||||
echo "<td align='left'>".$data."</td>\n";
|
||||
|
||||
if ( defined("OGP_LANG_".$name."_info") )
|
||||
if ( defined("LANG_".$name."_info") )
|
||||
{
|
||||
echo "<td><div class='image-tip' id='".$this->i."' ><img src='images/icon_help_small.gif' ><span class='tip' id='".$this->i."' >".str_replace("'",'"',get_lang($name."_info"))."</span></div></td>\n</tr>\n";
|
||||
$this->i++;
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ function create_home_selector($module, $subpage, $server_homes) {
|
|||
$selected = 'selected="selected"';
|
||||
else
|
||||
$selected = '';
|
||||
echo "<option value='". $server_home['home_id'] . "' $selected >" . htmlentities($server_home['home_name']) . "</option>\n";
|
||||
echo "<option value='". $server_home['home_id'] . "' $selected >" . htmlentities($server_home['home_name'] ?? '', ENT_QUOTES, 'UTF-8') . "</option>\n";
|
||||
}
|
||||
echo "</select>\n";
|
||||
echo "</form>";
|
||||
|
|
@ -299,7 +299,7 @@ function create_home_selector_address($module, $subpage, $server_homes, $extra_i
|
|||
echo "<option value='". $server_home['home_id'] .
|
||||
"-" . $server_home['mod_id'] . "-" . $server_home['ip'] .
|
||||
"-" . $server_home['port'] . "' $selected >" .
|
||||
htmlentities($server_home['home_name']) . " - " . $display_ip .
|
||||
htmlentities($server_home['home_name'] ?? '', ENT_QUOTES, 'UTF-8') . " - " . $display_ip .
|
||||
":" . $server_home['port'] . "</option>\n";
|
||||
}
|
||||
echo "</select>\n";
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
*/
|
||||
|
||||
// Globals
|
||||
$OGPLangPre = "OGP_LANG_";
|
||||
$OGPLangPre = "LANG_";
|
||||
|
||||
// Ignore any request with unwanted values at 'm' or 'p'
|
||||
if( isset($_REQUEST['m']) and !preg_match("/^([a-z]|[0-9]|_|-)+$/i", $_REQUEST['m']) )
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ if (!defined('GSP_XMLRPC_READY')) {
|
|||
if (!headers_sent()) {
|
||||
header('Content-Type: text/plain; charset=UTF-8', true, 500);
|
||||
}
|
||||
echo nl2br(htmlentities($message));
|
||||
echo nl2br(htmlentities($message ?? '', ENT_QUOTES, 'UTF-8'));
|
||||
}
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue