Commit graph

26 commits

Author SHA1 Message Date
nodiscc cf9031da22 tests: phpcs: fix 'Opening brace must not be followed by a blank line' error
- fixes https://github.com/shaarli/Shaarli/issues/1818
2022-01-13 20:50:39 +01:00
ArthurHoaro bcba6bd353 New plugin hook: ability to add custom filters to Shaarli search engine
A new plugin hook has been added: hook_test_filter_search_entry
This hook allows to filter out bookmark with custom plugin code when a search is performed.

Related to #143
2021-02-04 11:02:50 +01:00
ArthurHoaro a6e9c08499 Plugin system: allow plugins to provide custom routes
- each route will be prefixed by `/plugin/<plugin_name>`
  - add a new template for plugins rendering
  - add a live example in the demo_plugin

Check out the "Plugin System" documentation for more detail.

Related to #143
2020-11-15 12:41:43 +01:00
ArthurHoaro b99e00f7cd Manually fix remaining PHPCS errors 2020-11-09 10:56:49 +01:00
ArthurHoaro b38a1b0209 Use PSR-3 logger for login attempts
Fixes #1122
2020-10-20 11:47:07 +02:00
ArthurHoaro 4cf3564d28 Add a setting to retrieve bookmark metadata asynchrounously
- There is a new standalone script (metadata.js) which requests
    a new controller to get bookmark metadata and fill the form async
  - This feature is enabled with the new setting: general.enable_async_metadata
    (enabled by default)
  - general.retrieve_description is now enabled by default
  - A small rotating loader animation has a been added to bookmark inputs
    when metadata is being retrieved (default template)
  - Custom JS htmlentities has been removed and  mathiasbynens/he
    library is used instead

Fixes #1563
2020-10-15 09:08:46 +02:00
ArthurHoaro fd1ddad98d Add mutex on datastore I/O operations
To make sure that there is no concurrent operation on the datastore file.

Fixes #1132
2020-10-13 12:38:19 +02:00
ArthurHoaro d52ab0b1e9 Properly handle 404 errors
Use 404 template instead of default Slim error page if the route is not found.

Fixes #827
2020-09-12 12:42:19 +02:00
ArthurHoaro 7e3dc0ba98 Better handling of plugin incompatibility
If a PHP is raised while executing plugin hook, Shaarli will display an error instead of rendering the error page (or just ending in fatal error for default hooks).
Also added phpErrorHandler which is handled differently that regular errorHandler by Slim.:
2020-08-27 12:04:36 +02:00
ArthurHoaro 0c6fdbe12b Move error handling to dedicated controller instead of middleware 2020-08-21 10:50:44 +02:00
ArthurHoaro 301c7ab1a0 Better support for notes permalink 2020-07-28 20:46:11 +02:00
ArthurHoaro 3ee8351e43 Multiple small fixes 2020-07-23 21:19:21 +02:00
ArthurHoaro c4ad3d4f06 Process Shaarli install through Slim controller 2020-07-23 21:19:21 +02:00
ArthurHoaro 1a8ac737e5 Process main page (linklist) through Slim controller
Including a bunch of improvements on the container,
and helper used across new controllers.
2020-07-23 21:19:21 +02:00
ArthurHoaro 1b8620b1ad Process plugins administration page through Slim controllers 2020-07-23 21:19:21 +02:00
ArthurHoaro e8a10f312a Use NetscapeBookmarkUtils object instance instead of static calls 2020-07-23 21:19:21 +02:00
ArthurHoaro 9c75f87793 Use multi-level routes for existing controllers instead of 1 level everywhere
Also prefix most admin routes with /admin/
2020-07-23 21:19:21 +02:00
ArthurHoaro 818b3193ff Explicitly define base and asset path in templates
With the new routes, all pages are not all at the same folder level anymore
(e.g. /shaare and /shaare/123), so we can't just use './' everywhere.
The most consistent way to handle this is to prefix all path with the proper variable,
and handle the actual path in controllers.
2020-07-23 21:19:21 +02:00
ArthurHoaro c22fa57a55 Handle shaare creation/edition/deletion through Slim controllers 2020-07-23 21:19:21 +02:00
ArthurHoaro 7b2ba6ef82 RSS/ATOM feeds: process through Slim controller 2020-07-23 21:19:21 +02:00
ArthurHoaro c4d5be53c2 Process Daily RSS feed through Slim controller
The daily RSS template has been entirely rewritten to handle the whole feed through the template engine.
2020-07-23 21:19:21 +02:00
ArthurHoaro 03340c18ea Slim router: handle add tag route 2020-07-23 21:19:21 +02:00
ArthurHoaro 8e47af2b36 Process logout through Slim controller 2020-07-23 21:19:21 +02:00
ArthurHoaro 485b168a96 Process picwall rendering through Slim controller + UT 2020-07-23 21:19:21 +02:00
ArthurHoaro 0498b209b5 Execute common plugin hooks before rendering login page 2020-01-26 11:34:14 +01:00
ArthurHoaro 6c50a6ccce Render login page through Slim controller 2020-01-26 11:34:14 +01:00