mirror of
https://github.com/Xkeeper0/jul.git
synced 2025-05-19 00:30:21 -07:00
the 8.0 fixes will continue until compatibility improves
This commit is contained in:
parent
81ee0c092e
commit
2d77329bd2
12
index.php
12
index.php
@ -144,17 +144,19 @@
|
|||||||
";
|
";
|
||||||
|
|
||||||
// Displays total PMs along with unread unlike layout.php
|
// Displays total PMs along with unread unlike layout.php
|
||||||
$new=' ';
|
$new = ' ';
|
||||||
if($log) {
|
if($log) {
|
||||||
$pms = $sql->getresultsbykey("SELECT msgread, COUNT(*) num FROM pmsgs WHERE userto=$loguserid GROUP BY msgread", 'msgread', 'num');
|
$pms = $sql->getresultsbykey("SELECT msgread, COUNT(*) num FROM pmsgs WHERE userto=$loguserid GROUP BY msgread", 'msgread', 'num');
|
||||||
$totalpms = intval($pms[0]+$pms[1]);
|
$pms[0] = intval($pms[0] ?? 0); // unread
|
||||||
|
$pms[1] = intval($pms[1] ?? 0); // read
|
||||||
|
$totalpms = $pms[0] + $pms[1];
|
||||||
|
|
||||||
if ($totalpms) {
|
if ($totalpms) {
|
||||||
if($pms[0]) $new = $statusicons['new'];
|
if ($pms[0]) $new = $statusicons['new'];
|
||||||
|
|
||||||
$pmsg = $sql->fetchq("SELECT date,u.id uid,name,sex,powerlevel,aka
|
$pmsg = $sql->fetchq("SELECT date,u.id uid,name,sex,powerlevel,aka
|
||||||
FROM pmsgs p LEFT JOIN users u ON u.id=p.userfrom
|
FROM pmsgs p LEFT JOIN users u ON u.id=p.userfrom
|
||||||
WHERE userto=$loguserid". (($pms[0]) ? " AND msgread=0": "") ."
|
WHERE userto=$loguserid". ($pms[0] ? " AND msgread=0": "") ."
|
||||||
ORDER BY p.id DESC
|
ORDER BY p.id DESC
|
||||||
LIMIT 1");
|
LIMIT 1");
|
||||||
|
|
||||||
@ -291,7 +293,7 @@
|
|||||||
$new=' ';
|
$new=' ';
|
||||||
|
|
||||||
if ($forum['numposts']) {
|
if ($forum['numposts']) {
|
||||||
if ($log && intval($forumnew[$forum['id']]) > 0) {
|
if ($log && intval($forumnew[$forum['id']] ?? 0) > 0) {
|
||||||
$new = $statusicons['new'] ."<br>". generatenumbergfx(intval($forumnew[$forum['id']]));
|
$new = $statusicons['new'] ."<br>". generatenumbergfx(intval($forumnew[$forum['id']]));
|
||||||
}
|
}
|
||||||
elseif (!$log && $forum['lastpostdate']>ctime()-3600) {
|
elseif (!$log && $forum['lastpostdate']>ctime()-3600) {
|
||||||
|
@ -112,6 +112,7 @@
|
|||||||
$dateshort = $defaultdateshort;
|
$dateshort = $defaultdateshort;
|
||||||
|
|
||||||
$loguser = array();
|
$loguser = array();
|
||||||
|
$hacks = ['noposts' => false, 'comments' => false];
|
||||||
|
|
||||||
// Just making sure. Don't use this anymore.
|
// Just making sure. Don't use this anymore.
|
||||||
// (This is backup code to auto update passwords from cookies.)
|
// (This is backup code to auto update passwords from cookies.)
|
||||||
@ -174,8 +175,6 @@
|
|||||||
|
|
||||||
if ($loguser['viewsig'] >= 3)
|
if ($loguser['viewsig'] >= 3)
|
||||||
return header("Location: /?sec=1");
|
return header("Location: /?sec=1");
|
||||||
if ($loguser['powerlevel'] >= 1)
|
|
||||||
$boardtitle .= $submessage;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// Guest settings
|
// Guest settings
|
||||||
@ -785,7 +784,7 @@ function getuserlink(&$u, $substitutions = null, $urlclass = '') {
|
|||||||
$u[$fn['name']] = htmlspecialchars($u[$fn['name']], ENT_QUOTES);
|
$u[$fn['name']] = htmlspecialchars($u[$fn['name']], ENT_QUOTES);
|
||||||
|
|
||||||
global $tzoff;
|
global $tzoff;
|
||||||
$birthday = (date('m-d', $u[$fn['birthday']]) == date('m-d',ctime() + $tzoff));
|
$birthday = ($u[$fn['birthday']] ?? null) && (date('m-d', $u[$fn['birthday']]) == date('m-d',ctime() + $tzoff));
|
||||||
$rsex = (($birthday) ? 255 : $u[$fn['sex']]);
|
$rsex = (($birthday) ? 255 : $u[$fn['sex']]);
|
||||||
|
|
||||||
$namecolor = getnamecolor($rsex, $u[$fn['powerlevel']], false);
|
$namecolor = getnamecolor($rsex, $u[$fn['powerlevel']], false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user