]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Attention.php
We have to create and populate the Notice_location table before constraint checking...
[quix0rs-gnu-social.git] / classes / Attention.php
index 5299a095aedfff50c4c9cae08f555a1cca154b96..d048187db2d62116a561f869ae54ec4053e55f37 100644 (file)
@@ -53,7 +53,7 @@ class Attention extends Managed_DataObject
     {
         try {
             $att = Attention::getByKeys(['notice_id'=>$notice->getID(), 'profile_id'=>$target->getID()]);
-            throw new AlreadyFulfilledException('Attention already exists with reason: '.var_export($att->reason,true));
+            throw new AlreadyFulfilledException('Attention already exists with reason: '._ve($att->reason));
         } catch (NoResultException $e) {
             $att = new Attention();
         
@@ -67,6 +67,7 @@ class Attention extends Managed_DataObject
                 throw new Exception('Failed Attention::saveNew for notice id=='.$notice->getID().' target id=='.$target->getID().', reason=="'.$reason.'"');
             }
         }
+        self::blow('attention:stream:%d', $target->getID());
         return $att;
     }
 }