aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-01-16 22:26:43 +0100
committerGravatar GitHub <noreply@github.com> 2019-01-16 22:26:43 +0100
commit743c1b740bd8ec0b70f7058d4b52101b346a5e9c (patch)
tree7d7c3145ee35b7b37dfc7cf0b7848e85bd3343be /app/views
parent4355849ec36efb3aa4b711912abd71e30cf2d5ee (diff)
Export labels (#2217)
* Export labels https://github.com/FreshRSS/FreshRSS/issues/2196 * Small fixes * Backport code from 1.14.0 https://github.com/FreshRSS/FreshRSS/pull/2199/commits/4888f919f104b2d170302565e481a0b731eb4145 * More fixes
Diffstat (limited to 'app/views')
-rw-r--r--app/views/helpers/export/articles.phtml10
-rw-r--r--app/views/importExport/index.phtml5
2 files changed, 9 insertions, 6 deletions
diff --git a/app/views/helpers/export/articles.phtml b/app/views/helpers/export/articles.phtml
index 59a2c7ad7..eb2cb0924 100644
--- a/app/views/helpers/export/articles.phtml
+++ b/app/views/helpers/export/articles.phtml
@@ -16,14 +16,12 @@ $articles = array(
echo rtrim(json_encode($articles, $options), " ]}\n\r\t"), "\n";
$first = true;
-$tagDAO = FreshRSS_Factory::createTagDao();
-$entryIdsTagNames = $tagDAO->getEntryIdsTagNames($this->entriesRaw);
-if ($entryIdsTagNames == false) {
- $entryIdsTagNames = array();
+if (empty($this->entryIdsTagNames)) {
+ $this->entryIdsTagNames = array();
}
foreach ($this->entriesRaw as $entryRaw) {
- if (empty($entryRaw)) {
+ if ($entryRaw == null) {
continue;
}
$entry = FreshRSS_EntryDAO::daoToEntry($entryRaw);
@@ -61,7 +59,7 @@ foreach ($this->entriesRaw as $entryRaw) {
if ($entry->isFavorite()) {
$article['categories'][] = 'user/-/state/com.google/starred';
}
- $tagNames = isset($entryIdsTagNames['e_' . $entry->id()]) ? $entryIdsTagNames['e_' . $entry->id()] : array();
+ $tagNames = isset($this->entryIdsTagNames['e_' . $entry->id()]) ? $this->entryIdsTagNames['e_' . $entry->id()] : array();
foreach ($tagNames as $tagName) {
$article['categories'][] = 'user/-/label/' . $tagName;
}
diff --git a/app/views/importExport/index.phtml b/app/views/importExport/index.phtml
index c5049e3ea..139e715c5 100644
--- a/app/views/importExport/index.phtml
+++ b/app/views/importExport/index.phtml
@@ -33,6 +33,11 @@
<?php echo _t('sub.import_export.export_opml'); ?>
</label>
+ <label class="checkbox" for="export_labelled">
+ <input type="checkbox" name="export_labelled" id="export_labelled" value="1" <?php echo extension_loaded('zip') ? 'checked="checked"' : ''; ?> />
+ <?php echo _t('sub.import_export.export_labelled'); ?>
+ </label>
+
<label class="checkbox" for="export_starred">
<input type="checkbox" name="export_starred" id="export_starred" value="1" <?php echo extension_loaded('zip') ? 'checked="checked"' : ''; ?> />
<?php echo _t('sub.import_export.export_starred'); ?>