Commit graph

2153 commits

Author SHA1 Message Date
ArthurHoaro
8f6e3d51cc
Merge pull request #1605 from ArthurHoaro/fix/nginx-doc-rule
Fix: nginx - add rule to disable url-rewriting for the docs
2020-10-21 15:55:39 +02:00
ArthurHoaro
2f87bfdc69 Fix: nginx - add rule to disable url-rewriting for the docs
Related to #1603
2020-10-21 15:23:30 +02:00
ArthurHoaro
0cf76ccb47 Feature: add a Server administration page
It contains mostly read only information about the current Shaarli instance,
PHP version, extensions, file and folder permissions, etc.
Also action buttons to clear the cache or sync thumbnails.

Part of the content of this page is also displayed on the install page,
to check server requirement before installing Shaarli config file.

Fixes #40
Fixes #185
2020-10-21 15:06:47 +02:00
ArthurHoaro
3445443349
Merge pull request #1602 from ArthurHoaro/fix/root-exceptions
Dislay an error if an exception occurs in the error handler
2020-10-20 21:37:20 +02:00
ArthurHoaro
5c06c0870f Dislay an error if an exception occurs in the error handler
Related to #1598
2020-10-20 18:32:46 +02:00
ArthurHoaro
b38a1b0209 Use PSR-3 logger for login attempts
Fixes #1122
2020-10-20 11:47:07 +02:00
ArthurHoaro
ca5e98da48 Composer: explicitly import katzgrau/klogger (already included in netscape-bookmark-parser) 2020-10-20 10:39:58 +02:00
ArthurHoaro
d8030c8155
Merge pull request #1584 from ArthurHoaro/feature/async-thumbnail-retrieval
Asynchronous retrieval of bookmark's thumbnails
2020-10-20 10:30:02 +02:00
ArthurHoaro
21e72da9ee Asynchronous retrieval of bookmark's thumbnails
This feature is based general.enable_async_metadata setting and works with existing metadata.js file.
The script is compatible with any template:
   - the thumbnail div bloc must have  attribute
   - the bookmark bloc must have  attribute with the bookmark ID as value

Fixes #1564
2020-10-20 10:15:18 +02:00
ArthurHoaro
9b3c1270bc
Merge pull request #1567 from ArthurHoaro/feature/async-title-retrieval 2020-10-20 10:14:28 +02:00
ArthurHoaro
552c3b942a
Merge pull request #1600 from yudete/master 2020-10-20 10:08:03 +02:00
yudete
5256b42870 Update translations (Japanese) 2020-10-19 10:25:51 +09:00
yudete
52e27a96a4 Update translations (Japanese) 2020-10-19 10:17:35 +09:00
ArthurHoaro
6866ed766f
Merge pull request #1588 from ArthurHoaro/feature/search-highlight 2020-10-16 20:40:49 +02:00
ArthurHoaro
f1a148ab92 add search highlight unit tests 2020-10-16 20:31:49 +02:00
ArthurHoaro
4e3875c0ce Feature: highlight fulltext search results
How it works:

  1. when a fulltext search is made, Shaarli looks for the first
occurence position of every term matching the search. No change here,
but we store these positions in an array, in Bookmark's additionalContent.
  2. when formatting bookmarks (through BookmarkFormatter
implementation):
    1. first we insert specific tokens at every search result positions
    2. we format the content (escape HTML, apply markdown, etc.)
    3. as a last step, we replace our token with displayable span
elements

Cons: this tightens coupling between search filters and formatters
Pros: it was absolutely necessary not to perform the
search twice. this solution has close to no impact on performances.

Fixes #205
2020-10-16 20:31:12 +02:00
ArthurHoaro
64cac25626
Merge pull request #1596 from ArthurHoaro/feature/better-rename-tag
Improve Manage tags page
2020-10-16 20:15:19 +02:00
ArthurHoaro
3cb4e8a44c Improve Manage tags page
Fixes #1125
2020-10-16 20:03:25 +02:00
ArthurHoaro
81c9df1363
Merge pull request #1593 from ArthurHoaro/fix/no-url-rewriting 2020-10-16 19:26:03 +02:00
ArthurHoaro
7836ed9b2e Doc: typo 2020-10-16 19:20:45 +02:00
ArthurHoaro
3adbdc2a83 Inject ROOT_PATH in plugin instead of regenerating it everywhere 2020-10-16 13:06:06 +02:00
ArthurHoaro
7f5250421b Support using Shaarli without URL rewriting
- Shaarli can be fully used by prefixing any URL with /index.php/
   - {$base_path} used in templates already works with this configuration
   - Assets path (outside of theme's assets) must be prefixed with {$root_url}/
   - Documentation section in « Server configuration »

Fixes #1590
2020-10-16 12:47:11 +02:00
ArthurHoaro
cd2878edee
Merge pull request #1592 from ArthurHoaro/fix/strict-type-daily
Strict types: fix an issue in daily where the date could be an int
2020-10-16 12:16:54 +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
5334090be0 Improve metadata retrieval (performances and accuracy)
- Use dedicated function to download headers to avoid apply multiple regexps on headers
  - Also try to extract title from meta tags
2020-10-15 11:36:56 +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
f34554c6c2
Merge pull request #1591 from ArthurHoaro/doc/server-conf-php-v
Doc: add PHP 7.4 and 8.0 as supported version
2020-10-15 09:06:27 +02:00
ArthurHoaro
ec45749187 Doc: add PHP 7.4 and 8.0 as supported version 2020-10-15 09:01:41 +02:00
ArthurHoaro
4a26974a4b
Merge pull request #1583 from ArthurHoaro/feature/bookmark-strict-types
Add strict types for bookmarks management
2020-10-13 13:56:07 +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
29c31b7ec6
Merge pull request #1570 from ArthurHoaro/feature/datastore-mutex
Add mutex on datastore I/O operations
2020-10-13 13:30:37 +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
458b6b9918
Merge pull request #1540 from ArthurHoaro/fix/metadata-regexes
Improve regex to extract HTML metadata (title, description, etc.)
2020-10-13 12:26:55 +02:00
ArthurHoaro
543b16b4f4
Merge pull request #1525 from ArthurHoaro/feature/rest-api-bookmark-dates
REST API: allow override of creation and update dates
2020-10-13 12:26:01 +02:00
ArthurHoaro
8f269b49d7
Merge pull request #1521 from ArthurHoaro/feature/markdown-extra
Add Markdown Extra formatter
2020-10-13 12:25:12 +02:00
ArthurHoaro
8fabcd0224 Add Markdown Extra formatter
Library: [Parsedown Extra](https://github.com/erusev/parsedown-extra)

Also sort dependencies alphabetically.

Fixes #1169
2020-10-13 12:20:34 +02:00
ArthurHoaro
84045ffbb1 Update badge versions 2020-10-13 12:01:19 +02:00
ArthurHoaro
64152387d6
Merge pull request #1589 from ArthurHoaro/changelog/v0.12.0
CHANGELOG and AUTHORS for v0.12.0
2020-10-13 11:49:07 +02:00
ArthurHoaro
2d015d79b7 CHANGELOG and AUTHORS for v0.12.0 2020-10-13 11:44:31 +02:00
ArthurHoaro
3020310dd0
Merge pull request #1586 from ArthurHoaro/changelog/v0.12.0-beta-2
CHANGELOG and AUTHORS for v0.12.0-beta-2
2020-10-08 08:54:19 +02:00
ArthurHoaro
b028f0869f CHANGELOG and AUTHORS for v0.12.0-beta-2 2020-10-08 08:41:30 +02:00
ArthurHoaro
7f1bb5553b
Merge pull request #1585 from ArthurHoaro/fix/xss-and-tag-search
Security: fix multiple XSS vulnerabilities + fix search tags with special chars
2020-10-08 08:19:06 +02:00
ArthurHoaro
72fbbcd679 Security: fix multiple XSS vulnerabilities + fix search tags with special chars
XSS vulnerabilities fixed in editlink, linklist, tag.cloud and tag.list.

Also fixed tag search with special characters: urlencode function needs to be applied on raw data, before espaping, otherwise the rendered URL is wrong.
2020-10-06 17:30:18 +02:00
nodiscc
df25b28dcd
Merge pull request #1579 from sprak3000/issue-1437-tag-sort-buttons-ui
Fix #1437 - Make tag cloud/list views buttons more obvious
2020-10-04 11:45:24 +00:00
nodiscc
fc4d1b6796
Merge pull request #1581 from nodiscc/compose-traefik-version
docker-compose.yml: pin traefik image to 1.7-alpine
2020-10-04 11:33:57 +00:00
nodiscc
bb176441cb docker-compose.yml: pin traefik image to 1.7-alpine
- fixes https://github.com/shaarli/Shaarli/issues/1493
- https://hub.docker.com/_/traefik/
2020-10-03 14:35:06 +02:00
ArthurHoaro
7b18876361
Merge pull request #1575 from ArthurHoaro/feature/php8 2020-10-03 12:59:16 +02:00
ArthurHoaro
ee07b7283f
Merge pull request #1574 from stoeps13/hosting-fix 2020-10-03 12:59:01 +02:00
sprak3000
f4ea7cd563 Issue #1437 - Make tag cloud/list views buttons more obvious
This work alters the markup and CSS for the tag sort UI to match the button feel filters and links per page uses.
2020-10-02 14:06:02 -04:00
ArthurHoaro
1db2ebbd79
Merge pull request #1577 from ArthurHoaro/fix/edit-zero
Fix a bug preventing to edit bookmark with ID #0
2020-10-02 14:24:07 +02:00