Commit graph

562 commits

Author SHA1 Message Date
ArthurHoaro
0a47d89193 Drop support for PHP 7.1, 7.2 and 7.3
This commit doesn't yet enforce the new requirement since previous version will continue to work for a short while.
2023-03-18 14:27:41 -04:00
ArthurHoaro
b858332f9f
Fix a bug when using '/' as a tag separator (#1953) 2023-03-18 11:59:00 -04:00
Keith Carangelo
733b40446e
Ensure tags are unique when adding and deleting them from bookmarks. (#1918)
* Ensure tags are unique when adding and deleting them from bookmarks.

* Fixed PHPCS issues with test script
2022-12-01 02:47:10 +01:00
ArthurHoaro
00cce1f8c7
Bulk action: add or delete tag to multiple bookmarks (#1898) 2022-11-26 08:58:12 -05:00
ArthurHoaro
84b37c7baa
Add an additional free disk space check before saving the datastore (#1913)
Fixes https://github.com/shaarli/Shaarli/issues/1810
2022-11-25 17:23:43 +01:00
Hazhar Galeh
dbd99f310f
Resolve PHP 8.1 deprecations (#1866)
Co-authored-by: Adrien Crivelli <adrien.crivelli@gmail.com>
Co-authored-by: ArthurHoaro <arthur@hoa.ro>
2022-09-14 08:17:07 +02:00
ArthurHoaro
7c6df1c80f
Merge pull request #1872 from ArthurHoaro/feature/shaarli-netscape-upgrade 2022-08-20 08:52:59 +02:00
nodiscc
3665594d36
Merge pull request #1727 from ArthurHoaro/feature/readit
New Core Plugin: ReadItLater
2022-08-16 10:42:20 +02:00
ArthurHoaro
bde1fdcb48 Netscape bookmark parser: bump to new major version
Apply breaking changes of the new version:
  - parsed bookmarks have different field names
  - default values (private and tags) are no longer handled by the library
  - constructor signature has been updated
2022-08-13 16:08:23 +02:00
ArthurHoaro
130008da03
Merge pull request #1792 from yfdyh000/sitetitle 2022-08-13 10:21:48 +02:00
ArthurHoaro
b59cdb3871 ArthurHoaro code review: use Shared Bookmark as default title instead of My links 2022-08-13 10:19:15 +02:00
YFdyh000
d5b218eed4 Simple and uniform localized website title 2022-08-13 10:19:15 +02:00
ArthurHoaro
22d43c303b
Merge pull request #1788 from yfdyh000/messages_210822 2022-08-13 10:11:21 +02:00
ArthurHoaro
bf8bec322b New Core Plugin: ReadItLater
Create a new core plugin allowing to mark bookmarks to read them later.
When enabled:

  * checkbox is displayed in editlink view for new bookmarks
  * a plugin setting is available to check it or not it by default
  * in bookmark list:
    * new global filter to display only bookmark flagged as read it
      later
    * for each bookmarks, new action icon to toggle read it later status
    * for each « readitlater » bookmark, red label « To Read » added,
      and red line on the right of the bookmark added (default template)

Fixes #143

Signed-off-by: ArthurHoaro <arthur@hoa.ro>
2022-08-12 19:58:07 +02:00
Keith Carangelo
9d99925615 Updated to pass codesniffer 2022-03-31 16:01:55 -04:00
Keith Carangelo
6ecc4745f4 Fix Github #1844 - Monthly views previous/next month links during month
end. Avoid deprecated strftime function. Got tests to pass in PHP 8.1.
2022-03-31 15:42:25 -04:00
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
Keith Carangelo
c6f27b1ade Fixed issues after running make code_sniffer 2021-09-08 15:46:51 -04:00
Keith Carangelo
a7d43caccb Added support for OR (~) and optional AND (+) operators for tag searches. 2021-09-08 15:26:58 -04:00
YFdyh000
dea58d5abd trivial refine for messages 2021-08-22 21:58:52 +08:00
YFdyh000
142370f0a1 Add Chinese (Simplified) translation 2021-08-10 07:23:42 +08:00
ArthurHoaro
af764dfd4e
Merge pull request #1731 from ArthurHoaro/fix/search-highlight-table
Search highlight: do not use special characters for tokens
2021-04-05 11:10:43 +02:00
ArthurHoaro
b2a43bc861 Search highlight: do not use special characters for tokens
It messes with Markdown syntax (tables in this case).

Fixes #1729
2021-04-05 09:15:25 +02:00
Ajabep
2ea2c99dcb
Fix a bug
When we try to access the atom feed and have no bookmarks, it raised the following exception :

```
Call to a member function reorder() on array /webroot/application/bookmark/BookmarkFileService.php:143
#0 /webroot/application/feed/FeedBuilder.php(106): Shaarli\Bookmark\BookmarkFileService->search(Array, 'public', false, false, true)
#1 /webroot/application/front/controller/visitor/FeedController.php(47): Shaarli\Feed\FeedBuilder->buildData('atom', Array)
#2 /webroot/application/front/controller/visitor/FeedController.php(20): Shaarli\Front\Controller\Visitor\FeedController->processRequest('atom', Object(Slim\Http\Request), Object(Slim\Http\Response))
#3 [internal function]: Shaarli\Front\Controller\Visitor\FeedController->atom(Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#4 /webroot/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(40): call_user_func(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#5 /webroot/vendor/slim/slim/Slim/Route.php(281): Slim\Handlers\Strategies\RequestResponse->__invoke(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#6 /webroot/application/front/ShaarliMiddleware.php(55): Slim\Route->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#7 [internal function]: Shaarli\Front\ShaarliMiddleware->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#8 /webroot/vendor/slim/slim/Slim/DeferredCallable.php(57): call_user_func_array(Array, Array)
#9 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#10 /webroot/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#11 /webroot/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
#12 /webroot/vendor/slim/slim/Slim/Route.php(268): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#13 /webroot/vendor/slim/slim/Slim/App.php(503): Slim\Route->run(Object(Slim\Http\Request), Object(Slim\Http\Response))
#14 /webroot/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#15 /webroot/vendor/slim/slim/Slim/App.php(392): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#16 /webroot/vendor/slim/slim/Slim/App.php(297): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response))
#17 /webroot/index.php(177): Slim\App->run(true)
#18 {main}
```
2021-04-02 21:14:09 +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
8997ae6c8e
Merge pull request #1697 from ArthurHoaro/feature/pagination
Handle pagination through BookmarkService
2021-02-04 10:57:44 +01:00
ArthurHoaro
11edc143b4
Merge pull request #1696 from ArthurHoaro/fix/search-highlight-url 2021-02-04 10:57:12 +01:00
ArthurHoaro
a1cd7a3b2f ShaarliParsedown: add PHPDoc/comments 2021-02-04 10:53:23 +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
055d97f9a9
Merge pull request #1695 from ArthurHoaro/fix/ut-curl 2021-01-20 11:31:35 +01:00
ArthurHoaro
9ef8555ad2 Support search highlights when matching URL content
DefaultFormatter:
  - format 'a' tag content and not href attribute
  - format hashtags properly
Markdown(Extra)Formatter:
  - Extend Parsedown to format highlight properly: https://github.com/erusev/parsedown/wiki/Tutorial:-Create-Extensions

Fixes #1681
2021-01-19 17:49:19 +01:00
ArthurHoaro
dafd3f081a format_date: include timezone in IntlDateFormatter object
@see https://www.php.net/manual/en/intldateformatter.format.php

> If a DateTime or an IntlCalendar object is passed, its timezone is not considered. The object will be formatted using the formaterʼs configured timezone. If one wants to use the timezone of the object to be formatted, IntlDateFormatter::setTimeZone() must be called before with the objectʼs timezone.
2021-01-19 15:03:28 +01:00
ArthurHoaro
6b76ce6f62 curl usage: support HTTP/2 response code header 2021-01-19 15:03:18 +01:00
ArthurHoaro
93175b6e9d Fix: bulk add - delete existing link
Do not send redirect response in bookmark delete controller if the request comes from bulk creation page.

Fixes #1683
2021-01-19 12:54:34 +01:00
ArthurHoaro
ccd1862d5f Inject current template name in templates
Use either legacy key _PAGE_ or new 'template' one.

Related to https://github.com/kalvn/Shaarli-Material/issues/118
2021-01-19 10:34:11 +01:00
ArthurHoaro
0640c1a6db API: POST/PUT Link - properly parse tags string
Even though the documentation specify that tags should be passed as an array, tags string is actually allowed. So this adds a proper parsing with configured separator.

Related to #1651
2020-12-29 13:01:04 +01:00
ArthurHoaro
fe58bdcd9e
Merge pull request #1664 from ArthurHoaro/fix/metadata-sync
Fix: synchronous metadata retrieval is failing in strict mode
2020-12-29 11:44:10 +01:00
ArthurHoaro
8ed5fbef8f
Merge pull request #1665 from ArthurHoaro/fix/metadata-regexes-2
Fix metadata extract regex (2)
2020-12-29 11:43:39 +01:00
ArthurHoaro
f00600a283 Daily RSS Cache: invalidate cache base on the date
Currently the cache is only invalidated when the datastore changes, while it should rely on selected period of time.

Fixes #1659
2020-12-17 15:48:03 +01:00
ArthurHoaro
88a8e284b2 Fix metadata extract regex (2)
Reference: https://stackoverflow.com/questions/8055727/negating-a-backreference-in-regular-expressions

Fixes #1656
2020-12-17 13:56:24 +01:00
ArthurHoaro
ab4c170672
Merge pull request #1644 from ArthurHoaro/fix/daily-rss
Daily RSS - Remove relative description (today, yesterday)
2020-12-16 16:04:53 +01:00
ArthurHoaro
bd11879018
Merge pull request #1645 from ArthurHoaro/feature/plugin-register-route
Plugin system: allow plugins to provide custom routes
2020-12-16 16:04:15 +01:00
ArthurHoaro
6a3a78d023 Fix: synchronous metadata retrieval is failing in strict mode
Metadata can now only be string or null.

Fixes #1653
2020-12-16 14:04:32 +01:00
ArthurHoaro
8a6b7e96b7 Fix: soft fail if the mutex is not working
And display the error in server admin page

Fixes #1650
2020-11-24 13:39:35 +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
2883c6d0a7 Daily RSS - Remove relative description (today, yesterday)
It is not useful for the RSS feed, as every new entry will be 'yesterday', and it requires an update the next day.
2020-11-15 12:05:08 +01:00
prog-it
150f2a0f24 Add russian language selection 2020-11-14 07:45:10 +05:00
ArthurHoaro
302662797c
Merge pull request #1635 from ArthurHoaro/feature/phpcs 2020-11-10 10:46:04 +01:00
ArthurHoaro
80c8889bfe Server admin: do not retrieve latest version without update_check
If the setting 'updates.check_updates' is disabled, do not retrieve the latest version on server administration page.

Additionally, updated default values for

  - updates.check_updates from false to true
  - updates.check_updates_branch from stable to latest
2020-11-09 14:42:30 +01:00
ArthurHoaro
b99e00f7cd Manually fix remaining PHPCS errors 2020-11-09 10:56:49 +01:00