Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[fotobilder] r1441: LJSUP-8570 (new EventsFeed events for fo...

Committer: ailyin
LJSUP-8570 (new EventsFeed events for fotobilder)
U   trunk/lib/FB/Gallery.pm
U   trunk/lib/FB/Upic.pm
Modified: trunk/lib/FB/Gallery.pm
===================================================================
--- trunk/lib/FB/Gallery.pm	2011-04-12 18:11:53 UTC (rev 1440)
+++ trunk/lib/FB/Gallery.pm	2011-04-13 06:49:17 UTC (rev 1441)
@@ -687,6 +687,8 @@
            $secid, $u->{userid}, $self->{gallid})
         or return undef;
 
+    LJ::run_hooks( 'fotobilder_gallery_sec_change', $self, $secid );
+
     $self->touch;
 
     return 1;
@@ -1259,6 +1261,8 @@
     my $u = $g->{u};
     return 0 unless $u->writer;
 
+    LJ::run_hooks( 'fotobilder_gallery_delete', $g );
+
     # move orphans to "unsorted"
     $g->move_orphan_pictures;
 
@@ -1374,6 +1378,8 @@
     $u->do("UPDATE gallery SET timeupdate=UNIX_TIMESTAMP() WHERE userid=? AND gallid=?",
            $u->{'userid'}, $self->{'gallid'});
 
+    LJ::run_hooks( 'fotobilder_gallery_touch', $self );
+
     $self->{timeupdate} = time();
 }
 
@@ -1649,6 +1655,8 @@
         return 0 if $picid;
     }
 
+    LJ::run_hooks( 'fotobilder_gallery_delete', $g );
+
     foreach my $t (qw(gallery gallerysize gallerypics)) {
         $u->do("DELETE FROM $t WHERE userid=? AND gallid=?",
                $u->{'userid'}, $g->{'gallid'});

Modified: trunk/lib/FB/Upic.pm
===================================================================
--- trunk/lib/FB/Upic.pm	2011-04-12 18:11:53 UTC (rev 1440)
+++ trunk/lib/FB/Upic.pm	2011-04-13 06:49:17 UTC (rev 1441)
@@ -510,6 +510,9 @@
     my $ok = $u->do("UPDATE upic SET secid=? WHERE userid=? AND upicid=?",
                     $secid, $u->{userid}, $up->id);
     $up->{secid} = int($secid) if $ok;
+
+    LJ::run_hooks( 'fotobilder_upic_sec_change', $up, $secid );
+
     return $ok;  # or die?
 }
 
@@ -1249,6 +1252,8 @@
 
     $up->delete_thumbnails;
 
+    LJ::run_hooks( 'fotobilder_upic_delete', $up );
+
     foreach my $t (qw(gallerypics upic upicprop upic_thumb upic_exif)) {
         $u->do("DELETE FROM $t WHERE userid=? AND upicid=?",
                $userid, $upicid);

Tags: andy, fotobilder, 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