1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 13:12:41 +00:00
Commit graph

65 commits

Author SHA1 Message Date
J. King
37131d3775 Remove non-functional curl service driver for now
Its requiring extensive configuration to function makes me disinclined
to revive it, though it may nevertheless happen.
2019-01-23 09:19:26 -05:00
J. King
5cd84c4ab4 Validate configuration parameters on import, and other changes
- Each parameter is checked for type and normalized
- Interval strings are converted to DateInterval objects
- Timeouts can be specified as interval strings
- Most intervals can be null to signify infinity
- Driver classes are checked that they implement the correct interface
- Short driver names may be used, and are used by default
- Helpful errors messages are printed in case of erroneous configuration

Exporting is currently broken; this will be fixed in an upcoming commit
2019-01-20 22:40:49 -05:00
J. King
4670dfc849 Handle connection errors 2019-01-15 10:51:55 -05:00
J. King
5d61ab0a57 Fixes for MySQL native interface
Three test failures remain, but these are minor and will be resolved
soon. Handling of binary data is also broken, but given that this works
fine with the PDO driver, there is presumably some correct method.
2019-01-13 23:17:19 -05:00
J. King
4ef36643a4 Proof-of-concept PDO MySQL driver
- Configuration options were added
- Non-transactional locking was added to the savepoint handlers
- Tests were adjusted for MySQL's reserved words
2018-12-20 18:06:28 -05:00
J. King
2bebdd44cf Implementation of native PostgreSQL interface
Changes to the Database class were required to avoid outputting booleans
2018-12-13 19:47:51 -05:00
J. King
28f803dd28 Handle PostgreSQL connection errors 2018-12-12 11:15:07 -05:00
J. King
edfae438fa Refine pg connection strings 2018-11-16 21:20:54 -05:00
J. King
63ae6fb703 Merge remote-tracking branch 'remotes/origin/user-rewrite' 2018-11-06 16:36:50 -05:00
J. King
9428d7468a Add more user management functionality to the CLI 2018-11-05 09:08:50 -05:00
J. King
11747c93fd Strip out unused user management functionality
Tests have been removed as well; new tests are forthcoming
2018-10-28 10:59:17 -04:00
J. King
f64f0c6a22 Whitespace cleanup 2018-10-26 14:58:04 -04:00
J. King
ad6a09ffa1 Partially tested pdo_sqlite driver; improves #72 2017-12-19 17:15:05 -05:00
J. King
50185ab8f6 Change code and type of consantUnknown exception 2017-11-17 22:53:54 -05:00
J. King
c88b5c4f18 Make distinction between modified and marked for articles
Also added various sets of fields to include when listing articles.
2017-11-17 17:52:00 -05:00
J. King
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
J. King
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
J. King
7d19a5add0 Merge from master 2017-11-06 15:58:26 -05:00
J. King
9304f99032 Make result sets single-use; change savewepoint exceptions
- Result sets are now single-use; this is required for PDO drivers (PDO result sets are not rewindable)
- Change savepoint exceptions to be simple database exceptions; codes remain the same
2017-11-05 22:13:44 -05:00
J. King
579551f5fd Implement TTRSS operation getFeedTree; fixes #94 2017-10-30 13:11:27 -04:00
J. King
8c6c49d588 Merge changes from master 2017-10-19 22:58:42 -04:00
J. King
1271a0c8c0 Add ValueInfo::normalize method
This method provides generalized, consistent type casting more versatile than PHP's basic type juggling while hiding the significant complexity in achieving this.

While this commit does not change any existing code to use the new method, the intent is for both API handlers and database drivers to use the same basic rules for type conversion while still allowing for differing failure modes.
2017-10-19 15:18:58 -04:00
J. King
c9c6891567 Implement TTRSS getCategories; fixes #81 2017-10-07 12:46:05 -04:00
J. King
7b121c74ec Merge fixes from master 2017-09-26 20:25:11 -04:00
J. King
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
J. King
474d32e54f Preliminary implementation of TTRSS sessions (needs tests; may not work) 2017-09-16 19:57:33 -04:00
J. King
5df7217cff Improve REST test coverage 2017-07-24 08:15:37 -04:00
J. King
6d4aa4db6e Minimally functional, highly experimental, working server
- Basic update service handles only one feed at a time and possibly leaks memory
- Output for REST requests is still very basic
- No avatar support
- No reporting of whether cron works
- No cleanup before or after feed updates
2017-07-15 16:44:06 -04:00
J. King
761c1054f3 Added context options to mark multiple specific articles or editions
This required significant rewrites of queries because of stale editions
2017-07-06 22:53:17 -04:00
J. King
7656de716b Feed tests: fetching and parsing 2017-05-27 18:15:52 -04:00
J. King
ed3e3c12d6 More Feed tests: more cache header handling 2017-05-22 13:01:38 -04:00
J. King
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
J. King
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
J. King
8ebcb01cb5 Made out-of-order transaction handling more predictable 2017-05-07 18:27:16 -04:00
J. King
4e57e56ca7 Start on refactoring of feed processing 2017-04-13 22:17:53 -04:00
J. King
19abce85c3 Implement NCN API v1-2 folder creation
- Fixes #4
- Tests for failure modes still required
2017-04-02 12:14:15 -04:00
J. King
842e277d43 Implemented NCN API v1-2 folder list
- Fixes #2
- Also re-organized REST handling
2017-04-01 23:06:52 -04:00
J. King
a111bcc231 Folder get/set prop funcs and other changes
- Simplified folder removal; now properly relies on foreign keys for dependency resolution
- simplified *propertiesSet() methods by offloading input validation and query building to a generic function
- Implemented function to get the properties of a single folder (useful for internal use)
- Implemented a function to set the properties of a folder
2017-04-01 10:27:26 -04:00
Dustin Wilson
bc863ae935 Updated Database->updateFeeds()
• Added category updating in Database->updateFeeds()
• Made Database->updateFeeds() fail quietly when exceptions are
occurred, logging them in the database instead of failing.
• Changed the categories table name from arsse_tags to arsse_categories.
2017-03-30 09:42:37 -05:00
Dustin Wilson
7236020b8b Changed "NewsSync" to "Arsse" 2017-03-27 23:12:12 -05:00
J. King
18c8076a0f Database update tests 2017-03-09 21:39:42 -05:00
J. King
5ba38fc7aa Print ID in exception message 2017-03-08 12:31:45 -05:00
J. King
a3e2da1d36 Flesh out most database exceptions
- Fixes #46
- Some exception messages are tentative pending testing
2017-03-08 12:29:22 -05:00
J. King
7c1df71acd Make db throw specific exceptions
Needs testing and fleshing out; not all exception codes and messages have been defined
2017-03-08 09:55:16 -05:00
J. King
fa247b34f6 Reduce the number of database exception types 2017-03-08 08:19:42 -05:00
J. King
7687109132 Reorganize Db namespace; alter User ns to match 2017-03-07 18:01:13 -05:00
J. King
eeb1818bb5 Still more database changes
- Restructured tests
- Localized driver name for SQLite driver (fixes #37)
- Ensured that binding type definitions are required
2017-03-03 13:20:26 -05:00
J. King
1529fc367a Partial proper tests for parameter bindings
Null and (>0) integer tested so far

Many related changes to accomodate the necessary type juggling (required for databases other than SQLite).
2017-03-02 14:19:16 -05:00
J. King
be9ebf9ca1 Remove authz from User driver; moved to main class 2017-02-22 23:22:45 -05:00
J. King
d8f2440eeb Remove dead code 2017-02-20 22:10:25 -05:00