X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=classes%2FNotice.php;h=60989f9bac12025688eb0b8922729d69456eefda;hb=f71912440a17f468b1d60db2388fc6030631fce6;hp=4f23e35007f4cac4f099832fa6df805185082d2f;hpb=b5cfcba4712809cb17eabba299ce5ff04f4d7d70;p=quix0rs-gnu-social.git diff --git a/classes/Notice.php b/classes/Notice.php index 4f23e35007..60989f9bac 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -745,6 +745,7 @@ class Notice extends Memcached_DataObject 1, 1 ); + if ($conversation->N > 0) { return true; } @@ -1116,7 +1117,7 @@ class Notice extends Memcached_DataObject common_log_db_error($reply, 'INSERT', __FILE__); // TRANS: Server exception thrown when a reply cannot be saved. // TRANS: %1$d is a notice ID, %2$d is the ID of the mentioned user. - throw new ServerException(sprintf(_("Could not save reply for %1$d, %2$d."), $this->id, $mentioned->id)); + throw new ServerException(sprintf(_('Could not save reply for %1$d, %2$d.'), $this->id, $mentioned->id)); } else { $replied[$mentioned->id] = 1; self::blow('reply:stream:%d', $mentioned->id); @@ -1305,13 +1306,10 @@ class Notice extends Memcached_DataObject } if (Event::handle('StartActivitySource', array(&$this, &$xs))) { - if ($source) { - $atom_feed = $profile->getAtomFeed(); if (!empty($atom_feed)) { - $xs->elementStart('source'); // XXX: we should store the actual feed ID @@ -1899,7 +1897,6 @@ class Notice extends Memcached_DataObject $options = array(); if (!empty($location_id) && !empty($location_ns)) { - $options['location_id'] = $location_id; $options['location_ns'] = $location_ns; @@ -1911,7 +1908,6 @@ class Notice extends Memcached_DataObject } } else if (!empty($lat) && !empty($lon)) { - $options['lat'] = $lat; $options['lon'] = $lon; @@ -1922,7 +1918,6 @@ class Notice extends Memcached_DataObject $options['location_ns'] = $location->location_ns; } } else if (!empty($profile)) { - if (isset($profile->lat) && isset($profile->lon)) { $options['lat'] = $profile->lat; $options['lon'] = $profile->lon; @@ -2039,6 +2034,7 @@ class Notice extends Memcached_DataObject { // We always insert for the author so they don't // have to wait + Event::handle('StartNoticeDistribute', array($this)); $user = User::staticGet('id', $this->profile_id); if (!empty($user)) {