]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/activityimporter.php
Merge branch 'master' into testing
[quix0rs-gnu-social.git] / lib / activityimporter.php
index da6fc5e321d855fe04d125171d80912b280e271f..096eb9ba435c268082312270db195dcd0c75681b 100644 (file)
@@ -63,9 +63,9 @@ class ActivityImporter extends QueueHandler
 
         $done = null;
 
-        if (Event::handle('StartImportActivity',
-                          array($user, $author, $activity, $trusted, &$done))) {
-            try {
+        try {
+            if (Event::handle('StartImportActivity',
+                              array($user, $author, $activity, $trusted, &$done))) {
                 switch ($activity->verb) {
                 case ActivityVerb::FOLLOW:
                     $this->subscribeProfile($user, $author, $activity);
@@ -83,10 +83,10 @@ class ActivityImporter extends QueueHandler
                 Event::handle('EndImportActivity',
                               array($user, $author, $activity, $trusted));
                 $done = true;
-            } catch (Exception $e) {
-                common_log(LOG_ERR, $e->getMessage());
-                $done = true;
             }
+        } catch (Exception $e) {
+            common_log(LOG_ERR, $e->getMessage());
+            $done = true;
         }
         return $done;
     }