Commit Graph

105 Commits

Author SHA1 Message Date
Martin
6ecfc01c1f bump default logout from 30 days to 3 months (#3170)
* bump default logout from 30 to 365 days

* * Change cookie duration to constant
* Change cookie duration to three months

* use class

* use 90 days (otherwise login form says 91.3 days)

* change class

* also this works now

Co-authored-by: Martin Rys <martin@rys.pw>
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
2020-12-26 23:40:24 +01:00
Alexis Degrugillier
4abb30228b Fix user queries with labels (#3285)
Before user queries with labels were not translated. Actually, it was not
even processed.
Now those user queries are translated properly.

See #3215
2020-12-26 12:50:09 +01:00
Alexandre Alapetite
7652369359 Minz: Attach a notification to a request (#3208)
* Minz: Attach a notification to a request

Notifications should be attached to a request, not to a global session.
Fix
https://github.com/FreshRSS/FreshRSS/pull/3096#issuecomment-654891906
Prepare https://github.com/FreshRSS/FreshRSS/pull/3096

* Rename array

* Avoid string constants

Implement
https://github.com/FreshRSS/FreshRSS/pull/3208#issuecomment-703243863

* Improved logic

* Simplify storage

https://github.com/FreshRSS/FreshRSS/pull/3208#discussion_r499511213

* Fix notification bug in configuration/system
2020-10-05 19:03:33 +02:00
Alexis Degrugillier
35eed83b64 Add a way to disable shortcuts (#3114)
When the user do not want to use a shortcut, he can let the shortcut value
empty. This will save an empty configuration thus disabling the shortcut.
The load default action allows to use default shortcut only for disabled
shortcuts.

See #3110
2020-07-14 11:02:30 +02:00
Alexis Degrugillier
b2b249d6d6 Fix user queries when they contain " (#3037)
Before, the user queries were working filter-wise but they failed at being displayed
properly in the configuration page. Thus they were stored without the search param.
Now, the search is URL encoded to avoid that kind of behavior and keep the search
param through out the user query's life.
2020-06-06 20:59:53 +02:00
Alexandre Alapetite
5ddae68953 Option to control which categories to unfold (#2888)
#fix https://github.com/FreshRSS/FreshRSS/issues/2324
2020-04-16 18:09:54 +02:00
Offerel
68863fbac8 Show Favorites as Unread (#2766)
Co-authored-by: Frans de Jonge <fransdejonge@gmail.com>
Co-authored-by: Marien Fressinaud <dev@marienfressinaud.fr>
2020-01-16 17:11:04 +01:00
Alexis Degrugillier
59f284d229 Rename sharing action (#2643)
Before, some ad-blocker rules were preventing to display the sharing page
because of its name. I've renamed that page to integration but kept every
thing else identical. So it's still called sharing through out the
application.
If needed, this can be addressed as well.

See #2509 and #2419
2019-11-08 23:49:43 +01:00
Alexis Degrugillier
cc0db9af4f Feature/new archiving (#2335)
* Change archiving config page layout

I've changed some wording and moved actions into a
maintenance section.

* Update purge action

Now we have more control on the purge action. The configuration allows
us to choose what to keep and what to discard in a more precise way.
At the moment, the configuration applies for all feeds.

* Add purge configuration on feed level

Now the extend purge configuration is available on feed level.
It is stored as attributes and will be used in the purge action.

* Update purge action

Now the purge action uses the feed configuration if it exists and
defaults on user configuration if not.

* Add empty option in period list

* Fix configuration warnings

* Add archiving configuration on categories

See #2369

* Add user info back

* Add explanations in UI

* Fixes for SQLite + error + misc.

* Fix invalid feed reference

* Short array syntax

Only for new code, so far

* Fix prefix error

* Query performance, default values

Work in progress

* Fix default values and confirm before leaving

Form cancel and confirm changes before leaving were broken.
And start taking advantage of the short echo syntax `<?= ?>` as we have
moved to PHP 5.4+

* More work

* Tuning SQL

* Fix MariaDB + performance issue

* SQL performance

* Fix SQLite bug

* Fix some attributes JSON encoding bugs

Especially for SQLite export/import

* More uniform, fix bugs

More uniform between global, category, feed settings

* Drop special cases for old articles during refresh

Instead will use lastSeen date with the new archiving logic.
This was generating problems anyway
https://github.com/FreshRSS/FreshRSS/issues/2154

* Draft drop index keep_history

Not needed anymore

* MySQL typo

Now properly tested with MySQL, PostgreSQL, SQLite

* More work for legacy values

Important to avoid overriding user's preference and risking deleting
data erroneously

* Fix PHP 7.3 / 7.4 warnings

@aledeg "Trying to use values of type null, bool, int, float or resource
as an array (such as $null["key"]) will now generate a notice. "
https://php.net/migration74.incompatible

* Reintroduce min articles and take care of legacy parameters

* A few changes forgotten

* Draft of migration + DROP of feed.keep_history

* Fix several errors

And give up using const for SQL to allow multiple database types (and we
cannot redefine a const)

* Add keep_min to categories + factorise archiving logic

* Legacy fix

* Fix bug yield from

* Minor: Use JSON_UNESCAPED_SLASHE for attributes

And make more uniform

* Fix sign and missing variable

* Fine tune the logic
2019-10-23 00:52:15 +02:00
Alexandre Alapetite
e3e5954394 PDO refactoring for code simplification (#2522)
* PDO refactor

* Automatic prefix when using the syntax `_tableName`
* Uniformity: MySQL is now PDO::ATTR_EMULATE_PREPARES = false just like SQLite and PostgreSQL, with consequences such as only one statement per query
* Use PDO methods exec(), query(), prepare() + execute() in a more efficient way
* Remove auto-update SQL code for versions older than FreshRSS 1.5 (3 years old)
* The name of the default category is set in PHP instead of in the DB (simplies SQL and allows changing the name according to the FreshRSS language)
* Rename `->bd` to `->pdo` (less of a frenshism, and more informative)
* Fix some requests, which were not compatible with MySQL prepared statements

* Whitespace

* Fix syntax for PostgreSQL sequences

+ MySQL install

* Minor formatting

* Fix lastInsertId for PostgreSQL

* Use PHP 5.6+ const

Take advantage of https://github.com/FreshRSS/FreshRSS/pull/2527
https://www.php.net/manual/en/migration56.new-features.php

* A bit of forgotten PHP 5.6 simplification for cURL

* Forgotten $s

* Mini fix custom user config

https://github.com/FreshRSS/FreshRSS/pull/2490/files#r326290346

* More work on install.php but not finished

* install.php working

* More cleaning of PDO in install

* Even more simplification

Take advantage of PDO->exec() to run multiple statements

* Disallow changing the name of the default category

https://github.com/FreshRSS/FreshRSS/pull/2522#discussion_r326967724
2019-09-29 16:22:50 +02:00
Marien Fressinaud
75632e70f0 Provide email address verification feature (#2481)
* Add an email field to the profile page

I reuse the `mail_login` from the configuration. I'm not sure if it's
useful today (I would say it was used when Persona login was available).

A good improvement would be to rename `mail_login` into `email` so it
would be more intuitive to use.

* Add boolean to the conf to force email validation

This commit only adds a configuration item.

* Add email during registration if email must be validated

* Set email token to validate when email changes

* Block access to FreshRSS if email is not validated

* Send email when address is changed

* Allow to resend the validation email

* Allow the user to change its email while blocked

* Document the email validation feature

* fixup! Allow the user to change its email while blocked

* tec: Autoload PHPMailer lib

* Validate email address format

* Add feedback on validation email resend action

* Allow to logout when user is blocked

* fix: Change default email "from"

* Reorganize i18n keys

* Complete all the locales with default english

* Hide sidebar (profile page) if email is not validated

* Check email requirements on registration

* Allow admin to specify email when creating users

* Don't check email format if value is empty

* Remove trailing comma in userController

Co-Authored-By: Alexandre Alapetite <alexandre@alapetite.fr>

* Set PHPMailer validator to html5 before sending email

* fixup! Remove trailing comma in userController
2019-08-29 12:02:05 +02:00
Joris Kinable
cb31874085 Added option to display authors under article titles (#2487)
This feature is particularly useful to display authors underneath scientific articles.
2019-08-14 15:16:06 +02:00
Alexandre Alapetite
295cb89af3 Fix PHP 5.5 compat for array const (#2360)
https://github.com/FreshRSS/FreshRSS/issues/2359
2019-04-07 21:39:48 +02:00
Alexandre Alapetite
d9e246ecf7 Shortcuts legacy (#2320)
Fix https://github.com/FreshRSS/FreshRSS/issues/2316
2019-04-02 00:08:51 +02:00
Patrick Crandol
ebb9ee0873 Edit cookie_duration from GUI (#2137)
* Use cookie_duration correctly

* WIP allow cookie_duration to be modified from GUI

* Allow cookie_duration to actually be updated

* Update view to properly display cookie_duration

* Add new strings in Translation Files

* Fix typo

* Fix trailing whitespace

* I18n: French translation

* I18n fr: Forgot todo
2018-11-18 19:34:41 +01:00
Alexandre Alapetite
8ee8a573f1 Custom labels (#2027)
* First draft of custom tags

https://github.com/FreshRSS/FreshRSS/issues/928
https://github.com/FreshRSS/FreshRSS/issues/1367

* SMALLINT to BIGINT for id_entry

And uppercase SQL types

* Fix layout for unreads

* Start UI menu

* Change menu order

* Clean database helpers

https://github.com/FreshRSS/FreshRSS/pull/2027#discussion_r217971535

* Travis rules do not understand PostgreSQL constants

Grrr

* Tag controller + UI

* Add column attributes to tags

* Use only favicon for now, for label

* Fix styling for different themes

* Constant for maximum InnoDB index length in Unicode

https://github.com/FreshRSS/FreshRSS/pull/2027#discussion_r219052200
(I would have personnally prefered keeping the readability of a real
value instead of a constant, in this case of many SQL fields)

* Use FreshRSS_Factory::createCategoryDao

* Add view of all articles containing any tag

* Fix search in tags

* Mark as read tags

* Partial auto-update unread tags

* More auto update tag unreads

* Add tag deletion

* Do not purge tagged articles

* Minor comment

* Fix SQLite and UI bug

* Google Reader API support for user tags

Add SQL check that tag names must be distinct from category names

* whitespace

* Add missing API for EasyRSS

* Compatibility SQLite

Problematic parentheses

* Add SQL DISTINCT for cases with multiple tags

* Fix for PostgreSQL

PostgreSQL needs some additional type hint to avoid "could not determine
data type of parameter $1"

http://www.postgresql-archive.org/Could-not-determine-data-type-of-parameter-1-tp2171092p2171094.html
2018-09-29 20:47:17 +02:00
Matt DeMoss
0936a6cdb2 Option to hide nav_entries (#1764)
* put nav_entries in a div so they can be hidden, add config option, no labels yet

* add English text for hide_nav_entries, choose better name

* Update conf.php

add comma to last item

* hide nav_entries by optionally not rendering in normal.phtml

* fix logic, remove containing div

* apply phpcbf to ConfigurationSetter.php

* Make navigation buttons options positive

And add TODOs for i18n, and add default config.
2018-02-19 15:36:18 +01:00
Alexis Degrugillier
8c2113f9e6 Add mute strategy configuration (#1750) 2018-01-01 20:34:06 +01:00
Alexis Degrugillier
e73fae1591 Add shortcuts to switch views (#1755) 2018-01-01 18:53:53 +01:00
Alexandre Alapetite
f632a34626 CLI optimize database (#1663)
CLI optimize database https://github.com/FreshRSS/FreshRSS/issues/1583
And VACUUM in SQLite https://github.com/FreshRSS/FreshRSS/issues/918
Add VACUUM for PostgreSQL (Not tested yet)
2017-10-12 20:11:06 +02:00
Paulius Šukys
67dd80f842 Added additional configuration setting for #1530 . This includes default settings and translation entry for English 2017-05-22 09:33:55 +02:00
Alexandre Alapetite
cbb6c26db7 Fix share POST
https://github.com/FreshRSS/FreshRSS/issues/1289
2016-10-10 22:07:58 +02:00
Alexandre Alapetite
56ffc115d1 Do not mix POST and GET params
Avoid returning CSRF POST token for a GET
2016-08-13 19:10:32 +02:00
Marien Fressinaud
697817eebf Make auto-update server URL alterable
See https://github.com/FreshRSS/FreshRSS/issues/1019
2015-11-02 21:14:13 +01:00
Alexis Degrugillier
d396dd7152 Add instance name in system configuration page 2015-08-24 18:41:57 -04:00
Alexis Degrugillier
269c6b88c4 Add a system configuration page
It allows to modify system configuration from the interface. At the moment, only limits are modifiable. The user limit was removed from the user page and added here along with categories and feeds limits.
2015-08-22 09:33:58 -04:00
Alexandre Alapetite
0d0c6b7493 Moved updated/unread option from global to user
https://github.com/FreshRSS/FreshRSS/issues/798
2015-05-10 14:04:12 +02:00
Alexis Degrugillier
5b90e1f4a0 Introduce user queries objects
There is now an object to manipulate user queries. It allows to move logic to handle those from the view and the controller in the model.
Thus making the view and the controller easier to read.
I introduced a new interface to start using dependency injection. There is still some rough edges but we are moving in the right direction.
The new object is fully tested but it still need some improvements, for instance, it is still tied to the search object.
There might be a better way to do that.
2015-03-05 13:29:41 +01:00
Marien Fressinaud
eff804572f Fix setters on $user_conf
Old setters does not exist anymore, remove them.

See https://github.com/FreshRSS/FreshRSS/issues/730
2015-01-06 21:54:46 +01:00
Marien Fressinaud
7cca47d1ab Change name of user configuration var in Context
- FreshRSS_Context::$conf is replaced by FreshRSS_Context::$user_conf
- Introduce FreshRSS_Context::$system_conf
- Remove FreshRSS_Configuration object

See https://github.com/FreshRSS/FreshRSS/issues/730
2015-01-05 22:45:03 +01:00
Marien Fressinaud
fee1ae997a Fix i18n for conf, entry, error, feed Controllers 2014-12-11 19:02:05 +01:00
Alexandre Alapetite
2c50ed7dc1 Merge pull request #694 from FreshRSS/hide-article
Add a feature to hide articles when they are read
2014-11-16 18:10:55 +01:00
Marien Fressinaud
0b7af8f871 Fix bug on archiving page
Introduced by ee5bbe4826
2014-11-04 13:39:17 +01:00
Alexis Degrugillier
960f86ba20 Add a feature to hide articles when they are read
This is a new reading option to hide articles when they are read. The hidding process occurs when the article is left for an other article. This way, even when the article is marked as read on opening, it is hidden only while navigating to an other article.
I'm not really happy with the behavior when the "mark while scrolling" option is enabled. Please review.
It is missing the i18n since we're not supposed to push them before it exists on i18n.freshrss.org. Or maybe I misunderstood the process.

See #476
2014-11-02 10:05:26 -05:00
Marien Fressinaud
58deab37cd Fix Minz_Error::error() -> use default values 2014-10-30 19:57:08 +01:00
Marien Fressinaud
ee5bbe4826 Fix bug size with SQLite 2014-10-30 19:19:09 +01:00
Marien Fressinaud
8a6ad05eba Remove STATE_STRICT
See https://github.com/marienfressinaud/FreshRSS/issues/634
2014-10-22 18:33:46 +02:00
Marien Fressinaud
9551145200 Better view mode
- Seperate view mode from default state in conf
- Load read articles if no unread articles only if view is adaptive

See https://github.com/marienfressinaud/FreshRSS/issues/634
2014-10-22 18:21:36 +02:00
Marien Fressinaud
1a22a87fb1 Use FreshRSS_Context::$conf only
- Replace $this->view->conf in controllers
- Replace $this->conf in views
2014-10-20 18:45:22 +02:00
Marien Fressinaud
6009990935 Introduce FreshRSS_Auth::hasAccess('admin')
Replace Minz_Configuration::isAdmin($user). FreshRSS_Auth::hasAccess() could
be extended to others scopes later.

See https://github.com/marienfressinaud/FreshRSS/issues/655
2014-10-07 10:16:38 +02:00
Marien Fressinaud
79aa5beaf4 Refactor authentication system.
Big work, not finished. A lot of features have been removed.

See https://github.com/marienfressinaud/FreshRSS/issues/655
2014-10-06 23:29:20 +02:00
Marien Fressinaud
64d1026dd9 Move usersAction into usersController 2014-10-05 17:55:35 +02:00
Marien Fressinaud
1eef789306 Reorganize subscription management code
There is still a lot of work to do. Some links are broken.

See https://github.com/marienfressinaud/FreshRSS/issues/646
2014-10-01 11:27:41 +02:00
Marien Fressinaud
fdb63fbbe6 Simplify configureController
Remove useless code for category configuration.

See https://github.com/marienfressinaud/FreshRSS/issues/646
2014-10-01 10:19:38 +02:00
Marien Fressinaud
7481887db7 Load feed configuration on the same page
Need improvements

See https://github.com/marienfressinaud/FreshRSS/issues/646
2014-10-01 10:06:04 +02:00
Marien Fressinaud
13fb1170c0 Move deletion of categories into new Controller
Fix i18n (occured -> occurred)

See https://github.com/marienfressinaud/FreshRSS/issues/646
2014-09-30 16:31:38 +02:00
Marien Fressinaud
edb02c8fef Move creation of categories in a new Controller
Category names are 255 chars max
2014-09-30 15:02:56 +02:00
Marien Fressinaud
5a1baff9be Refactor removing query by get param
See https://github.com/marienfressinaud/FreshRSS/issues/625
2014-09-24 13:28:09 +02:00
Marien Fressinaud
666162ae56 Fix a bug when $query['state'] doesn't exist
Add a test in addQueryAction().
2014-09-24 12:34:44 +02:00
Marien Fressinaud
a80e12cbf7 Remove queries at the same time as categories
See https://github.com/marienfressinaud/FreshRSS/issues/625
2014-09-24 12:32:49 +02:00