This commit is contained in:
Shish
2023-11-11 21:49:12 +00:00
parent 848797030e
commit fd1bb21f9d
235 changed files with 1551 additions and 1591 deletions

View File

@ -184,10 +184,10 @@ class PrivMsg extends Extension
public function onPageSubNavBuilding(PageSubNavBuildingEvent $event)
{
global $user;
if ($event->parent==="user") {
if ($event->parent === "user") {
if ($user->can(Permissions::READ_PM)) {
$count = $this->count_pms($user);
$h_count = $count > 0 ? SPAN(["class"=>'unread'], "($count)") : "";
$h_count = $count > 0 ? SPAN(["class" => 'unread'], "($count)") : "";
$event->add_nav_link("pm", new Link('user#private-messages'), emptyHTML("Private Messages", $h_count));
}
}
@ -198,7 +198,7 @@ class PrivMsg extends Extension
global $user;
if ($user->can(Permissions::READ_PM)) {
$count = $this->count_pms($user);
$h_count = $count > 0 ? SPAN(["class"=>'unread'], "($count)") : "";
$h_count = $count > 0 ? SPAN(["class" => 'unread'], "($count)") : "";
$event->add_link(emptyHTML("Private Messages", $h_count), make_link("user", null, "private-messages"));
}
}

View File

@ -58,7 +58,7 @@ class PrivMsgTheme extends Themelet
$page->add_block(new Block("Private Messages", $html, "main", 40, "private-messages"));
}
public function display_composer(Page $page, User $from, User $to, $subject="")
public function display_composer(Page $page, User $from, User $to, $subject = "")
{
global $user;
$post_url = make_link("pm/send");