mirror of
https://github.com/Xkeeper0/jul.git
synced 2025-05-19 08:40:21 -07:00
Merge pull request #32 from StapleButter/master
Fixes: * Announcements on forum pages linked to the wrong user profile * `Disable layout` checkbox doesn't work when making new threads
This commit is contained in:
commit
e757df8fa8
@ -147,16 +147,16 @@
|
|||||||
|
|
||||||
// Announcements
|
// Announcements
|
||||||
if ($id) {
|
if ($id) {
|
||||||
if($annc = $sql->fetchq('SELECT announcements.id,user,date,announcements.title,name,sex,powerlevel FROM announcements,users WHERE forum=0 AND user=users.id ORDER BY date DESC LIMIT 1')) {
|
if($annc = $sql->fetchq('SELECT announcements.id aid,user id,date,announcements.title,name,sex,powerlevel FROM announcements,users WHERE forum=0 AND user=users.id ORDER BY date DESC LIMIT 1')) {
|
||||||
$userlink = getuserlink($annc);
|
$userlink = getuserlink($annc);
|
||||||
$threadlist .= "<tr>
|
$threadlist .= "<tr>
|
||||||
<td colspan=7 class='tbl tdbgh center fonts'>Announcements</td>
|
<td colspan=7 class='tbl tdbgh center fonts'>Announcements</td>
|
||||||
</tr><tr>
|
</tr><tr>
|
||||||
$tccell2>". ($loguser['lastannouncement'] < $annc['id'] && $loguser['id'] ? $newpic : " ") ."</td>
|
$tccell2>". ($loguser['lastannouncement'] < $annc['aid'] && $loguser['id'] ? $newpic : " ") ."</td>
|
||||||
$tccell1l colspan=6><a href=announcement.php>$annc[title]</a> -- Posted by {$userlink} on ".date($dateformat,$annc[date]+$tzoff)."</td>
|
$tccell1l colspan=6><a href=announcement.php>$annc[title]</a> -- Posted by {$userlink} on ".date($dateformat,$annc[date]+$tzoff)."</td>
|
||||||
</tr>";
|
</tr>";
|
||||||
}
|
}
|
||||||
if($annc = $sql->fetchq("SELECT user,date,announcements.title,name,sex,powerlevel FROM announcements,users WHERE forum=$id AND user=users.id ORDER BY date DESC LIMIT 1")) {
|
if($annc = $sql->fetchq("SELECT user id,date,announcements.title,name,sex,powerlevel FROM announcements,users WHERE forum=$id AND user=users.id ORDER BY date DESC LIMIT 1")) {
|
||||||
$userlink = getuserlink($annc);
|
$userlink = getuserlink($annc);
|
||||||
$threadlist .= "<tr>
|
$threadlist .= "<tr>
|
||||||
$tccellhs colspan=7>Forum announcements</td>
|
$tccellhs colspan=7>Forum announcements</td>
|
||||||
|
@ -219,8 +219,13 @@
|
|||||||
|
|
||||||
if($submit) {
|
if($submit) {
|
||||||
mysql_query("UPDATE `users` SET `posts` = $numposts, `lastposttime` = '$currenttime' WHERE `id` = '$userid'");
|
mysql_query("UPDATE `users` SET `posts` = $numposts, `lastposttime` = '$currenttime' WHERE `id` = '$userid'");
|
||||||
$headid=getpostlayoutid($head);
|
if (filter_bool($nolayout)) {
|
||||||
$signid=getpostlayoutid($sign);
|
$headid = 0;
|
||||||
|
$signid = 0;
|
||||||
|
} else {
|
||||||
|
$headid=getpostlayoutid($head);
|
||||||
|
$signid=getpostlayoutid($sign);
|
||||||
|
}
|
||||||
|
|
||||||
mysql_query("INSERT INTO `threads` (`forum`, `user`, `views`, `closed`, `title`, `icon`, `replies`, `firstpostdate`, `lastpostdate`, `lastposter`) ".
|
mysql_query("INSERT INTO `threads` (`forum`, `user`, `views`, `closed`, `title`, `icon`, `replies`, `firstpostdate`, `lastpostdate`, `lastposter`) ".
|
||||||
"VALUES ('$id', '$userid', '0', '0', '$subject', '$posticon', '0', '$currenttime', '$currenttime', '$userid')");
|
"VALUES ('$id', '$userid', '0', '0', '$subject', '$posticon', '0', '$currenttime', '$currenttime', '$userid')");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user