Aralot (aralot) wrote in changelog,
Aralot
aralot
changelog

[livejournal] r19550: LJSUP-9268: incorrect delete Spam commen...

Committer: szhirkov
LJSUP-9268: incorrect delete Spam comments from anonimus users
U   trunk/htdocs/js/commentmanage.js
Modified: trunk/htdocs/js/commentmanage.js
===================================================================
--- trunk/htdocs/js/commentmanage.js	2011-08-01 07:00:34 UTC (rev 19549)
+++ trunk/htdocs/js/commentmanage.js	2011-08-01 09:43:26 UTC (rev 19550)
@@ -142,8 +142,9 @@
         }
     };
 
-    HTTPReq.getJSON(opts);
+	HTTPReq.getJSON(opts);
 
+
     var flash = function () {
         var rgb = hsv_to_rgb(0, Math.cos((pulse + 1) / 2), 1);
         pulse += 3.14159 / 5;
@@ -154,12 +155,12 @@
             todel.style.border = "";
             // and let timer expire
         } else if (is_deleted) {
-            removeComment(ditemid, opt_delthread);
-            if (opt_delauthor) {
+			removeComment(ditemid, opt_delthread);
+            if (opt_delauthor && LJ_cmtinfo[ditemid].u !== '') {
                 for (var item in LJ_cmtinfo) {
 					if ( LJ_cmtinfo[item].u == LJ_cmtinfo[ditemid].u
-						&& !LJ_cmtinfo[ item ].is_deleted ) {
-                        removeComment(item, false);
+						&& !LJ_cmtinfo[ item ].is_deleted) {
+						removeComment(item, false);
                     }
                 }
             }

Tags: aralot, js, livejournal
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments