* Remove file data/do-install.txt
This file was painful during update because we had to remember to delete
it each time. It added a security issue by allowing an attacker to
reinstall FreshRSS during the update process.
The (more powerful) file data/applied_migrations.txt has been introduced
in 8619cf6fa to replace do-install.txt. We had to wait for at least one
release in order to make sure existing instances of FreshRSS created the
migration file. It should be ok now.
* Replace i18n install.not_deleted key
* Update documentation to update FreshRSS
Before, only standard shortcuts were supported. When other shortcuts were
configured, they were filtered out.
Now, those shortcuts are stored in the configuration and an alert message
is displayed to alert the user that he is using non-standard shortcuts.
See #3481
* Hide new feed advanced options in a details tag
The form was huge and hard to process for beginners. Most of the fields
are optional 99% of time, there is no need to have them so proeminently.
* Remove sub.feed.auth.configuration i18n key
* Sync RTL css files
* Fix stylelint
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
* Fix "for" attributes in add feed form
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
* Add an option to set a custom user agent to retrieve individual feeds
This allows retrieving the original RSS feed when websites use services like FeedBurner.
* Use !== instead of != in subscriptionController.php
* Add proxy and user-agent to subscription/add
Co-authored-by: Georgelemental <georgelemental@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Before, when retrieving article contents with CSS selector, the content
of the RSS feed was replaced by the content of the CSS selector. It works
well in most of the cases but if there is a different content in the feed
and in the selector, the former is lost.
Now, there is a parameter to decide which action is performed after retrieving
the content. By default, the previous behavior is kept. But now, it is
possible to append or prepend the CSS selector content to the feed content.
See #3451
Before, labels were referred to as tag which was confusing since
tags are content generated (retrieved from the feed) and label
are user generated.
Now, labels are properly named in their management page.
See #3444
The username is retrieved by 2 different means to support different
configurations and architectures. If there is no way to find the
username, the "unknown" string is displayed instead.
See #2758
* Updated German Translation
completed german translation, as of now 100%.
* changing the word display -> filter
The whole interface is a little mess, but I guess this might be fitting a bit better
* Fix ignore
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
* Add a query configuration page
Before, there was no way to modify a user query. Thus you need to
create a new one and delete the old one afterward.
Now, every user query can be modified if needed. They have their
own configuration page on which it can be modified or deleted.
* Change drag and drop action on queries
Before, the drag and drop action needed to be validated by submitting
the form to be persisted.
Now, it's done automatically after the query is dropped to its final
location.
Before, adding a child to an existing key was not working. It was failing and
some data was lost in the process.
Now, it possible to add a child to an existing key. It is also possible to
remove the child and convert the parent key containing an underscore "_" to
a parent key without the underscore "_".
* Possiblity to autoinstall in Docker Compose
#fix https://github.com/FreshRSS/FreshRSS/issues/3349
It is simply calling our existing CLI: do-install.php and
create-user.php
https://github.com/FreshRSS/FreshRSS/tree/master/cli
FreshRSS will typically be ready a few seconds before the database, so
introduce a tolerance when the database is not available / up (yet) by
trying a few times to connect. Also useful to avoid service interruption
when DB service is restarted.
Example:
```yml
freshrss-app:
image: freshrss/freshrss
container_name:
freshrss-app
hostname: freshrss-app
restart: unless-stopped
ports:
- "8080:80"
depends_on:
- freshrss-db
volumes:
- data:/var/www/FreshRSS/data
-
extensions:/var/www/FreshRSS/extensions
environment:
CRON_MIN:
'*/20'
FRESHRSS_ENV: development
FRESHRSS_INSTALL: |-
--api_enabled
--base_url https://rss.example.net
--db-base freshrss
--db-host freshrss-db
--db-password
freshrss
--db-type pgsql
--db-user freshrss
--default_user admin
--language en
FRESHRSS_USER: |-
--api_password freshrss
--email user@example.net
--language en
--password freshrss
--user admin
TZ:
Europe/Paris
```
* Minor type f in find
* shellcheck
* Change user query wording
There was some misunderstanding in the use of the user query feature,
probably because of the wording. I've change it to make it more obvious.
* Fix feedback when a query is bookmarked
Before, the displayed query name was not the one intended. Now, the name is the one of the current bookmark
* Document user queries
I've added a few words on how to use the user queries because it seems there was some misunderstanding. See #3219
When the discussion #3327 started, I thought that the clipboard share
is a good idea. It never occurred to me because I do not use a
smartphone.
It might need some polishing but it seems pretty usable as-is.
See #3327
* Avoid manual intialisations of system or user configuration
More consistent use of Context
* Simplify FreshRSS_Context::initUser
* Remove a few manual get_user_configuration
* A bit of debugging
* Fix context user init
* Fix install
* Fix concurrency
Concurrent requests could lead to bad race condition
* Fix actualize cron
Fix case when system i initialised several times
Before, the temp path was not check during install. With some configuration,
FRSS was not working because of a non-writable temp directory. It happened
with XAMPP on MacOS X but it might be the case for other platforms.
Now, the temp path is checked during install to make sure it is writable.
See #3310
* feature(normal) - Remember opened categories in the left menu
Session storage based implementation to remember opened categories in left menu
Issue Ref: #2248
* lib_phpQuery updates
* Updates covering feedback points and functionality fixes
* Feedback updates
* Revert "lib_phpQuery updates"
This reverts commit dcd23b9418.
* First review
Change variable name to "remember" instead of "open".
Start using localStorage instead of sessionStorage.
Simplify code.
* Simplify remember categories init function
Replace 'session' with 'local' in function names and comment
Set open categories CSS as same as when category is opened in 'active' unfold mode
* Remove URLSearchParams check in remember categories init function
* Delete open categories on login and logout
* JSHint check fix
* Second review
* Make new mode the default for new users
* Always open active category
* Reduce / simplify code
* i18n French
* Revert default value
Wait a bit more for this decision / change
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
* Add DE Translation
* i18n update for German
* i18n update for German
* i18n update for German
* Fix ignore
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
* Minz allow parallel sessions
#fix https://github.com/FreshRSS/FreshRSS/issues/3093
* Array optimisation
* Array optimisation missing
* Reduce direct access to $_SESSION except in install process
* Fix session start headers warning
* Use cookie only the first time the session is started:
`PHP Warning: session_start(): Cannot start session when headers
already sent in /var/www/FreshRSS/lib/Minz/Session.php on line 39`
* New concept of volatile session for API calls
Optimisation: do not use cookies or local storage at all for API calls
without a Web session
Fix warning:
```
PHP Warning: session_destroy(): Trying to destroy uninitialized session
in Unknown on line 0
```
* Only call Minz_Session::init once in our index
It was called twice (once indirectly via FreshRSS->init())
* Whitespace
* Mutex for notifications
Implement mutex for notifications
https://github.com/FreshRSS/FreshRSS/pull/3208#discussion_r499509809
* Typo
* Install script is not ready for using Minz_Session
* Add a Minz_Migrator class
Until now, we updated the database structure somewhere in the code but
it wasn't always consistent and somehow complicated to find. Also, this
code was always checked for nothing.
The Migrator aims to improve and ease the creation of migrations. It
should improve the way we apply the updates, making the update server
almost useless.
References:
- example of migration (before Migrator): cc0db9af4f (diff-11a53443fa81512b128c66b065df0679R10)
- update server: https://github.com/FreshRSS/update.freshrss.org
- PR moving the code of the update server to the core: https://github.com/FreshRSS/FreshRSS/pull/1760
* Automatically apply migrations
For now, administrators are used to have nothing to do during an update
else than getting the new code. I suggest to keep this behaviour and
automatically apply migrations if we detect new ones.
Another solution would be to create a CLI command and ask admins to call
it after getting the new code. It could hide migrations errors to end
users, but admin can forget to apply migrations since there are not used
to it.
* Add documentation for Minz Migrator
* Execute migrations even if next ones are applied
* Change mechanism to prevent multiple update at once
* Use mkdir to create the lock and to test it exists
Reference: https://stackoverflow.com/a/731634
* Append .lock to applied_migrations_path
There are no needs to define another file to serve as a lock.
* Change migrations naming convention
* Apply suggestions from code review
Co-Authored-By: Alexandre Alapetite <alexandre@alapetite.fr>
* Perform a low-cost migration versions comparaison
* Clarify version numbers concerning the migration system
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Before, to update a key from the reference language (en), the key was deleted
then created. This way was unproductive for all keys already translated.
Now, the key is updated in all untranslated languages.
See https://github.com/FreshRSS/FreshRSS/pull/3068#issuecomment-646868894
* Initial locaization from international english to United States English
examples:
favourite -> favorite
optimise -> optimize
occured -> occurred
labelled -> labelled
ok -> okay
* More spelling corrections
default English occured->occurred
cancelled -> canceled
labelled -> labeled
* Undo key spelling change
* i18n format and admin.php translating
* Translating admin.php
* more admin.php translating
* Translating conf.php
* Translating feedback.php and format command
* Translating gen.php
* Translating index.php
* Translating sub.php
* Translating user.php
* Translating install.php
* Fix 'there is no idle feed'
* FIx 'there is no feed to refresh"
* Add i18n manipulation option to ignore all unmodified translation keys
* Lint fixes
* Update keys newly add since original branch
* Revert unintenntional ru 'translation'
* Code review revisions
* Fix leading whitespace in ignore_unmodified api
* Update app/i18n/en-us/gen.php
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
* Update app/i18n/en-us/admin.php
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
* Update app/i18n/en-us/admin.php
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
* Update error message for Make ignore-unmodified keys to use Make syntax.
(inline with 3062) Also rename ignore-unmodifed-key ->
ignore-unmodified-keys
* Replace makefile leading spaces with tabs
* Code review revisions
* Retab added php functions
* Missed tab replace
* Remove stray '-> todo'
Co-authored-by: root <root@x-freshrss.lan.ewsandor.com>
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Even if the issue #3035 seemed pretty simple at a first glance, it was
more complicated than I expected. Because we send CSP headers AFTER
running the controller actions, it means we can't "echo" any content
from the controller. It's in fact a good practice, but it was easier at
the time we developed the feature.
To fix that, the only thing I had to do was to move the `print()` and
`readfile()` function into the view. The problem was that we needed to
output the content from the CLI too. Then, things became more
complicated. I decided to extract the export-related methods in a
`FreshRSS_Export_Service` class, in order to use it from both the
controller and the CLI. It was an opportunity to refactor the whole
feature in order to make it a bit more linear and easy to read.
Reference: https://github.com/FreshRSS/FreshRSS/issues/3035
Before, all new languages were generated from the reference language which
was English. It makes sense for new languages but not so much for new language
flavor (ex: French Canadian versus French French)
Now, there is a way to select the reference language while adding a new one.
* Ignore i18n gen.dir key
* Add a makefile target to update an i18n key
* Mark some i18n keys to ignore
* Reformat i18n files correctly
* Make i18n keys sort case-sensitive
Calling `make i18n-format` was always inverting 4 lines:
- gen.date.dec with gen.date.Dec
- and gen.date.nov with gen.date.Nov
I don't know why these particular lines and not the others, but it
appeared the sort function was case insensitive due to the
`SORT_FLAG_CASE` flag passed to the `ksort` function. Removing this flag
makes the calls to the formatter idempotent and more reliable.
Unfortunately it moves a lot of lines since the `_` character is
considered differently.
* Check i18n files are correctly formatted on Travis
Filenames were created with the username of the current user. However,
when we export the files with the CLI, the current user is "_".
This commit makes the username always required in the `exportFile`
method so we make sure to always manipulate a real value. Consequently,
the filenames can be formatted correctly.
Obviously, this has absolutely no impacts since the CLI doesn't consider
the HTTP headers. It just makes things a bit more clear. It's a first
step to remove the concept of "default user".
* markdownlint
I have started to use
[markdownlint](https://github.com/DavidAnson/markdownlint/) to find
typos in Markdown. Let's discuss which rules to enforce / disable /
customize
* markdownlint cli/readme