From: Evan Prodromou <evan@e14n.com>
Date: Tue, 4 Jun 2013 23:52:38 +0000 (-0400)
Subject: Don't add content as title for notes
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=15d466ebe6576aa34efa7d4b5bb008e0d2cbc116;p=quix0rs-gnu-social.git

Don't add content as title for notes
---

diff --git a/classes/Notice.php b/classes/Notice.php
index 541a850f0c..3891f431e4 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -1508,7 +1508,6 @@ class Notice extends Managed_DataObject
             $act->time    = strtotime($this->created);
             $act->link    = $this->bestUrl();
             $act->content = common_xml_safe_str($this->rendered);
-            $act->title   = common_xml_safe_str($this->content);
 
             $profile = $this->getProfile();
 
diff --git a/lib/activity.php b/lib/activity.php
index b8c9426268..2ec2176d39 100644
--- a/lib/activity.php
+++ b/lib/activity.php
@@ -589,7 +589,13 @@ class Activity
 
         } else {
             $xs->element('id', null, $this->id);
-            $xs->element('title', null, $this->title);
+
+            if ($this->title) {
+                $xs->element('title', null, $this->title);
+            } else {
+                // Require element
+                $xs->element('title', null, "");
+            }
 
             $xs->element('content', array('type' => 'html'), $this->content);