File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ def scm
71
71
has_many :news_bytes
72
72
has_many :roles
73
73
has_many :disk_usages , :dependent => :destroy
74
+ has_many :mailing_lists , :dependent => :destroy
74
75
75
76
belongs_to :license , :foreign_key => 'license'
76
77
Original file line number Diff line number Diff line change 14
14
#
15
15
16
16
class MailingList < ActiveRecord ::Base
17
+
17
18
set_table_name "mail_group_list"
19
+ set_primary_key "group_list_id"
20
+
18
21
belongs_to :owner , :class_name => "User" , :foreign_key => "list_admin"
22
+ belongs_to :group
23
+
19
24
named_scope :not_created , :conditions => "status != 2"
20
25
named_scope :deleted , :conditions => { :is_public => 9 }
26
+
21
27
def self . mailman_list_lists
22
28
system ( "/var/mailman/bin/list_lists -b > /tmp/list_lists" )
23
29
File . read ( "/tmp/list_lists" ) . split ( "\n " )
24
30
end
31
+
25
32
def self . hourly_cron
26
33
list_lists_cache = self . mailman_list_lists
27
34
not_created . each do |mailing_list |
@@ -42,6 +49,7 @@ def self.hourly_cron
42
49
end
43
50
end
44
51
end
52
+
45
53
def is_deleted?
46
54
is_public == 9
47
55
end
You can’t perform that action at this time.
0 commit comments