Commit Graph

164 Commits

Author SHA1 Message Date
Cem KOÇ
5160bc62d8 Update Turkish lang (#3604)
* Update Turkish lang

* Ignore unmodified

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-05-05 11:10:48 +02:00
berumuron
cc6c529562 tec: Remove data/do-install.txt (#3555)
* 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
2021-03-26 19:41:33 +01:00
berumuron
dd80445d69 Readd sub.feed.auth.configuration i18n key (#3554)
I thought the key was useless after 2c4f169, but it’s still used on
update feed page.

Reference: https://github.com/FreshRSS/FreshRSS/pull/3516#issuecomment-804306448
2021-03-23 10:35:50 +01:00
Alexis Degrugillier
4f4ce3c71b Remove shortcut validation (#3548)
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
2021-03-21 15:42:27 +01:00
Alexandre Alapetite
a62d6288b1 Fix init in CLI install (#3544)
#fix https://github.com/FreshRSS/FreshRSS/issues/3528
config was not properly reloaded after being populated
2021-03-20 18:25:55 +01:00
berumuron
2c4f169f0a Hide advanced options in new feed form (#3516)
* 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>
2021-03-13 18:55:43 +01:00
Mejans
184ab6bc85 i18n Update for Occitan language (#3511)
* Update conf.php

* Update feedback.php

* Update gen.php

* Update index.php

* Update install.php

* Update sub.php

* Update sub.php

* Update install.php

* Update gen.php

* Update oc.php

* Fix ignore

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-03-10 20:28:42 +01:00
Jules-Bertholet
800a42172d Add an option to set a custom user agent to retrieve individual feeds (#3494)
* 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>
2021-03-09 20:51:09 +01:00
Alexis Degrugillier
449fee7a2c "Show all" option on labels (#3472)
It uses the favorite option to keep a similar experience through out the application and also to limit the number of options.

See #3263
2021-02-26 23:31:01 +01:00
Alexandre Alapetite
3499f8f1d1 Extensions in CLI (#3443)
* Extensions in CLI

https://github.com/FreshRSS/FreshRSS/pull/3440#discussion_r574659745

* Also user extensions
2021-02-26 19:34:02 +01:00
Frans de Jonge
ae5f4601fd Update Dutch translation for 1.18 (#3468) 2021-02-20 12:45:44 +01:00
Alexis Degrugillier
fe1fba9828 Add a content action parameter to work with CSS selector (#3453)
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
2021-02-16 18:00:49 +01:00
Alexis Degrugillier
5daee165dc Change confusing naming for label (#3446)
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
2021-02-14 20:56:10 +01:00
Alexis Degrugillier
5bd84038a2 Remove Minz validation (#3439)
It should have been done during #3302.
2021-02-11 18:18:42 +01:00
hesch
13b03b232b refactor: remove referer checks, as they are no longer needed (replaced by csrf tokens) (#3432) 2021-02-11 17:38:39 +01:00
Alexandre Alapetite
a626e5fff8 Check that PHP session is working during install (#3430)
* Check that PHP session is working during install

#fix https://github.com/FreshRSS/FreshRSS/issues/3198

* Minor whitespace

* Missing he
2021-02-07 15:19:29 +01:00
Alexandre Alapetite
d42b4c299c Add requirements check in CLI (#3410)
* Add requirements check in CLI

#fix https://github.com/FreshRSS/FreshRSS/issues/1853

* More checks

#fix https://github.com/FreshRSS/FreshRSS/issues/1853
2021-02-05 22:21:31 +01:00
Alexis Degrugillier
3e89086e45 Add username hint for permissions during install (#3373)
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
2021-01-23 23:04:01 +01:00
rom-1
82a2a6f023 Updated German Translation (#3379)
* 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>
2021-01-17 18:29:21 +01:00
Alexis Degrugillier
c5da4e56a6 Add a query configuration page (#3366)
* 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.
2021-01-15 00:14:53 +01:00
Alexis Degrugillier
39806c9456 Fix translation cli (#3364)
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 "_".
2021-01-13 18:42:21 +01:00
Alexis Degrugillier
eb51fd713a Fix coding standard (#3363)
Merged code was not following coding standard. Thus breaking all CI tests.
2021-01-12 16:49:46 +01:00
Alexandre Alapetite
8dfe209799 Possiblity to autoinstall in Docker Compose (#3353)
* 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
2021-01-11 22:36:50 +01:00
Alexis Degrugillier
85cbfcedb5 Update user query feature (#3338)
* 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
2021-01-07 21:47:39 +01:00
rom-1
f499551cd0 Fix British English Date Format (#3326)
* Update British English Date Format

The default Date Format for British English is actually not like the american one (M/D/Y), but more like the same as the rest of Europe (D/M/Y).

* update translations

* not American style though

* Update gen.php

* Date Format -> No dot after day (British)

* Date Format -> No dot after day (British)

* Date Format -> No dot after day (British)

* Apply suggestions from code review

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>

* getting rid of unnecessary slashes

* getting rid of unnecessary slashes

* american time format -> 12h

* adding format_date to ignore

have no idea what I am doing here ;)
https://github.com/FreshRSS/FreshRSS/pull/3326#issuecomment-753620690

* adding format_date to ignore

have no idea what I am doing here ;)
https://github.com/FreshRSS/FreshRSS/pull/3326#issuecomment-753620690

* adding format_date to ignore

have no idea what I am doing here ;)
https://github.com/FreshRSS/FreshRSS/pull/3326#issuecomment-753620690

* adding format_date to ignore

have no idea what I am doing here ;)
https://github.com/FreshRSS/FreshRSS/pull/3326#issuecomment-753620690

* adding format_date to ignore

have no idea what I am doing here ;)
https://github.com/FreshRSS/FreshRSS/pull/3326#issuecomment-753620690

* adding format_date to ignore

have no idea what I am doing here ;)
https://github.com/FreshRSS/FreshRSS/pull/3326#issuecomment-753620690

* adding format_date to ignore

have no idea what I am doing here ;)
https://github.com/FreshRSS/FreshRSS/pull/3326#issuecomment-753620690

* adding format_date to ignore

have no idea what I am doing here ;)
https://github.com/FreshRSS/FreshRSS/pull/3326#issuecomment-753620690

* adding format_date to ignore

have no idea what I am doing here ;)
https://github.com/FreshRSS/FreshRSS/pull/3326#issuecomment-753620690

* Revert "adding format_date to ignore"

This reverts commit 66527f806b.

* Revert "adding format_date to ignore"

This reverts commit 77927fbb04.

* Revert "adding format_date to ignore"

This reverts commit a43eca4df9.

* Revert "adding format_date to ignore"

This reverts commit c05d209592.

* Revert "adding format_date to ignore"

This reverts commit 032082037e.

* Revert "adding format_date to ignore"

This reverts commit a3ca9835da.

* Fix Travis

Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2021-01-03 20:45:07 +01:00
Alexis Degrugillier
46c8f6e77b Add clipboard sharing (#3330)
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
2021-01-03 18:20:15 +01:00
Alexandre Alapetite
9c6682e7ed Avoid manual initialisations of system or user configuration (#3070)
* 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
2021-01-02 21:20:19 +01:00
Alexis Degrugillier
08d76967b0 Add temp folder check during install (#3312)
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
2021-01-02 17:14:23 +01:00
Alexandre Alapetite
bb5b723def i18n ignore name of languages (#3240) 2020-11-04 21:50:46 +01:00
Prashant Tholia
6f23999c7b Remember open categories (#3185)
* 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>
2020-11-02 12:03:16 +01:00
Fake4d
c2e3bc7cab i18n update for German - added missing de translations (#3237)
* 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>
2020-11-01 19:12:58 +01:00
Alexandre Alapetite
0319cc9d23 Minz allow parallel sessions (#3096)
* 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
2020-10-06 23:19:45 +02:00
Bartosz Taudul
f79194f4a6 Add Polish localization (#3190) 2020-09-29 14:20:40 +02:00
Alexandre Alapetite
bb9b166eb1 Fix CLI api_password (#3179)
* Fix CLI api_password

#fix https://github.com/FreshRSS/FreshRSS/issues/3177
Fix regression from https://github.com/FreshRSS/FreshRSS/pull/2675

* Update cli/_update-or-create-user.php

Co-authored-by: oupala <oupala@users.noreply.github.com>

Co-authored-by: oupala <oupala@users.noreply.github.com>
2020-09-17 09:43:39 +02:00
Nico Kaiser
5389dd5ddb i18n update for German (#3175)
This adds and improves some German translations.
2020-09-10 18:20:22 +02:00
Frans de Jonge
5cee45922b [i18n] Update en-UK grammar and style (#3068)
Taken from <https://github.com/FreshRSS/FreshRSS/pull/3060>
2020-07-23 20:36:49 +02:00
Marien Fressinaud
8619cf6fa6 Add a migration system (#2760)
* 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>
2020-07-08 12:11:55 +02:00
Alexis Degrugillier
d7d39f0736 Change how updating a key works (#3072)
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
2020-06-22 13:24:55 +02:00
Ed Sandor
baaef3d9f4 3041 en us localization (#3060)
* 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>
2020-06-19 22:59:27 +02:00
Alexis Degrugillier
caeb660f29 Add a way to disable/enable users (#3056)
If you want to block users without deleting their account, you can now
disable them from the interface.
2020-06-14 19:50:09 +02:00
Marien Fressinaud
15505a0377 tec: Refactor the export feature (#3045)
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
2020-06-13 19:36:24 +02:00
Alexis Degrugillier
7f76c8e553 Add a language reference while adding a new one (#3044)
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.
2020-06-10 23:14:47 +02:00
Alexis Degrugillier
1694264e2c Modify shebang to be more portable (#3038)
The new shebang is a portable way to find the php interpreter. It works
on Mac, GNU/Linux and BSD.
2020-06-06 19:04:21 +02:00
Alexis Degrugillier
8c4d71da2e Add missing translations (#3034)
* Add missing translations

* Add a simple way to check if an i18n key exists

There is a rule in the makefile to access it directly
2020-06-05 20:16:04 +02:00
Frans de Jonge
015cd1e06e [i18n] Update Dutch translation for 1.16.1 (#3005)
See <https://github.com/FreshRSS/FreshRSS/issues/2994>.
2020-05-26 17:04:59 +02:00
Marien Fressinaud
8487fa6248 Reformat i18n correctly (#2976)
* 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
2020-05-15 17:31:21 +02:00
Alexandre Alapetite
058d13de70 CLI user-info JSON option (#2968)
* CLI user-info JSON option

Add a JSON user-info output
https://github.com/FreshRSS/FreshRSS/issues/2967#issuecomment-627441744

* Uses ISO Zulu time

* Typo
2020-05-12 22:48:33 +02:00
Alexandre Alapetite
2bbc579d72 Add lang and mail in CLI user-info (#2958)
* Add lang and mail in CLI user-info

Anf update documentation after
https://github.com/FreshRSS/FreshRSS/pull/2296

* iff and language
2020-05-11 17:45:08 +02:00
Marien Fressinaud
8f188ffa84 Fix filenames for files exported with CLI (#2932)
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".
2020-04-30 12:11:51 +02:00
Alexandre Alapetite
475feffdbe Markdownlint (#2880)
* 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
2020-04-16 18:08:53 +02:00