Commit graph

36 commits

Author SHA1 Message Date
1aa556cf12 Add HTTP authentication support to TTRSS; fixes #133
Also bump version to 0.4.0
2018-10-26 14:40:20 -04:00
3a07156259 Fix broken test 2017-12-07 19:39:32 -05:00
0b3b3cb49c Use SQLite nocase collation; improves #127 2017-12-07 18:05:34 -05:00
22cdc8916d Documentation tweaks and CS fixes 2017-11-29 22:42:50 -05:00
6da86428c4 Added per-file legal boilerplate
Includes PHPDoc license tag in the file-level block with accompanying copyright notice.

Also added an AUTHORS file on the off chance of outside contributions
2017-11-16 20:51:03 -05:00
11b2066922 Added per-file legal boilerplate
Includes PHPDoc license tag in the file-level block with accompanying copyright notice.

Also added an AUTHORS file on the off chance of outside contributions
2017-11-16 20:23:18 -05:00
ea08bbb87b Implement TTRSS feed icons; fixes #121
This introduces a data model function of unusual privilege: it can retrieve favicon URLs for any subscription, regardless of user ID. This is a single-purpose hack and its use should be avoided if at all possible.
2017-11-10 12:02:59 -05:00
cbe82c57cd Allow subscriptions to be listed non-recursively
This is used in multiple TTRSS operations (at least catchupFeed and getFeeds, and so is a useful optimization
2017-10-31 18:09:16 -04:00
26f6922b25 Partially implement labels
- Backend functions for adding, listing, removing, and editing (renaming) labels currently implemented
- TTRSS functions for adding (fixes #96), removing (fixes #97), and renaming (fixes #98) labels currently implemented
2017-10-05 17:42:12 -04:00
03d5d554a9 Imple TTRSS functions getUnread and getConfig
- Fixes #78
- Fixes #85
2017-10-03 12:43:46 -04:00
97b0134e56 Merge master 2017-10-02 15:42:15 -04:00
a80e283abc Perform feed discovery correctly; fixes #118 2017-10-02 11:53:52 -04:00
0a0aabe4ed Merge master 2017-09-30 12:52:05 -04:00
3482a35e54 Implement feed discovery; fixes #110 2017-09-30 11:43:43 -04:00
5488b994f7 Merged master; CS fixes 2017-09-28 10:16:24 -04:00
d365529493 Multiple fixes to input sanitization
- Database functions now accept any input, but throw typeViolation exceptions where appropriate instead of idMissing or subjectMissing
- Added unit tests for the new Misc\ValueInfo static class
- Added ValueInfo::id() method to centrally validate database IDs, and made use of it consistently
- Made use of PHP's filter_var() function where appropriate when validating or sanitizing input
- Made the NCN protocol handler reject most invalid IDs before handing off to method handlers
- Made NCN's feedUpdate and subscriptionMove methods return 422 on invalid input
- Adjusted several tests to handler type violations
2017-09-27 22:25:45 -04:00
e74a3ae3cb Fix numerous bugs when adding or changing folders
- Specifying a non-integer parent no longer silently casts to 0 or 1
- Specifying a folder ID of 0 now always converts to null automatically
- Performing both a rename and move to root in the same operation no longer results in potential duplicates
- Calling folderSetProperties with an empty data array no peforms an update; it now returns false before the update call
- Modification timestamps are now actually updated when a folder is modified
- Constraint violation exceptions triggered by code (rather than the database) now print a message
- Renaming a folder or subscription to a non-string value (e.g. an array) throws an exception rather than silently casting
- Added tests to better cover all the above
- Centralized the normalization of integers and title strings into a new ValueInfo static class
2017-09-26 16:45:41 -04:00
f7e50fe95d Passed code through linter 2017-08-29 10:50:31 -04:00
52104fb647 Implement article cleanup; fixes #28 2017-08-17 22:36:15 -04:00
67203679aa Changed foreign key on marks table
Previously arsse_marks had a reference to arsse_users along with arsse_articles; the former has now changed to arsse_subscriptions.

Consequently deleting a subscription now deletes marks. Tests have been simplified as a consequence.

This change was understaken to simplify counting valid marks on articles for the purposes of article cleanup; now all marks are valid marks
2017-08-14 17:18:18 -04:00
4066bba05e Full code coverage for Database class
- Fixes #49
2017-07-22 23:08:08 -04:00
da80a8ffa6 Complete tests for database driver
- Fixes #62
2017-07-22 15:29:12 -04:00
da092d5f8c Changed Misc\DateFormatter to a collection of static methods and renamed it to Date; renamed Data to Arsse to avoid confusion and better reflect its centrality 2017-07-17 07:47:57 -04:00
17ec6cf669 Move date formatting out of SQL and standardize on the DateFormatter trait
Fixes #56
2017-07-07 15:25:47 -04:00
7e458dddbc More test re-organization 2017-06-18 12:48:29 -04:00
845b47e656 Re-organize test data for Database tests 2017-06-18 12:24:19 -04:00
81419452b5 Added topmost folder to output of subscriptionList. Fixes #54
- Adjusted NCN handler to use the topmost folder for folderId; suppressed the actual folder so as not to pollute output with non-standard data
- Updated tests
2017-06-01 18:12:08 -04:00
88c0f4986c Implement NCN API v1-2 feed handling: tests
- Fixes #8
- Fixes #9
- Fixes #10
- Fixes #11
- Fixes #12

- Differentiated between a missing ID which is the subject of an action (e.g. the subscription when moving a subscription) and other missing IDs (e.g. the folder when moving a subscription)
- Enforced same rules for subscription titles as for folder names, save that null is valid for subscriptions
2017-05-21 10:10:36 -04:00
4a816f827b NCNv1 feed calls and other changes
- Implemented all but one feed-related function (it's more ofan item function)
- Fixed time conversion for input into SQL; dates in PM were previously wrong
- Added miscellaneous tentative functions to Database to help with peculiarities of NCNv1; these may change
- Tests to come soon
2017-05-18 23:03:33 -04:00
0bc2841837 Last of subscription tests
- Also tweaked SQL dateformat() function to output proper HTTP dates
- Also introduced method to set a default output date format
2017-05-18 13:21:17 -04:00
99ae274ef8 Also test negative read marks 2017-05-16 22:24:36 -04:00
ef3cb4fa54 Test unread counts in subscriptionList 2017-05-16 22:19:40 -04:00
f635155687 Basic tests for subscription list
- Need entries and read marks to fully test
- Added assertion type to test result subsets
- Fixed custom subscription titles
2017-05-14 23:03:48 -04:00
acbb254bfb Tests for removing subscriptions 2017-05-11 23:20:10 -04:00
98c950de58 Removed most calls to userExists()
- functions not related to user management now have the existence of the affected user checked in the authorizer, when the affected user differs from the actor
- User::authorizationEnabled() now nests: disabling twice and then enabling once leaves the authorizer disabled
- Disabling of the authorizer is now tested
- User tests now use a partial mock instead of relying on User::authorizationEnabled()
- Added authorizer tests against a missing user
- Removed folder tests related to missing users
- Also added more subscription tests
2017-05-11 18:00:35 -04:00
a580579627 First set of Database subscription tests 2017-05-10 22:01:00 -04:00