mirror of
https://github.com/Xkeeper0/jul.git
synced 2025-05-19 00:30:21 -07:00
fix some php8.0 showstoppers
This commit is contained in:
parent
aa9bc5d780
commit
eeba015a21
@ -33,7 +33,7 @@
|
||||
require 'lib/function.php';
|
||||
require 'lib/layout.php';
|
||||
|
||||
if ($x_hacks['smallbrowse'] == 1 and false) {
|
||||
if (false && $x_hacks['smallbrowse'] == 1) {
|
||||
require 'mobile/index.php'; // alternate markup for mobile clients.
|
||||
} else {
|
||||
if (filter_string($_GET['action']) == 'markforumread' and $log) {
|
||||
@ -208,7 +208,7 @@
|
||||
while ($in = $sql->fetch($data, MYSQL_ASSOC)) {
|
||||
$recent_threads .= "<tr>
|
||||
$tccell2><a href='forum.php?id=". $in['fid'] ."'>". $in['ftitle'] ."</a></td>
|
||||
$tccell1l>$newpost<a href='thread.php?id=". $in['id'] ."&end=1'>". $in['title'] ."</a></td>
|
||||
$tccell1l><a href='thread.php?id=". $in['id'] ."&end=1'>". $in['title'] ."</a></td>
|
||||
$tccell1><a href='profile.php?id=". $in['user'] ."'><font ". getnamecolor($in['usex'], $in['upowerlevel']) .">". $in['uname'] ."</font></a></td>
|
||||
$tccell2>". timeunits(ctime() - $in['date']) ."</td>
|
||||
</tr>\n";
|
||||
|
@ -52,14 +52,14 @@
|
||||
|
||||
// Bad Design Decisions 2001.
|
||||
// :(
|
||||
if (!get_magic_quotes_gpc()) {
|
||||
if (!function_exists("get_magic_quotes_gpc")) {
|
||||
$_GET = addslashes_array($_GET);
|
||||
$_POST = addslashes_array($_POST);
|
||||
$_COOKIE = addslashes_array($_COOKIE);
|
||||
}
|
||||
if(!ini_get('register_globals')){
|
||||
$supers=array('_ENV', '_SERVER', '_GET', '_POST', '_COOKIE',);
|
||||
foreach($supers as $__s) if (is_array($$__s)) extract($$__s, EXTR_SKIP);
|
||||
foreach($supers as $__s) if (isset($$__s) && is_array($$__s)) extract($$__s, EXTR_SKIP);
|
||||
unset($supers);
|
||||
}
|
||||
}
|
||||
@ -188,7 +188,7 @@
|
||||
$log = 0;
|
||||
}
|
||||
|
||||
if ($x_hacks['superadmin']) $loguser['powerlevel'] = 4;
|
||||
if ($x_hacks['superadmin'] ?? false) $loguser['powerlevel'] = 4;
|
||||
|
||||
$power = $loguser['powerlevel'];
|
||||
$banned = ($power<0);
|
||||
@ -382,7 +382,7 @@ function generatenumbergfx($num,$minlen=0,$double=false){
|
||||
}
|
||||
|
||||
for($i=0;$i<strlen($num);$i++) {
|
||||
$code = $num{$i};
|
||||
$code = $num[$i];
|
||||
switch ($code) {
|
||||
case "/":
|
||||
$code = "slash";
|
||||
|
@ -100,7 +100,7 @@
|
||||
background: #$bgcolor$bgimage;
|
||||
}
|
||||
|
||||
". ($loguser['fontsize'] ? "
|
||||
". (($loguser['fontsize'] ?? false) ? "
|
||||
body { font-size: $loguser[fontsize]%; }
|
||||
" : "") ."
|
||||
|
||||
@ -444,7 +444,7 @@
|
||||
<form action='login.php' method='post' name='logout'><input type='hidden' name='action' value='logout'></form>
|
||||
<td class='tbl tdbg1 center' colspan=3>$boardtitle";
|
||||
$header2="
|
||||
". (!$x_hacks['smallbrowse'] ? "
|
||||
". (!($x_hacks['smallbrowse'] ?? false) ? "
|
||||
</td><tr>
|
||||
<td width='120px' class='tbl tdbg2 center fonts'><nobr>Views: $dispviews<br><img src=images/_.gif width=120 height=1></td>
|
||||
<td width='100%' class='tbl tdbg2 center fonts'>$headlinks2</td>
|
||||
|
@ -55,7 +55,7 @@ namespace {
|
||||
|
||||
$hash = sha1($hostname . $username . $flags);
|
||||
/* persistent connections start with p: */
|
||||
if ($hostname{1} !== ':' && isset(\Dshafik\MySQL::$connections[$hash])) {
|
||||
if ($hostname[1] !== ':' && isset(\Dshafik\MySQL::$connections[$hash])) {
|
||||
\Dshafik\MySQL::$last_connection = \Dshafik\MySQL::$connections[$hash]['conn'];
|
||||
\Dshafik\MySQL::$connections[$hash]['refcount'] += 1;
|
||||
return \Dshafik\MySQL::$connections[$hash]['conn'];
|
||||
@ -729,7 +729,7 @@ namespace Dshafik {
|
||||
{
|
||||
$escapedString = '';
|
||||
for ($i = 0, $max = strlen($unescapedString); $i < $max; $i++) {
|
||||
$escapedString .= self::escapeChar($unescapedString{$i});
|
||||
$escapedString .= self::escapeChar($unescapedString[$i]);
|
||||
}
|
||||
|
||||
return $escapedString;
|
||||
|
Loading…
x
Reference in New Issue
Block a user