add the last couple of fixes
git-svn-id: file:///home/shish/svn/shimmie2/branches/branch_2.2@903 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
763538c096
commit
661b5eac78
@ -12,7 +12,7 @@ class FeaturedTheme extends Themelet {
|
||||
return "
|
||||
<form action='".make_link("set_feature")."' method='POST'>
|
||||
<input type='hidden' name='image_id' value='$image_id'>
|
||||
<input type='submit' value='Featue This'>
|
||||
<input type='submit' value='Feature This'>
|
||||
</form>
|
||||
";
|
||||
}
|
||||
|
@ -189,17 +189,8 @@ class IPBan extends Extension {
|
||||
|
||||
private function add_ip_ban($ip, $reason, $end, $user) {
|
||||
global $database;
|
||||
$parts = array();
|
||||
if(preg_match("/^(\d+) (day|week|month)s?$/i", $end, $parts)) {
|
||||
$sql = "INSERT INTO bans (ip, reason, end, banner_id)
|
||||
VALUES (?, ?, ?, ?)";
|
||||
$database->Execute($sql, array($ip, $reason, strtotime("+{$parts[1]} {$parts[2]}"), $user->id));
|
||||
}
|
||||
else {
|
||||
$sql = "INSERT INTO bans (ip, reason, banner_id)
|
||||
VALUES (?, ?, ?)";
|
||||
$database->Execute($sql, array($ip, $reason, $user->id));
|
||||
}
|
||||
$sql = "INSERT INTO bans (ip, reason, end, banner_id) VALUES (?, ?, ?, ?)";
|
||||
$database->Execute($sql, array($ip, $reason, strtotime($end), $user->id));
|
||||
}
|
||||
|
||||
private function remove_ip_ban($id) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user