Commit graph

24 commits

Author SHA1 Message Date
ArthurHoaro 830a73dcf6 Coding style: manually fix remaining errors in tests after PHPCBF
Related to #95
2021-04-05 11:00:28 +02:00
ArthurHoaro 0681511699 Coding style: Apply automatic PHPCBF to tests forlder (PSR12)
Related to #95
2021-04-05 09:39:34 +02: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 9b8c0a4560 Handle pagination through BookmarkService
Handle all search results through SearchResult object.
This is a required step toward implementing a BookmarkService based on SQL database.

Related to #953
2021-01-20 15:01:29 +01:00
ArthurHoaro 156061d445 Raise 404 error instead of 500 if permalink access is denied 2020-10-28 13:16:18 +01:00
ArthurHoaro 36e6d88dbf Feature: add weekly and monthly view/RSS feed for daily page
- Heavy refactoring of DailyController
  - Add a banner like in tag cloud to display monthly and weekly links
  - Translations: t() now supports variables with optional first letter
uppercase

Fixes #160
2020-10-27 19:45:02 +01:00
ArthurHoaro 9c04921a8c Feature: Share private bookmarks using a URL containing a private key
- Add a share link next to « Permalink » in linklist (using share icon
from fork awesome)
  - This link generates a private key associated to the bookmark
  - Accessing the bookmark while logged out with the proper key will
display it

Fixes #475
2020-10-27 19:32:57 +01:00
ArthurHoaro f1a148ab92 add search highlight unit tests 2020-10-16 20:31:49 +02:00
ArthurHoaro 4b3aca6623 Strict types: fix an issue in daily where the date could be an int 2020-10-16 12:04:46 +02:00
ArthurHoaro efb7d21b52 Add strict types for bookmarks management
Parameters typing and using strict types overall increase the codebase
quality by enforcing the a given parameter will have the expected type.

It also removes the need to unnecessary unit tests checking methods
behavior with invalid input.
2020-10-13 13:50:11 +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 f447edb73b Fix missing @expectedException convertion 2020-09-29 18:57:25 +02:00
ArthurHoaro a5a9cf23ac Compatibility with PHPUnit 9 2020-09-29 18:57:20 +02:00
ArthurHoaro b1baca99f2 Convert legacy PHPUnit @expected* to new ->expect*
Converted automatically using https://github.com/ArthurHoaro/convert-legacy-phpunit-expect
2020-09-27 14:09:55 +02:00
ArthurHoaro 8f60e1206e Comply with PHPUnit V8: setup/teardown functions must return void 2020-09-26 15:08:39 +02:00
ArthurHoaro 6128ab6a55
Merge pull request #1552 from ArthurHoaro/feature/better-initializer 2020-09-12 12:14:18 +02:00
ArthurHoaro da7acb9830 Improve default bookmarks after install
Used @nodiscc suggestion in #1148 (slightly edited).
It provides a description of what Shaarli does, Markdown rendering demo, and a thumbnail link.

Fixes #1148
2020-09-10 16:29:17 +02:00
ArthurHoaro 27ddfec3c3 Fix visibility issue on daily page
This filter (links by day) didn't apply any visibility parameter.

Fixes #1543
2020-09-06 14:11:02 +02:00
ArthurHoaro f7f08ceec1 Fix basePath in unit tests reference DB 2020-07-28 22:34:45 +02:00
ArthurHoaro 301c7ab1a0 Better support for notes permalink 2020-07-28 20:46:11 +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 c79473bd84 Handle tag filtering in the Bookmark service 2020-07-23 21:19:21 +02:00
ArthurHoaro a39acb2518 Fix an issue with private tags and fix nomarkdown tag
The new bookmark service wasn't handling private tags properly.

nomarkdown tag is now shown only for logged in user in bookmarks, and hidden for everyone in tag clouds/lists.

Fixes #726
2020-01-18 11:39:26 +01:00
ArthurHoaro e26e2060f5 Add and update unit test for the new system (Bookmark + Service)
See #1307
2020-01-18 09:56:32 +01:00