From 9b515faf34d769abfd315addb3b48910eee850d1 Mon Sep 17 00:00:00 2001 From: shish Date: Thu, 17 Jul 2008 08:13:52 +0000 Subject: [PATCH] Specify who banned a person on the ban list git-svn-id: file:///home/shish/svn/shimmie2/trunk@910 7f39781d-f577-437e-ae19-be835c7a54ca --- contrib/ipban/main.php | 6 +++++- contrib/ipban/theme.php | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/contrib/ipban/main.php b/contrib/ipban/main.php index c74ed3d5..9d2ae0a9 100644 --- a/contrib/ipban/main.php +++ b/contrib/ipban/main.php @@ -176,7 +176,11 @@ class IPBan extends Extension { // database {{{ private function get_bans() { global $database; - $bans = $database->get_all("SELECT * FROM bans ORDER BY end, id"); + $bans = $database->get_all(" + SELECT bans.*, users.name as banner_name + FROM bans + JOIN users ON banner_id = users.id + ORDER BY end, id"); if($bans) {return $bans;} else {return array();} } diff --git a/contrib/ipban/theme.php b/contrib/ipban/theme.php index 473754bf..6f8fce0c 100644 --- a/contrib/ipban/theme.php +++ b/contrib/ipban/theme.php @@ -12,6 +12,7 @@ class IPBanTheme extends Themelet { * ) */ public function display_bans($page, $bans) { + global $user; $h_bans = ""; foreach($bans as $ban) { $end_human = date('Y-m-d', $ban['end']); @@ -19,6 +20,7 @@ class IPBanTheme extends Themelet { {$ban['ip']} {$ban['reason']} + {$ban['banner_name']} {$end_human}
@@ -31,12 +33,13 @@ class IPBanTheme extends Themelet { } $html = " - + $h_bans +
IPReasonUntilAction
IPReasonByUntilAction
{$user->name}