arteman (arteman) wrote in changelog,
arteman
arteman
changelog

[livejournal] r23534: LJSV-2568: Implement SupportRequest even...

Committer: azateev
LJSV-2568: Implement SupportRequest event
U   branches/esn-support/cgi-bin/LJ/Event.pm
Modified: branches/esn-support/cgi-bin/LJ/Event.pm
===================================================================
--- branches/esn-support/cgi-bin/LJ/Event.pm	2013-01-14 13:19:02 UTC (rev 23533)
+++ branches/esn-support/cgi-bin/LJ/Event.pm	2013-01-14 14:02:55 UTC (rev 23534)
@@ -56,6 +56,7 @@
 package LJ::Event;
 use strict;
 no warnings 'uninitialized';
+use Data::Dumper;
 
 use Carp qw(confess);
 use LJ::ESN;
@@ -114,13 +115,14 @@
 # my ($etypeid, $journalid, $arg1, $arg2) = @$params;
 sub raw_params {
     my $self = shift;
-
-    my $ju = $self->event_journal or
-        Carp::confess("Event $self has no journal: " . Dumper($self));
-
+    
+    my $ju = $self->event_journal;
+    warn "This event has no journal: " . Dumper($self) if $ju && $ENV{DEBUG};
+    my $uid = $ju ?  $ju->id : 0 ;
+    
     my @params = map { $_ || 0 } (
         $self->etypeid,
-        $ju->id,
+        $uid, 
         @{$self->{args}},
     );
     return wantarray ? @params : \@params;
@@ -443,7 +445,7 @@
              content => $self->as_string($u),
              tag     => '',
              icon    => '',
-             url     => '' };             
+             url     => '' };
 }
 
 # return a string representing an email subject of an email notification sent
@@ -565,7 +567,7 @@
         return 0;
 
     $job->priority($self->priority);
- 
+
     my $h = $sclient->insert($job);
     return $h ? 1 : 0;
 }

Tags: arteman, azateev, livejournal, pm
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