diff options
| author | 2016-11-15 20:54:56 +0100 | |
|---|---|---|
| committer | 2016-11-15 20:54:56 +0100 | |
| commit | 8d3d2a7d7fc7d623e998b6dd97b7f4419cf0d60c (patch) | |
| tree | 70a619a6c85b07711681ddc2818c5920e6ad9aee /app/views/helpers | |
| parent | f59de4e2b679efb1ba4bbfd576a5ea07422cc169 (diff) | |
Minor code formatting of export helper
Diffstat (limited to 'app/views/helpers')
| -rw-r--r-- | app/views/helpers/export/articles.phtml | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/app/views/helpers/export/articles.phtml b/app/views/helpers/export/articles.phtml index 2ad4a3abf..9acf3cc83 100644 --- a/app/views/helpers/export/articles.phtml +++ b/app/views/helpers/export/articles.phtml @@ -1,57 +1,57 @@ <?php - $username = Minz_Session::param('currentUser', '_'); +$username = Minz_Session::param('currentUser', '_'); - $options = 0; - if (version_compare(PHP_VERSION, '5.4.0') >= 0) { - $options = JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE; - } +$options = 0; +if (version_compare(PHP_VERSION, '5.4.0') >= 0) { + $options = JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE; +} - $articles = array( - 'id' => 'user/' . str_replace('/', '', $username) . '/state/org.freshrss/' . $this->type, - 'title' => $this->list_title, - 'author' => $username, - 'items' => array(), - ); +$articles = array( + 'id' => 'user/' . str_replace('/', '', $username) . '/state/org.freshrss/' . $this->type, + 'title' => $this->list_title, + 'author' => $username, + 'items' => array(), +); - echo rtrim(json_encode($articles, $options), " ]}\n\r\t"); - $first = true; +echo rtrim(json_encode($articles, $options), " ]}\n\r\t"), "\n"; +$first = true; - foreach ($this->entriesRaw as $entryRaw) { - $entry = FreshRSS_EntryDAO::daoToEntry($entryRaw); - if (!isset($this->feed)) { - $feed = FreshRSS_CategoryDAO::findFeed($this->categories, $entry->feed ()); - } else { - $feed = $this->feed; - } +foreach ($this->entriesRaw as $entryRaw) { + $entry = FreshRSS_EntryDAO::daoToEntry($entryRaw); + if (!isset($this->feed)) { + $feed = FreshRSS_CategoryDAO::findFeed($this->categories, $entry->feed()); + } else { + $feed = $this->feed; + } - $article = array( - 'id' => $entry->guid(), - 'categories' => array_values($entry->tags()), - 'title' => $entry->title(), - 'author' => $entry->author(), - 'published' => $entry->date(true), - 'updated' => $entry->date(true), - 'alternate' => array(array( - 'href' => $entry->link(), - 'type' => 'text/html', - )), - 'content' => array( - 'content' => $entry->content(), - ), - 'origin' => array( - 'streamId' => $feed->id(), - 'title' => $feed->name(), - 'htmlUrl' => $feed->website(), - 'feedUrl' => $feed->url(), - ) - ); + $article = array( + 'id' => $entry->guid(), + 'categories' => array_values($entry->tags()), + 'title' => $entry->title(), + 'author' => $entry->author(), + 'published' => $entry->date(true), + 'updated' => $entry->date(true), + 'alternate' => array(array( + 'href' => $entry->link(), + 'type' => 'text/html', + )), + 'content' => array( + 'content' => $entry->content(), + ), + 'origin' => array( + 'streamId' => $feed->id(), + 'title' => $feed->name(), + 'htmlUrl' => $feed->website(), + 'feedUrl' => $feed->url(), + ) + ); - if ($first) { - $first = false; - } else { - echo ",\n"; - } - echo json_encode($article, $options); + if ($first) { + $first = false; + } else { + echo ",\n"; } + echo json_encode($article, $options); +} - echo "\n]}\n"; +echo "\n]}\n"; |
