From a4759b31ddc8869392a42b1c6abc69d1250fde97 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Sun, 17 Jan 2016 17:31:33 +0100 Subject: show text preview in compact mode --- db/item.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'db') diff --git a/db/item.php b/db/item.php index 5cbfc2fa2..1916ba6a1 100644 --- a/db/item.php +++ b/db/item.php @@ -130,7 +130,8 @@ class Item extends Entity implements IAPI, \JsonSerializable { 'unread' => $this->isUnread(), 'starred' => $this->isStarred(), 'lastModified' => $this->getLastModified(), - 'rtl' => $this->getRtl() + 'rtl' => $this->getRtl(), + 'intro' => $this->getIntro() ]; } @@ -173,6 +174,10 @@ class Item extends Entity implements IAPI, \JsonSerializable { } + public function getIntro() { + return strip_tags($this->getBody()); + } + public static function fromImport($import) { $item = new static(); $item->setGuid($import['guid']); -- cgit v1.2.3