From 8c21769078386e98610718c64e48edbd633fd594 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Mon, 8 Aug 2016 23:41:52 +0200 Subject: [PATCH] [AtomFormat] Use $item->author for author name $item->name was inteded as the author name and $item->author as the author uri. Bridges use $item->name and $item->author interchangably for author name, so $item->name can be removed. $item->author is now used for the author name! --- CREATE_BRIDGE.md | 2 -- formats/AtomFormat.php | 4 +--- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/CREATE_BRIDGE.md b/CREATE_BRIDGE.md index a7a0f455..fded1770 100644 --- a/CREATE_BRIDGE.md +++ b/CREATE_BRIDGE.md @@ -113,7 +113,6 @@ The `Item` class is used to store parameter that are collected in the [`collectD ```PHP $item->uri // URI to reach the subject ("http://...") $item->title // Title of the item -$item->name // Name of the item $item->timestamp // Timestamp of the item in numeric format (use strtotime) $item->author // Name of the author $item->content // Content in HTML format @@ -138,7 +137,6 @@ Parameter | ATOM | HTML | (M)RSS ----------|------|------|------- `uri`|X|X|X `title`|X|X|X -`name`|X|| `timestamp`|X|X|X `author`|X|X|X `content`|X|X|X diff --git a/formats/AtomFormat.php b/formats/AtomFormat.php index 18f27b4d..680c3ced 100644 --- a/formats/AtomFormat.php +++ b/formats/AtomFormat.php @@ -28,7 +28,6 @@ class AtomFormat extends FormatAbstract{ $entries = ''; foreach($this->getDatas() as $data){ - $entryName = is_null($data->name) ? $title : xml_encode($data->name); $entryAuthor = is_null($data->author) ? $uri : xml_encode($data->author); $entryTitle = is_null($data->title) ? '' : xml_encode($data->title); $entryUri = is_null($data->uri) ? '' : xml_encode($data->uri); @@ -40,8 +39,7 @@ class AtomFormat extends FormatAbstract{ - {$entryName} - {$entryAuthor} + {$entryAuthor} <![CDATA[{$entryTitle}]]>