Типа я (zilogic) wrote in changelog,
Типа я
zilogic
changelog

[livejournal] r21963: LJSUP-10266: Mass mailing feature

Committer: amyshkin
LJSUP-10266: Mass mailing feature
U   trunk/cgi-bin/LJ/Subscription/Group.pm
Modified: trunk/cgi-bin/LJ/Subscription/Group.pm
===================================================================
--- trunk/cgi-bin/LJ/Subscription/Group.pm	2012-05-15 13:24:20 UTC (rev 21962)
+++ trunk/cgi-bin/LJ/Subscription/Group.pm	2012-05-15 13:26:43 UTC (rev 21963)
@@ -12,7 +12,7 @@
 
 sub freeze {
     my ($self) = @_;
-    
+
     my %self = %$self;
     return join('-', map { $_ || 0 } @self{@group_cols});
 }
@@ -260,19 +260,42 @@
 }
 
 sub event_as_html {
-    my ($self, $field_num) = @_;
+    my ($self, $field_num, $check_rel) = @_;
 
     my $ret = '';
 
     my $evtclass = $self->event_class || return undef;
+
     if ($evtclass->can('event_as_html')) {
         return $evtclass->event_as_html($self, $field_num);
     }
 
-    $ret .= LJ::html_hidden('event-'.$field_num => $self->freeze);
+    $ret .= LJ::html_hidden('event-' . $field_num . ( $check_rel ? '-c' : '') => $self->freeze);
     $ret .= $self->as_html;
 }
 
+sub set_rel {
+    my ($self, $journal, $u) = @_;
+    my $evtclass = $self->event_class || return undef;
+
+    $evtclass->set_rel($journal, $u) if $evtclass->can('set_rel');
+}
+
+sub clear_rel {
+    my ($self, $journal, $u) = @_;
+    my $evtclass = $self->event_class || return undef;
+
+    $evtclass->clear_rel($journal, $u) if $evtclass->can('clear_rel');
+}
+
+sub check_rel {
+    my ($self, $journal, $u) = @_;
+    my $evtclass = $self->event_class || return undef;
+
+    return $evtclass->check_rel($journal, $u) if $evtclass->can('check_rel');
+    return 0;
+}
+
 sub event {
     my ($self) = @_;
 

Tags: amyshkin, livejournal, pm, zilogic
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