Commit Graph

65 Commits

Author SHA1 Message Date
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
Alexandre Alapetite
7f7de31c1d SQL: update request for updated articles
https://github.com/FreshRSS/FreshRSS/issues/798
2015-05-09 13:07:54 +02:00
Alexis Degrugillier
d229216ccc Split the search into values
Before, the search was a single value.
Now it is splited in chuncks when separated by spaces.
Except if they are enclosed by single quotes or double quotes.

For some reasons, the unit tests are working for both single and double quotes but the
search box isn't. It is working only with single quotes.
We need to investigate the reason of this behavior.

See #823
2015-04-22 00:24:22 -04:00
Alexandre Alapetite
711530a512 SQL: detection of updates, and preparation for better burge
https://github.com/FreshRSS/FreshRSS/issues/798
https://github.com/FreshRSS/FreshRSS/issues/493
SQLite not yet tested. Only MySQL tested so far.
2015-04-04 22:39:31 +02:00
Alexis Degrugillier
24f6c1eabb Fix spacing 2015-03-05 13:29:41 +01: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
Alexis Degrugillier
fe24636e04 Add missing white space 2015-03-02 20:27:15 -05:00
Alexis Degrugillier
e897afa7cc Change test to verify if there is a filter 2015-02-22 17:38:33 -05:00
Alexis Degrugillier
1156129593 Use the search object to get values in the search
It is now possible to combine multiple keywords to do a search. The separation of concern is better now since the search extraction is not done in the DAO anymore.
At the moment, a multiple keyword search is stored as this. It could be nice to have it rendered differently in the search page to make it more readable.
At the moment, there is a problem with search enclosed by ". Same search works well when enclosed by '.
2015-02-21 09:46:21 -05:00
Marien Fressinaud
5f9672111f Fix last calls to Minz_Configuration methods
- We have still to fix actualize_script and greader api (refactoring?)
- We have to fix the FreshRSS_Configuration calls
- We have to fix availableLanguages calls

See https://github.com/FreshRSS/FreshRSS/issues/730
2015-01-06 20:50:58 +01:00
Alexis Degrugillier
eaaf8cdbf1 Add comments 2014-12-06 10:27:45 -05: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
d8f4681382 Replace Minz_Log::record by corresponding methods
Please not use Minz_Log::record anymore!

See https://github.com/marienfressinaud/FreshRSS/issues/655
2014-10-05 19:35:29 +02:00
Marien Fressinaud
b5dee73ea0 Coding style
Remove spaces before parenthesis bis

See https://github.com/marienfressinaud/FreshRSS/issues/655
2014-10-05 18:51:08 +02:00
Alexandre Alapetite
a5a0bd9a35 SQL performance: Removed filter to hide old articles
As discussed on
https://github.com/marienfressinaud/FreshRSS/issues/493#issuecomment-56266415
For performance, but this is also a good simplification.
Will help with PostgreSQL
https://github.com/marienfressinaud/FreshRSS/issues/416 and SQLite too
https://github.com/marienfressinaud/FreshRSS/issues/100 because the main
query becomes simpler.

Me may need to introduce another system to hide old articles, if this is
a problem for some users.
Also, the feature showing "empty feeds" in another colour may need to be
adapted.
2014-09-30 22:28:47 +02:00
Alexis Degrugillier
71617080e2 Refactor code for strict unread message display
Before, when you choose the show unread message option and the hide categories and feeds options, the categories and feeds weren't hidden. Now it is working properly.
Before, the unread filter icon was not selected with the previous way of using the constants. Now, the filter is highlighted when selected in strict mode.

See #619
2014-09-18 21:15:20 -04:00
Alexis Degrugillier
83832a39c4 Add a new configuration option
Before, when you selected the option to display only unread articles, it shows read articles if no unread article were found.
Now, this option is renamed to include information on fallback behavior and a new option is created to have the "only unread" behavior

See #551

It is missing the german translation
2014-09-06 11:32:52 -04:00
Marien Fressinaud
1316ada152 Fix bug add favorite entry
See https://github.com/marienfressinaud/FreshRSS/issues/494
2014-08-23 22:02:22 +02:00
Alexandre Alapetite
50075bfbdc Improvement for ASC order
https://github.com/marienfressinaud/FreshRSS/issues/495
2014-08-19 20:58:18 +02:00
Alexandre Alapetite
65d6796e92 First bug for old articles first
https://github.com/marienfressinaud/FreshRSS/issues/495
2014-08-07 11:29:19 +02:00
Marien Fressinaud
d5d3f6dcfa Fix bugs in import/export
- EntryDAO.php: add a missing "FreshRSS_EntryDAO::"
- Fix htmlspecialchars in opml export
2014-07-23 23:56:16 +02:00
Alexandre Alapetite
3403af3050 SQL: Bug with order ASC
https://github.com/marienfressinaud/FreshRSS/issues/538
2014-07-17 11:56:15 +02:00
Alexandre Alapetite
6c83264f83 SQL: MySQL speed optimisation
Would be nice to test with other versions of MySQL too.

Comparison before/after:

mysql> EXPLAIN SELECT e.id, e.guid, e.title, e.author,
UNCOMPRESS(content_bin) AS content, e.link, e.date, e.is_read,
e.is_favorite, e.id_feed, e.tags FROM `freshrss_alex_entry` e INNER JOIN
(SELECT e1.id FROM `freshrss_alex_entry` e1 INNER JOIN
`freshrss_alex_feed` f ON e1.id_feed=f.id WHERE f.priority > 0 AND
(e1.id >= 1381615200000000 OR e1.is_read=0 OR e1.is_favorite=1 OR
(f.keep_history <> 0)) ORDER BY e1.id DESC LIMIT 31) e2 ON e2.id=e.id
ORDER BY e.id DESC;

+----+-------------+------------+--------+-------------------------------------+----------+---------+---------------+------+----------------------------------------------+
| id | select_type | table      | type   | possible_keys
| key      | key_len | ref           | rows | Extra
|

+----+-------------+------------+--------+-------------------------------------+----------+---------+---------------+------+----------------------------------------------+
|  1 | PRIMARY     | <derived2> | ALL    | NULL
| NULL     | NULL    | NULL          |   31 | Using temporary; Using
filesort              |
|  1 | PRIMARY     | e          | eq_ref | PRIMARY
| PRIMARY  | 8       | e2.id         |    1 |
|
|  2 | DERIVED     | f          | range  | PRIMARY,priority,keep_history
| priority | 1       | NULL          |  137 | Using where; Using
temporary; Using filesort |
|  2 | DERIVED     | e1         | ref    |
PRIMARY,id_feed,is_favorite,is_read | id_feed  | 2       | freshrss.f.id
|  452 | Using where                                  |

+----+-------------+------------+--------+-------------------------------------+----------+---------+---------------+------+----------------------------------------------+
4 rows in set (3.50 sec)

mysql> EXPLAIN SELECT e.id, e.guid, e.title, e.author,
UNCOMPRESS(content_bin) AS content, e.link, e.date, e.is_read,
e.is_favorite, e.id_feed, e.tags FROM `freshrss_alex_entry` e INNER JOIN
(SELECT e1.id FROM `freshrss_alex_entry` e1 INNER JOIN
`freshrss_alex_feed` f ON e1.id_feed=f.id WHERE f.priority > 0 AND e1.id
<=9000000000000000 AND (e1.id >= 1381615200000000 OR e1.is_read=0 OR
e1.is_favorite=1 OR (f.keep_history <> 0)) ORDER BY e1.id DESC LIMIT 31)
e2 ON e2.id=e.id ORDER BY e.id DESC;

+----+-------------+------------+--------+-------------------------------------+---------+---------+---------------------+-------+---------------------------------+
| id | select_type | table      | type   | possible_keys
| key     | key_len | ref                 | rows  | Extra
|

+----+-------------+------------+--------+-------------------------------------+---------+---------+---------------------+-------+---------------------------------+
|  1 | PRIMARY     | <derived2> | ALL    | NULL
| NULL    | NULL    | NULL                |    31 | Using temporary;
Using filesort |
|  1 | PRIMARY     | e          | eq_ref | PRIMARY
| PRIMARY | 8       | e2.id               |     1 |
|
|  2 | DERIVED     | e1         | range  |
PRIMARY,id_feed,is_favorite,is_read | PRIMARY | 8       | NULL
| 70084 | Using where                     |
|  2 | DERIVED     | f          | eq_ref | PRIMARY,priority,keep_history
| PRIMARY | 2       | freshrss.e1.id_feed |     1 | Using where
|

+----+-------------+------------+--------+-------------------------------------+---------+---------+---------------------+-------+---------------------------------+
4 rows in set (0.01 sec)
2014-07-10 15:49:51 +02:00
Alexandre Alapetite
0f842c1aea SQL: removed superfluous transactions to avoid some dead locks 2014-07-08 14:14:02 +02:00
Alexandre Alapetite
439a0e2991 SQL: improved performance for adding new articles 2014-07-07 18:25:48 +02:00
Alexandre Alapetite
805c91da98 Add support for SQLite
https://github.com/marienfressinaud/FreshRSS/issues/100
Warning: MySQL has been changed too, so bugs may have been introduced
2014-07-05 01:52:41 +02:00
Alexandre Alapetite
d6f4141086 Preparation for SQLite
https://github.com/marienfressinaud/FreshRSS/issues/100
2014-07-03 21:26:30 +02:00
Alexandre Alapetite
d1b31b1a61 Search order of filters
For now, process them in the same order as specified by the user
Specifying for instance `date:` first will be much faster than
specifying a free text word first.
https://github.com/marienfressinaud/FreshRSS/issues/511
2014-06-01 15:23:30 +02:00
Alexandre Alapetite
ecac55d3d3 New search system, including date: and pubdate: and combination
Now also accepts combination of #tag and intitle: and inurl: and author:
and the new date: and pubdate:
https://github.com/marienfressinaud/FreshRSS/issues/511
Each search prefix stop at the first space (we should add a possibility
to have quotes for multiple words)
So if you want two words in title, write "intitle:word1 intitle:word2"

Examples of dates:
date:2014
date:2014-02/2014-04 or date:201402/201404
date:P1W for the last week
2014-06-01 14:40:38 +02:00
Alexandre Alapetite
f25783ef5d Minor syntax changes for: New toggle buttons to filter articles
See
http://programmers.stackexchange.com/questions/23852/bitwise-or-vs-adding-flags
https://github.com/marienfressinaud/FreshRSS/pull/486
https://github.com/marienfressinaud/FreshRSS/issues/376
2014-04-15 12:16:31 +02:00
Alexis Degrugillier
3a736e902c Move state constants from Configuration to Entry 2014-04-13 08:16:43 -04:00
Alexis Degrugillier
cd87e2000a Revert deletion of the favorite actions 2014-04-13 07:35:17 -04:00
Alexis Degrugillier
86066b1659 Add a new status for 'ALL'
I made the conversion in every file I can think of.
It should not have any reference to the string 'all' for the state context
2014-04-13 07:28:41 -04:00
Alexis Degrugillier
3e665bcf9a Delete favorite button
I extract drop-down menu actions to make them as button action in the page header.
I removed the favorite button on the category list because it is a duplicate from the button action.
Now button action act as filters and you can combine them.

It is a test to see if we can keep it like that. There is still work to do to extract other actions from the drop-down list.
I did not want to change everything if we don't keep it.

See #376 and #277
2014-04-12 11:51:44 -04:00
Marien Fressinaud
779afe9c4e Import of articles is implemented!
- Remove massiveImportAction and addCategories from FeedController
- Fix typo for some methods (camelCase)
- addCategoryObject and addFeedObject return id if corresponding object already
  exists in DB
- introduce addEntryObject. Return -1 if Entry already exist (in order to keep
  quite good performances)
- Complete importArticles method

Need some more tests + better performance
2014-03-30 14:28:13 +02:00
Alexandre Alapetite
fc6769c1b1 API: Add continuation mode
https://github.com/marienfressinaud/FreshRSS/issues/443
Needed for e.g. EasyRSS
2014-03-03 21:25:14 +01:00
Alexandre Alapetite
00774f5a0b API : SQL optimisation WHERE ... IN, and better compatibility EasyRSS
https://github.com/marienfressinaud/FreshRSS/issues/13
2014-03-02 11:54:52 +01:00
Alexandre Alapetite
71f7ce1be5 API: SQL optimisation
https://github.com/marienfressinaud/FreshRSS/issues/13
2014-03-01 15:47:15 +01:00
Alexandre Alapetite
f44683b567 API streamContents for categories and feeds
https://github.com/marienfressinaud/FreshRSS/issues/13
2014-02-28 20:22:50 +01:00
Alexandre Alapetite
6dffb8706f Alpha version of Google Reader compatible API
https://github.com/marienfressinaud/FreshRSS/issues/13
Hardcoded passwords, no possibility to add/delete feeds or edit
categories yet.
2014-02-27 22:48:11 +01:00
Alexandre Alapetite
7313f9f3a3 Bug "mark all as read" when using DESC and pagination and no scroll
https://github.com/marienfressinaud/FreshRSS/issues/431#issuecomment-35774488
2014-02-21 22:32:29 +01:00
Alexis Degrugillier
46a5bdea25 Ajout d'un filtre sur les articles lus
Ajout d'un filtre sur les articles favoris
2014-01-08 00:05:00 -05:00