]> git.mjollnir.org Git - s9y.git/commitdiff
Improve comment spam toglging usability.
authorgarvinhicking <garvinhicking>
Tue, 27 Jun 2006 12:13:32 +0000 (12:13 +0000)
committergarvinhicking <garvinhicking>
Tue, 27 Jun 2006 12:13:32 +0000 (12:13 +0000)
docs/NEWS
include/admin/comments.inc.php
plugins/serendipity_event_spamblock/serendipity_event_spamblock.php

index ebde8f7ad5cf09ceca621500ec9a3606e9e1254a..05a37d72ce2e3415c6c7d239e050b94689de830f 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,10 @@
 Version 1.1-alpha7()
 ------------------------------------------------------------------------
 
+    * Comment moderation panel, usability improvement: Blocking authors/
+      URLs will lead to the originating page. Thanks to Tanel Raja!
+      (garvinhicking)
+
     * Patch mb-functions to better work on foreign/japanese charsets
       (thanks to deminy!)
 
index fd2fca5f7faaffb0ca8eff3514e3b2afa25cabbf..b7898cd9f6a51fd5469bad8a31d5d2579a449e3c 100644 (file)
@@ -316,7 +316,7 @@ foreach ($sql as $rs) {
         $comment['fullBody'] = $comment['summary'] = nl2br(htmlspecialchars($comment['fullBody']));
     }
 
-    serendipity_plugin_api::hook_event('backend_view_comment', $comment);
+    serendipity_plugin_api::hook_event('backend_view_comment', $comment, '&amp;serendipity[page]='. $page . $searchString);
     $class = 'serendipity_admin_list_item_' . (($i % 2 == 0 ) ? 'even' : 'uneven');
     $header_class = ($comment['status'] == 'pending' ? 'serendipityAdminMsgNote' : '');
 ?>
index dbafb0ec63fdc5dc13715f892951bc0cfc524bf9..5b9639102736e9491463146c36b9306c3aa43cdd 100644 (file)
@@ -34,7 +34,7 @@ var $filter_defaults;
             'smarty'      => '2.6.7',
             'php'         => '4.1.0'
         ));
-        $propbag->add('version',       '1.52');
+        $propbag->add('version',       '1.53');
         $propbag->add('event_hooks',    array(
             'frontend_saveComment' => true,
             'external_plugin'      => true,
@@ -1058,11 +1058,14 @@ var $filter_defaults;
 
                 case 'backend_view_comment':
                     $author_is_filtered = $this->checkFilter('authors', $eventData['author']);
-                    $eventData['action_author'] .= ' <a class="serendipityIconLink" title="' . ($author_is_filtered ? PLUGIN_EVENT_SPAMBLOCK_REMOVE_AUTHOR : PLUGIN_EVENT_SPAMBLOCK_ADD_AUTHOR) . '" href="serendipity_admin.php?serendipity[adminModule]=comments&amp;serendipity[spamBlockAuthor]=' . $eventData['id'] . '"><img src="' . serendipity_getTemplateFile('admin/img/' . ($author_is_filtered ? 'un' : '') . 'configure.png') . '" /></a>';
+                    $clink1 = 'clink1' . $eventData['id'];
+                    $clink2 = 'clink2' . $eventData['id'];
+
+                    $eventData['action_author'] .= ' <a id="' . $clink1 . '" class="serendipityIconLink" title="' . ($author_is_filtered ? PLUGIN_EVENT_SPAMBLOCK_REMOVE_AUTHOR : PLUGIN_EVENT_SPAMBLOCK_ADD_AUTHOR) . '" href="serendipity_admin.php?serendipity[adminModule]=comments&amp;serendipity[spamBlockAuthor]=' . $eventData['id'] . $addData . '#' . $clink1 . '"><img src="' . serendipity_getTemplateFile('admin/img/' . ($author_is_filtered ? 'un' : '') . 'configure.png') . '" /></a>';
 
                     if (!empty($eventData['url'])) {
                         $url_is_filtered    = $this->checkFilter('urls', $eventData['url']);
-                        $eventData['action_url']    .= ' <a class="serendipityIconLink" title="' . ($url_is_filtered ? PLUGIN_EVENT_SPAMBLOCK_REMOVE_URL : PLUGIN_EVENT_SPAMBLOCK_ADD_URL) . '" href="serendipity_admin.php?serendipity[adminModule]=comments&amp;serendipity[spamBlockURL]=' . $eventData['id'] . '"><img src="' . serendipity_getTemplateFile('admin/img/' . ($url_is_filtered ? 'un' : '') . 'configure.png') . '" /></a>';
+                        $eventData['action_url']    .= ' <a id="' . $clink2 . '" class="serendipityIconLink" title="' . ($url_is_filtered ? PLUGIN_EVENT_SPAMBLOCK_REMOVE_URL : PLUGIN_EVENT_SPAMBLOCK_ADD_URL) . '" href="serendipity_admin.php?serendipity[adminModule]=comments&amp;serendipity[spamBlockURL]=' . $eventData['id'] . $addData . '#' . $clink2 . '"><img src="' . serendipity_getTemplateFile('admin/img/' . ($url_is_filtered ? 'un' : '') . 'configure.png') . '" /></a>';
                     }
 
                     return true;