diff --git a/imgboard.php b/imgboard.php index 6ded497..3dae738 100644 --- a/imgboard.php +++ b/imgboard.php @@ -793,7 +793,13 @@ if (!isset($_GET['delete']) && !isset($_GET['manage']) && (isset($_POST['name']) $text .= manageInfo(__('Keyword added.')); } } elseif (isset($_GET['deletekeyword'])) { + $keyword = keywordByID($_GET['deletekeyword']); + if (empty($keyword)) { + fancyDie(__('That keyword does not exist.')); + } + deleteKeyword($_GET['deletekeyword']); + manageLogAction(sprintf(__('Deleted keyword %s'), htmlentities($keyword['text']))); $text .= manageInfo(__('Keyword deleted.')); } @@ -895,7 +901,7 @@ if (!isset($_GET['delete']) && !isset($_GET['manage']) && (isset($_POST['name']) threadUpdated($post['parent']); } - manageLogAction(__('Deleted') . ' >>' . $post['id']); + manageLogAction(__('Deleted') . ' >>' . $post['id']); $text .= manageInfo(sprintf(__('Post No.%d deleted.'), $post['id'])); } else { fancyDie(__("Sorry, there doesn't appear to be a post with that ID.")); @@ -966,7 +972,7 @@ if (!isset($_GET['delete']) && !isset($_GET['manage']) && (isset($_POST['name']) if ($post) { deleteReportsByPost($post['id']); - manageLogAction(sprintf(__('Cleared reports for post %s'), postLink('>>' . $post['id']))); + manageLogAction(sprintf(__('Cleared reports for %s'), postLink('>>' . $post['id']))); $text .= manageInfo(__('Reports cleared.')); } else { fancyDie(__("Sorry, there doesn't appear to be a post with that ID.")); diff --git a/inc/html.php b/inc/html.php index 4a7dab9..c3cb0fe 100644 --- a/inc/html.php +++ b/inc/html.php @@ -818,18 +818,17 @@ EOF; function manageOnLoad($page) { switch ($page) { - case 'login': - return ' onload="document.tinyib.username.focus();"'; - case 'moderate': - return ' onload="document.tinyib.moderate.focus();"'; - case 'keywords': - return ' onload="document.tinyib.text.focus();"'; - case 'rawpost': - return ' onload="document.tinyib.message.focus();"'; case 'accounts': + case 'login': return ' onload="document.tinyib.username.focus();"'; case 'bans': return ' onload="document.tinyib.ip.focus();"'; + case 'keywords': + return ' onload="document.tinyib.text.focus();"'; + case 'moderate': + return ' onload="document.tinyib.moderate.focus();"'; + case 'rawpost': + return ' onload="document.tinyib.message.focus();"'; } }