Commit Graph

106 Commits

Author SHA1 Message Date
Alexandre Alapetite
c65f535890 Fix count unreads in SQLite (#2009)
* Fix count unreads in SQLite

Was wrong in e.g. `./cli/user-info.php` because UNION output order in
MySQL and SQLite is differents...

* Changelog 2009
2018-09-08 23:05:56 +02:00
Alexandre Alapetite
d3f5bd840d Add mark-as-unread (#1995)
* Add mark-as-unread

https://github.com/FreshRSS/FreshRSS/issues/1966

* Change sentence

https://github.com/FreshRSS/FreshRSS/pull/1995#discussion_r214515954

* Enable mark-as-unread only when unread articles are shown

In order to prevent erroneous marking-as-unread.
We might find a better logic later.

* Disable instead of hide mark-as-unread option

To make it easier to discover
2018-09-03 20:48:04 +02:00
Alexandre Alapetite
32d9c3b790 Use mb_strcut (#1996)
* Use mb_strcut

Avoid cutting in the middle of a multi-byte UTF-8 character

* Forgotten php5-*

* Typo

* Whitespace

* More mb_strcut
2018-09-02 13:19:58 +02:00
Alexandre Alapetite
c0f2df3ef0 Fever fixes (#1931)
* Fever fixes

Was hardcoded for MySQL. Bug in "before" parameter. Bug in mark all as
read.

* Fix construct

* Changelog 1930

https://github.com/FreshRSS/FreshRSS/issues/193
https://github.com/FreshRSS/FreshRSS/pull/1931
2018-06-12 21:11:43 +02:00
Kevin Papst
8f1bad60d0 Add Fever API and user documentation (#1836)
* added fever api and documentation

* spaces to tabs

* fixed code format

* added links

* added utf8 to header

* removed XML support

* removed before check, as we have to convert it afterwards

* added sandboxed setting (currently disabled)
added support for extensions using entry_before_display

* listFeedsOrderUpdate LIMIT

https://github.com/FreshRSS/FreshRSS/pull/1836/files#r175287881

* removed custom sql by using FreshRSS_FeedDAO::listFeedsOrderUpdate()

* fixed mark all as read

* replaced custom sql for getUnread() and getStarred() with dao functions

* removed sanitization functions

* Rework fever login

* Fix config bug

Plus documentation

* Fix array syntax

For compatibility with PHP 5.3

* Disable cookies and session for API

* Fix currentUser

* added response header and error log

* adjusted phpdoc to match new authentication

* Mechanism to delete old keys

* replace PHP_INT_MAX with zero to disable limit

* replace method_exists with check for explicit methods

* removed Press support and smaller refactoring + updated docu

* Rewrite bindParamArray

Avoid one of the SQL injection risks

* Docs and readme

* Fix API link

* Simplify reverse key check

Using userConfig
2018-05-24 21:53:47 +02:00
Alexandre Alapetite
84d891f8cf Light Boolean search implementation (#1828)
* Light Boolean search implementation

"Hello intitle:World OR date:P1D example"
https://github.com/FreshRSS/FreshRSS/issues/879

* Doc Boolean search

* Doc typos
2018-03-14 17:20:41 +01:00
Alexandre Alapetite
5872a11eb7 cleanOldEntries call autoUpdateDb (#1804)
* cleanOldEntries call autoUpdateDb

https://github.com/FreshRSS/FreshRSS/issues/1803

* Fix feedDAO autoUpdateDb

* Move cleanOldEntries to EntryDAO

Only the entry table is concerned
2018-03-01 19:25:40 +01:00
Alexandre Alapetite
79f8b440d1 API /reader/api/0/stream/items/contents (#1774)
* API /reader/api/0/stream/items/contents

For FeedMe

* Fix continuation

* Continuation in stream/items/ids

* Fix multiple continuations

* Allow empty POST tokens

For FeedMe.
This token is not used by e.g. The Old Reader API.
There is the Authorization header anyway.
TODO: Check security consequences

* API compatibility FeedMe: add/remove feed

FeedMe uses GET for some parameters typically given by POST

* A bit of sanitization

* Links to FeedMe

* API favicons more robust when base_url is not set

* Changelog FeedMe
2018-02-08 20:11:05 +01:00
Alexis Degrugillier
8c2113f9e6 Add mute strategy configuration (#1750) 2018-01-01 20:34:06 +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
Frans de Jonge
4e174ed9dd [ci] Add Travis (#1619)
* [ci] Add Travis

* Exclude some libs

* Semi-auto whitespace fixes

* line length in SQLite

* Exclude tests from line length

* Feed.php line length

* Feed.php: get rid of unnecessary concat

* Feed.php: line length

* bootstrap.php: no newline at end of file

* Allow concatenating across multiple lines

* Add Travis badge

* do-install line length

* update-or-create-user line length

* cli/create-user line length

* tests/app/Models/SearchTest.php fix indentation

* tests/app/Models/UserQueryTest.php fix indentation

* tests/app/Models/CategoryTest.php fix indentation

* [fix] PHP 5.3 on precise

* cli/do-install no spaces

* cli/list-users line length

* cli/reconfigure line length

* empty catch statements

* api/index line length nonsense

* spaces before semicolon

* app/Models/EntryDAO bunch of indentation

* extra blank lines

* spaces before comma in function call

* testing tabwidth

* increase to 10

* comment out tabwidth line

* try older phpcs version 3.0.0RC4

* line length exception for app/install.php

* proper spaces

* stray spaces in i18n

* Minz/ModelPdo line length

* Minz whitespace

* greader line length

* greader elseif placement

* app/Models/Feed.php spacing in function argument

* ignore php 5.3

* app/Models/ConfigurationSetter.php stray whitespace

* EntryDAOSQLite line length

* I vote for higher max line length =P

* ignore SQL

* remove classname complaint

* line length/more legible SQL

* ignore line length nonsense

* greader line length

* feedController issues

* uppercase TRUE, FALSE, NULL

* revert

* importExportController lowercase null

* Share.php default value not necessary because ! is_array () a few lines down

* CategoryDAO constants should be UPPERCASE

* EntryDAO reduce line length

* contentious autofix

* Allow failures on all versions of PHP except 7.1 because reasons
2017-09-22 12:13:46 +02:00
Alexandre Alapetite
aadba9fb70 Negative searches
https://github.com/FreshRSS/FreshRSS/issues/1381
Possibility to exclude authors, titles, tags, urls, words by prefixing
them by ! or - (like Google Search):

* !intitle:unwanted
* -intitle:unwanted
* -author:unwanted
* -#unwanted
* -unwanted

And one can use many of each and combine them with positive searches
2017-04-01 23:41:19 +02:00
Alexandre Alapetite
d9c0d25b85 Improve search: intitle, author, inurl
Allow multiple values of intitle: , author:, inurl:

Note: Tests for UserQueryTest are broken due to
https://github.com/sebastianbergmann/phpunit/wiki/Release-Announcement-for-PHPUnit-4.0.0#backwards-compatibility-issues
2017-04-01 22:31:12 +02:00
Alexandre Alapetite
fbdc22f75a Merge branch 'FreshRSS/dev' into defered-insertion 2017-03-26 19:36:44 +02:00
Alexandre Alapetite
7a6751b50d PDO fix PHP 7.1
http://php.net/manual/migration71.changed-functions.php#migration71.changed-functions.pdo
2017-03-26 18:48:34 +02:00
Alexandre Alapetite
cc235c6af3 SimplePie light manual update 2017-03-26 15:02:35 +02:00
Alexandre Alapetite
e956aee53d More defered insertion. New SQL index
New index entry_feed_read_index
TODO: Auto add this index to existing version
2017-03-26 14:07:06 +02:00
Alexandre Alapetite
a20fd9db9f Defered insertion MySQL bug
The update of cached values remains to be optimized
2017-03-26 01:41:08 +01:00
Alexandre Alapetite
22b41f3bfc Candidate implementation of defered insertion
https://github.com/FreshRSS/FreshRSS/issues/530
2017-03-26 00:01:11 +01:00
Thomas Citharel
ae5a8572d5 postgres fixes 2017-01-27 10:26:31 +01:00
Alexandre Alapetite
f59de4e2b6 Stream JSON export
Avoid large in-memory copies
https://github.com/FreshRSS/FreshRSS/issues/1372
2016-11-15 20:43:06 +01:00
Alexandre Alapetite
aeda49a7d2 Add CLI for user information + Fix last user activity
https://github.com/FreshRSS/FreshRSS/issues/1345
2016-11-05 20:48:46 +01:00
Alexandre Alapetite
8a410969dd Use bindValue instead of bindParam
https://github.com/FreshRSS/FreshRSS/issues/1349
We should later replace all bindParam by bindValue
2016-11-02 21:29:21 +01:00
Alexandre Alapetite
7f2b0439ec Extract function safe_ascii() 2016-10-20 01:38:23 +02:00
Alexandre Alapetite
1893fc61e0 guid and urls should not contain low/high characters
It looks like SimplePie does not always filter everything
Having a character not in latin1 would create MySQL collate errors
2016-10-20 01:19:59 +02:00
Alexandre Alapetite
38289beb66 Fix updateEntry warning
https://github.com/FreshRSS/FreshRSS/issues/1325
2016-10-16 15:19:11 +02:00
Alexandre Alapetite
d184478fb4 PostgreSQL compatibility boolean
https://github.com/FreshRSS/FreshRSS/issues/1311
2016-10-14 23:05:05 +02:00
Alexandre Alapetite
50827447e3 Better error message in markReadFeed
https://github.com/FreshRSS/FreshRSS/issues/1299
2016-10-11 19:34:46 +02:00
Alexandre Alapetite
05cabe99ae Take better advantage of other users refresh 2016-10-05 00:39:54 +02:00
Alexandre Alapetite
32ac41439a PostgreSQL case-insensitivity bug 2016-10-01 19:31:43 +02:00
Alexandre Alapetite
a7b605f2a5 Bug updateEntry() 2016-10-01 15:14:37 +02:00
Alexandre Alapetite
1d8c24c73f BindParam bug 2016-10-01 14:50:17 +02:00
Alexandre Alapetite
548250620b PostgreSQL updateEntry() 2016-10-01 10:09:28 +02:00
Alexandre Alapetite
9f04e2bf32 MySQL use unhex instead of hex litteral
X' syntax did not work well with bind values
2016-09-06 09:15:32 +02:00
Alexandre Alapetite
f66be86e41 Quoted upper-cases instead of string replace 2016-08-31 21:47:12 +02:00
Alexandre Alapetite
c25fdbcc09 More PostgreSQL 2016-08-23 00:02:54 +02:00
Alexandre Alapetite
2af3abc89e Merge branch 'FreshRSS/dev' into PostgreSQL 2016-08-20 12:22:56 +02:00
Alexandre Alapetite
edd4516178 More SQLite fix for mark search as read 2016-08-19 14:33:08 +02:00
Alexandre Alapetite
6afa36e7e1 SQLite fix for mark search as read
https://github.com/FreshRSS/FreshRSS/issues/1220
https://github.com/FreshRSS/FreshRSS/pull/1218
https://github.com/FreshRSS/FreshRSS/issues/608
2016-08-19 11:05:24 +02:00
Alexandre Alapetite
32c734ef62 SQL mark search as read
https://github.com/FreshRSS/FreshRSS/issues/608
2016-08-18 00:00:08 +02:00
Alexandre Alapetite
7c1b5e322c PostgreSQL draft
https://github.com/FreshRSS/FreshRSS/issues/416
Based on @Damstre work https://github.com/FreshRSS/FreshRSS/pull/1071
Not tested
2016-08-02 22:49:35 +02:00
Alexandre Alapetite
2859eff94d MySQL UTF8MB4 minor details 2016-08-01 17:52:21 +02:00
Alexandre Alapetite
fe18d12551 Update MySQL to utf8mb4 (full unicode) 🔥
* Requires MySQL 5.5.3+ (drop support for MySQL 5.0)
* Requires PHP 5.3.3+ (drop support for PHP 5.3.0)
https://github.com/FreshRSS/FreshRSS/issues/789#issuecomment-73878076
2016-07-30 18:45:34 +02:00
Alexandre Alapetite
6b7d946266 Avoid hex2bin for PHP 5.3
https://github.com/FreshRSS/FreshRSS/issues/894
And use native hexadecimal function when available (MySQL) to avoid
having binary data in the SQL logs.
2015-07-10 21:40:28 +02:00
Alexandre Alapetite
384a146883 Minor comment 1.1.1
https://github.com/FreshRSS/FreshRSS/issues/845
2015-05-31 20:52:11 +02:00
Alexandre Alapetite
96ba71e618 MySQL create table bug
https://github.com/FreshRSS/FreshRSS/issues/845
And updated version comments to 1.1.1
2015-05-31 20:22:27 +02:00
Alexandre Alapetite
9d55ee5ae9 Bug EntryDAO filter
https://github.com/FreshRSS/FreshRSS/issues/850
2015-05-24 01:49:13 +02:00
Alexandre Alapetite
217c191a1b More SQLite compatibility
Additional changes to add compatibility with SQLite for the new
hash/lastSeen mode of updating articles.
2015-05-11 22:42:41 +02:00
Alexandre Alapetite
0745252b68 Hexadecimal literals do not work with SQLite/PDO
X'09AF' hexadecimal literals do not work with SQLite/PDO. Replaced by
PHP hex2bin().

711530a512
2015-05-10 20:31:03 +02:00
Alexandre Alapetite
9d92ec30a7 Merge branch 'FreshRSS/dev' into dev 2015-05-09 13:32:17 +02:00