diff --git a/CHANGELOG.md b/CHANGELOG.md
index ce9ce145f..c3f03415a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,10 +2,13 @@
## 2019-01-XX FreshRSS 1.13.1-dev
+* Features
+ * Include articles with custom labels during export [#2196](https://github.com/FreshRSS/FreshRSS/issues/2196)
* Bug fixing
* Fix missing HTTP `X-Forwarded-Prefix` in cookie path behind a reverse-proxy [#2201](https://github.com/FreshRSS/FreshRSS/pull/2201)
* Deployment
* Docker improvements [#2202](https://github.com/FreshRSS/FreshRSS/pull/2202)
+ * Add `TZ` timezone parameter [#2153](https://github.com/FreshRSS/FreshRSS/issues/2153)
* Performance: Hard-include Apache .htaccess to avoid having to scan for changes in those files
* Performance: Disable unused Apache security check of symlinks
* Performance: Disable unused Apache modules
@@ -16,9 +19,11 @@
* Accept HTTP header `X-WebAuth-User` for delegated HTTP Authentication [#2204](https://github.com/FreshRSS/FreshRSS/pull/2204)
* API
* Automatic test of API configuration [#2207](https://github.com/FreshRSS/FreshRSS/pull/2207)
- * Use Apache SetEnvIf module if available and fall-back to RewriteRule [#2202](https://github.com/FreshRSS/FreshRSS/pull/2202)
+ * Performance + compatibility: Use Apache `SetEnvIf` module if available and fall-back to `RewriteRule` [#2202](https://github.com/FreshRSS/FreshRSS/pull/2202)
* Security
* Fixes when HTTP user does not exist in FreshRSS [#2204](https://github.com/FreshRSS/FreshRSS/pull/2204)
+* Accessibility
+ * Remove alt in logo [#2209](https://github.com/FreshRSS/FreshRSS/pull/2209)
## 2018-12-22 FreshRSS 1.13.0
diff --git a/Docker/Dockerfile b/Docker/Dockerfile
index 7aaee52a0..a4be9fd84 100644
--- a/Docker/Dockerfile
+++ b/Docker/Dockerfile
@@ -1,5 +1,7 @@
FROM alpine:3.8
+ENV TZ UTC
+
RUN apk add --no-cache \
apache2 php7-apache2 \
php7 php7-curl php7-gmp php7-intl php7-mbstring php7-xml php7-zip \
diff --git a/Docker/README.md b/Docker/README.md
index 1a915f326..ac745c49d 100644
--- a/Docker/README.md
+++ b/Docker/README.md
@@ -66,6 +66,7 @@ sudo docker volume create freshrss-data
sudo docker run -d --restart unless-stopped --log-opt max-size=10m \
-v freshrss-data:/var/www/FreshRSS/data \
-e 'CRON_MIN=4,34' \
+ -e TZ=Europe/Paris \
--net freshrss-network \
--label traefik.port=80 \
--label traefik.frontend.rule='Host:freshrss.example.net' \
@@ -74,6 +75,7 @@ sudo docker run -d --restart unless-stopped --log-opt max-size=10m \
--name freshrss freshrss/freshrss
```
+* Replace `TZ=Europe/Paris` by your [server timezone](http://php.net/timezones), or remove the line to use `UTC`.
* If you cannot have FreshRSS at the root of a dedicated domain, update the command above according to the following model:
`--label traefik.frontend.rule='Host:freshrss.example.net;PathPrefixStrip:/FreshRSS/' \`
* You may remove the `--label traefik.*` lines if you do not use Træfik.
diff --git a/Docker/entrypoint.sh b/Docker/entrypoint.sh
index d4e1808bc..528388073 100755
--- a/Docker/entrypoint.sh
+++ b/Docker/entrypoint.sh
@@ -5,6 +5,8 @@ php -f ./cli/prepare.php > /dev/null
chown -R :www-data .
chmod -R g+r . && chmod -R g+w ./data/
+find /etc/php*/ -name php.ini -exec sed -r -i "\#^;?date.timezone#s#^.*#date.timezone = $TZ#" {} \;
+
if [ -n "$CRON_MIN" ]; then
sed -r -i "\#FreshRSS#s#^[^ ]+ #$CRON_MIN #" /var/spool/cron/crontabs/root
fi
diff --git a/app/Controllers/importExportController.php b/app/Controllers/importExportController.php
index 2d8d4e01d..3f2947c7a 100644
--- a/app/Controllers/importExportController.php
+++ b/app/Controllers/importExportController.php
@@ -650,7 +650,7 @@ class FreshRSS_importExport_Controller extends Minz_ActionController {
return $return;
}
- public function exportFile($export_opml = true, $export_starred = false, $export_feeds = array(), $maxFeedEntries = 50, $username = null) {
+ public function exportFile($export_opml = true, $export_starred = false, $export_labelled = false, $export_feeds = array(), $maxFeedEntries = 50, $username = null) {
require_once(LIB_PATH . '/lib_opml.php');
$this->catDAO = new FreshRSS_CategoryDAO($username);
@@ -674,8 +674,11 @@ class FreshRSS_importExport_Controller extends Minz_ActionController {
$export_files["feeds_${day}.opml.xml"] = $this->generateOpml();
}
- if ($export_starred) {
- $export_files["starred_${day}.json"] = $this->generateEntries('starred');
+ if ($export_starred || $export_labelled) {
+ $export_files["starred_${day}.json"] = $this->generateEntries(
+ ($export_starred ? 'S' : '') .
+ ($export_labelled ? 'T' : '')
+ );
}
foreach ($export_feeds as $feed_id) {
@@ -683,7 +686,7 @@ class FreshRSS_importExport_Controller extends Minz_ActionController {
if ($feed) {
$filename = "feed_${day}_" . $feed->category() . '_'
. $feed->id() . '.json';
- $export_files[$filename] = $this->generateEntries('feed', $feed, $maxFeedEntries);
+ $export_files[$filename] = $this->generateEntries('f', $feed, $maxFeedEntries);
}
}
@@ -725,6 +728,7 @@ class FreshRSS_importExport_Controller extends Minz_ActionController {
$nb_files = $this->exportFile(
Minz_Request::param('export_opml', false),
Minz_Request::param('export_starred', false),
+ Minz_Request::param('export_labelled', false),
Minz_Request::param('export_feeds', array())
);
} catch (FreshRSS_ZipMissing_Exception $zme) {
@@ -758,27 +762,29 @@ class FreshRSS_importExport_Controller extends Minz_ActionController {
/**
* This method returns a JSON file content.
*
- * @param string $type must be "starred" or "feed"
+ * @param string $type must be one of:
+ * 'S' (starred/favourite), 'f' (feed), 'T' (taggued/labelled), 'ST' (starred or labelled)
* @param FreshRSS_Feed $feed feed of which we want to get entries.
* @return string the JSON file content.
*/
private function generateEntries($type, $feed = null, $maxFeedEntries = 50) {
$this->view->categories = $this->catDAO->listCategories();
+ $tagDAO = FreshRSS_Factory::createTagDao();
- if ($type == 'starred') {
+ if ($type === 's' || $type === 'S' || $type === 'T' || $type === 'ST') {
$this->view->list_title = _t('sub.import_export.starred_list');
$this->view->type = 'starred';
- $unread_fav = $this->entryDAO->countUnreadReadFavorites();
- $this->view->entriesRaw = $this->entryDAO->listWhereRaw(
- 's', '', FreshRSS_Entry::STATE_ALL, 'ASC', $unread_fav['all']
- );
- } elseif ($type === 'feed' && $feed != null) {
+ $this->view->entriesId = $this->entryDAO->listIdsWhere($type, '', FreshRSS_Entry::STATE_ALL, 'ASC', -1);
+ $this->view->entryIdsTagNames = $tagDAO->getEntryIdsTagNames($this->view->entriesId);
+ //The following is a streamable query, i.e. must be last
+ $this->view->entriesRaw = $this->entryDAO->listWhereRaw($type, '', FreshRSS_Entry::STATE_ALL, 'ASC', -1);
+ } elseif ($type === 'f' && $feed != null) {
$this->view->list_title = _t('sub.import_export.feed_list', $feed->name());
$this->view->type = 'feed/' . $feed->id();
- $this->view->entriesRaw = $this->entryDAO->listWhereRaw(
- 'f', $feed->id(), FreshRSS_Entry::STATE_ALL, 'ASC',
- $maxFeedEntries
- );
+ $this->view->entriesId = $this->entryDAO->listIdsWhere($type, $feed->id(), FreshRSS_Entry::STATE_ALL, 'ASC', $maxFeedEntries);
+ $this->view->entryIdsTagNames = $tagDAO->getEntryIdsTagNames($this->view->entriesId);
+ //The following is a streamable query, i.e. must be last
+ $this->view->entriesRaw = $this->entryDAO->listWhereRaw($type, $feed->id(), FreshRSS_Entry::STATE_ALL, 'ASC', $maxFeedEntries);
$this->view->feed = $feed;
}
diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php
index 9ae1ed797..21f17c097 100644
--- a/app/Models/EntryDAO.php
+++ b/app/Models/EntryDAO.php
@@ -839,6 +839,9 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
$where .= 'f.priority >= ' . FreshRSS_Feed::PRIORITY_NORMAL . ' ';
$where .= 'AND e.is_favorite=1 ';
break;
+ case 'S': //Starred
+ $where .= 'e.is_favorite=1 ';
+ break;
case 'c': //Category
$where .= 'f.priority >= ' . FreshRSS_Feed::PRIORITY_NORMAL . ' ';
$where .= 'AND f.category=? ';
@@ -855,6 +858,9 @@ class FreshRSS_EntryDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
case 'T': //Any tag
$where .= '1=1 ';
break;
+ case 'ST': //Starred or tagged
+ $where .= 'e.is_favorite=1 OR EXISTS (SELECT et2.id_tag FROM `' . $this->prefix . 'entrytag` et2 WHERE et2.id_entry = e.id) ';
+ break;
default:
throw new FreshRSS_EntriesGetter_Exception('Bad type in Entry->listByType: [' . $type . ']!');
}
diff --git a/app/i18n/cz/sub.php b/app/i18n/cz/sub.php
index ad02f6f49..5b5634fed 100644
--- a/app/i18n/cz/sub.php
+++ b/app/i18n/cz/sub.php
@@ -72,6 +72,7 @@ return array(
'export' => 'Export',
'export_opml' => 'Exportovat seznam kanálů (OPML)',
'export_starred' => 'Exportovat oblíbené',
+ 'export_labelled' => 'Export your labelled articles', //TODO
'feed_list' => 'Seznam %s článků',
'file_to_import' => 'Soubor k importu
(OPML, JSON nebo ZIP)',
'file_to_import_no_zip' => 'Soubor k importu
(OPML nebo JSON)',
diff --git a/app/i18n/de/sub.php b/app/i18n/de/sub.php
index aa408e8c7..27e893177 100644
--- a/app/i18n/de/sub.php
+++ b/app/i18n/de/sub.php
@@ -72,6 +72,7 @@ return array(
'export' => 'Exportieren',
'export_opml' => 'Liste der Feeds exportieren (OPML)',
'export_starred' => 'Ihre Favoriten exportieren',
+ 'export_labelled' => 'Export your labelled articles', //TODO
'feed_list' => 'Liste von %s Artikeln',
'file_to_import' => 'Zu importierende Datei
(OPML, JSON oder ZIP)',
'file_to_import_no_zip' => 'Zu importierende Datei
(OPML oder JSON)',
diff --git a/app/i18n/en/sub.php b/app/i18n/en/sub.php
index 9acbcbf33..4efd81ba4 100644
--- a/app/i18n/en/sub.php
+++ b/app/i18n/en/sub.php
@@ -72,6 +72,7 @@ return array(
'export' => 'Export',
'export_opml' => 'Export list of feeds (OPML)',
'export_starred' => 'Export your favourites',
+ 'export_labelled' => 'Export your labelled articles',
'feed_list' => 'List of %s articles',
'file_to_import' => 'File to import
(OPML, JSON or ZIP)',
'file_to_import_no_zip' => 'File to import
(OPML or JSON)',
diff --git a/app/i18n/es/sub.php b/app/i18n/es/sub.php
index 64e420dc1..854984891 100755
--- a/app/i18n/es/sub.php
+++ b/app/i18n/es/sub.php
@@ -72,6 +72,7 @@ return array(
'export' => 'Exportar',
'export_opml' => 'Exportar la lista de fuentes (OPML)',
'export_starred' => 'Exportar tus favoritos',
+ 'export_labelled' => 'Export your labelled articles', //TODO
'feed_list' => 'Lista de %s artículos',
'file_to_import' => 'Archivo a importar
(OPML, JSON o ZIP)',
'file_to_import_no_zip' => 'Archivo a importar
(OPML o JSON)',
diff --git a/app/i18n/fr/sub.php b/app/i18n/fr/sub.php
index 6cb31414d..d9964ac6e 100644
--- a/app/i18n/fr/sub.php
+++ b/app/i18n/fr/sub.php
@@ -72,6 +72,7 @@ return array(
'export' => 'Exporter',
'export_opml' => 'Exporter la liste des flux (OPML)',
'export_starred' => 'Exporter les favoris',
+ 'export_labelled' => 'Exporter les articles étiquetés',
'feed_list' => 'Liste des articles de %s',
'file_to_import' => 'Fichier à importer
(OPML, JSON ou ZIP)',
'file_to_import_no_zip' => 'Fichier à importer
(OPML ou JSON)',
diff --git a/app/i18n/he/sub.php b/app/i18n/he/sub.php
index e4c487b84..6d824e349 100644
--- a/app/i18n/he/sub.php
+++ b/app/i18n/he/sub.php
@@ -72,6 +72,7 @@ return array(
'export' => 'ייצוא',
'export_opml' => 'ייצוא רשימת הזנות (OPML)',
'export_starred' => 'ייצוא מועדפים',
+ 'export_labelled' => 'Export your labelled articles', //TODO
'feed_list' => 'רשימה של %s מאמרים',
'file_to_import' => 'קובץ לייבוא
(OPML, Json or Zip)',
'file_to_import_no_zip' => 'קובץ לייבוא
(OPML or Json)',
diff --git a/app/i18n/it/sub.php b/app/i18n/it/sub.php
index 6faa48d63..ff7fa6f1d 100644
--- a/app/i18n/it/sub.php
+++ b/app/i18n/it/sub.php
@@ -72,6 +72,7 @@ return array(
'export' => 'Esporta',
'export_opml' => 'Esporta tutta la lista dei feed (OPML)',
'export_starred' => 'Esporta i tuoi preferiti',
+ 'export_labelled' => 'Export your labelled articles', //TODO
'feed_list' => 'Elenco di %s articoli',
'file_to_import' => 'File da importare
(OPML, JSON o ZIP)',
'file_to_import_no_zip' => 'File da importare
(OPML o JSON)',
diff --git a/app/i18n/kr/sub.php b/app/i18n/kr/sub.php
index 463496c57..9f8967053 100644
--- a/app/i18n/kr/sub.php
+++ b/app/i18n/kr/sub.php
@@ -72,6 +72,7 @@ return array(
'export' => '내보내기',
'export_opml' => '피드 목록 내보내기 (OPML)',
'export_starred' => '즐겨찾기 내보내기',
+ 'export_labelled' => 'Export your labelled articles', //TODO
'feed_list' => '%s 개의 글 목록',
'file_to_import' => '불러올 파일
(OPML, JSON 또는 ZIP)',
'file_to_import_no_zip' => '불러올 파일
(OPML 또는 JSON)',
diff --git a/app/i18n/nl/sub.php b/app/i18n/nl/sub.php
index 36c96b53f..0ab7ac44f 100644
--- a/app/i18n/nl/sub.php
+++ b/app/i18n/nl/sub.php
@@ -72,6 +72,7 @@ return array(
'export' => 'Exporteer',
'export_opml' => 'Exporteer lijst van feeds (OPML)',
'export_starred' => 'Exporteer je favorieten',
+ 'export_labelled' => 'Export your labelled articles', //TODO
'feed_list' => 'Lijst van %s artikelen',
'file_to_import' => 'Bestand om te importeren
(OPML, JSON of ZIP)',
'file_to_import_no_zip' => 'Bestand om te importeren
(OPML of JSON)',
diff --git a/app/i18n/oc/sub.php b/app/i18n/oc/sub.php
index f9ddf339a..3ca98d75e 100644
--- a/app/i18n/oc/sub.php
+++ b/app/i18n/oc/sub.php
@@ -71,6 +71,7 @@ return array(
'export' => 'Exportar',
'export_opml' => 'Exportar la lista de fluxes (OPML)',
'export_starred' => 'Exportar los favorits',
+ 'export_labelled' => 'Export your labelled articles', //TODO
'feed_list' => 'Lista dels %s articles',
'file_to_import' => 'Fichièr d’importar
(OPML, JSON o ZIP)',
'file_to_import_no_zip' => 'Fichièr d’importar
(OPML o JSON)',
diff --git a/app/i18n/pt-br/sub.php b/app/i18n/pt-br/sub.php
index 78684c14c..58b2fc1f9 100644
--- a/app/i18n/pt-br/sub.php
+++ b/app/i18n/pt-br/sub.php
@@ -68,6 +68,7 @@ return array(
'export' => 'Exportar',
'export_opml' => 'Exporta a lista dos feeds (OPML)',
'export_starred' => 'Exportar seus favoritos',
+ 'export_labelled' => 'Export your labelled articles', //TODO
'feed_list' => 'Lista dos %s artigos',
'file_to_import' => 'Arquivo para importar
(OPML, JSON or ZIP)',
'file_to_import_no_zip' => 'Arquivo para importar
(OPML or JSON)',
diff --git a/app/i18n/ru/sub.php b/app/i18n/ru/sub.php
index 7de80586b..62f8a8e3a 100644
--- a/app/i18n/ru/sub.php
+++ b/app/i18n/ru/sub.php
@@ -72,6 +72,7 @@ return array(
'export' => 'Export', //TODO - Translation
'export_opml' => 'Export list of feeds (OPML)', //TODO - Translation
'export_starred' => 'Export your favourites', //TODO - Translation
+ 'export_labelled' => 'Export your labelled articles', //TODO
'feed_list' => 'List of %s articles', //TODO - Translation
'file_to_import' => 'File to import
(OPML, JSON or ZIP)', //TODO - Translation
'file_to_import_no_zip' => 'File to import
(OPML or JSON)', //TODO - Translation
diff --git a/app/i18n/tr/sub.php b/app/i18n/tr/sub.php
index b5b56f4b8..7f29633be 100644
--- a/app/i18n/tr/sub.php
+++ b/app/i18n/tr/sub.php
@@ -72,6 +72,7 @@ return array(
'export' => 'Dışa aktar',
'export_opml' => 'Akış listesini dışarı aktar (OPML)',
'export_starred' => 'Favorileri dışarı aktar',
+ 'export_labelled' => 'Export your labelled articles', //TODO
'feed_list' => '%s makalenin listesi',
'file_to_import' => 'Dosyadan içe aktar
(OPML, JSON or ZIP)',
'file_to_import_no_zip' => 'Dosyadan içe aktar
(OPML or JSON)',
diff --git a/app/i18n/zh-cn/sub.php b/app/i18n/zh-cn/sub.php
index e1c176bc6..3a9623468 100644
--- a/app/i18n/zh-cn/sub.php
+++ b/app/i18n/zh-cn/sub.php
@@ -72,6 +72,7 @@ return array(
'export' => '导出',
'export_opml' => '导出 RSS 源列表 (OPML)',
'export_starred' => '导出你的收藏',
+ 'export_labelled' => 'Export your labelled articles', //TODO
'feed_list' => '%s 文章列表',
'file_to_import' => '需要导入的文件
(OPML, JSON 或 ZIP)',
'file_to_import_no_zip' => '需要导入的文件
(OPML 或 JSON)',
diff --git a/app/layout/header.phtml b/app/layout/header.phtml
index 6b538851b..410ac1ff0 100644
--- a/app/layout/header.phtml
+++ b/app/layout/header.phtml
@@ -16,7 +16,7 @@ if (FreshRSS_Auth::accessNeedsAction()) {