myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [3124] trunk/app: added "suspect" state for spam


From: noreply
Subject: [myexperiment-hackers] [3124] trunk/app: added "suspect" state for spam accounts
Date: Thu, 13 Sep 2012 13:55:50 +0000 (UTC)

Revision
3124
Author
dgc
Date
2012-09-13 13:55:49 +0000 (Thu, 13 Sep 2012)

Log Message

added "suspect" state for spam accounts

Modified Paths

Diff

Modified: trunk/app/controllers/application_controller.rb (3123 => 3124)


--- trunk/app/controllers/application_controller.rb	2012-09-10 09:00:38 UTC (rev 3123)
+++ trunk/app/controllers/application_controller.rb	2012-09-13 13:55:49 UTC (rev 3124)
@@ -29,8 +29,12 @@
   def check_for_sleeper
     if request.method != :get && logged_in?
       if current_user.account_status == "sleep"
-        current_user.update_attribute(:account_status, "recheck")
+        current_user.update_attribute(:account_status, "sleep recheck")
       end
+
+      if current_user.account_status == "suspect"
+        current_user.update_attribute(:account_status, "suspect recheck")
+      end
     end
   end
 

Modified: trunk/app/controllers/users_controller.rb (3123 => 3124)


--- trunk/app/controllers/users_controller.rb	2012-09-10 09:00:38 UTC (rev 3123)
+++ trunk/app/controllers/users_controller.rb	2012-09-13 13:55:49 UTC (rev 3124)
@@ -601,7 +601,7 @@
 
     if @to > 0
 
-      users = User.find(:all, :conditions => ["activated_at IS NOT NULL AND id >= ? AND id <= ? AND (account_status IS NULL OR (account_status != 'sleep' AND account_status != 'whitelist'))", @from, @to])
+      users = User.find(:all, :conditions => ["activated_at IS NOT NULL AND id >= ? AND id <= ? AND (account_status IS NULL OR (account_status != 'sleep' AND account_status != 'suspect' AND account_status != 'whitelist'))", @from, @to])
 
       @userlist = users.map do |user|
 
@@ -707,6 +707,8 @@
             user.update_attributes(:account_status => "whitelist")
           when "sleep"
             user.update_attributes(:account_status => "sleep")
+          when "suspect"
+            user.update_attributes(:account_status => "suspect")
           when "delete"
 
             # build an "all elements" user.xml record

Modified: trunk/app/views/users/check.rhtml (3123 => 3124)


--- trunk/app/views/users/check.rhtml	2012-09-10 09:00:38 UTC (rev 3123)
+++ trunk/app/views/users/check.rhtml	2012-09-13 13:55:49 UTC (rev 3124)
@@ -148,11 +148,16 @@
         changeSelectedKSE("whitelist");
         break;
 
-      case 115: /* 's' key */
+      case 111: /* 'o' key */
 
         changeSelectedKSE("sleep");
         break;
 
+      case 115: /* 's' key */
+
+        changeSelectedKSE("suspect");
+        break;
+
       case 120: /* 'x' key */
 
         changeSelectedKSE("delete");
@@ -209,6 +214,10 @@
                 <label for="" input_name -%>-sleep">Sleep</label>
               </div>
               <div>
+                <input name="<%= input_name -%>" id="<%= input_name -%>-suspect" value="suspect" type="radio"  user[:ob].id -%>').className = 'suspect';"/>
+                <label for="" input_name -%>-suspect">Suspect</label>
+              </div>
+              <div>
                 <input name="<%= input_name -%>" id="<%= input_name -%>-delete" value="delete" type="radio"  user[:ob].id -%>').className = 'delete';"/>
                 <label for="" input_name -%>-delete">Delete</label>
               </div>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]