Commit graph

2034 commits

Author SHA1 Message Date
ArthurHoaro
38b55fbf3d
Merge pull request #1610 from ArthurHoaro/fix/wallabag
Plugin wallabag: minor improvements
2020-11-03 11:46:54 +01:00
ArthurHoaro
b7ec15790e
Merge pull request #1618 from ArthurHoaro/fix/ut-daily-date-1-digit
UT: fix formatting issue when the current day has a single digit
2020-11-02 19:42:20 +01:00
ArthurHoaro
b862705947 UT: fix formatting issue when the current day has a single digit 2020-11-02 19:32:48 +01:00
ArthurHoaro
dff039092d
Merge pull request #1616 from dimtion/fix-api-redirect
API postLink: change relative path to absolute path
2020-10-29 16:03:07 +01:00
Loïc Carr
b37ca79072 postLink: change relative path to absolute path 2020-10-28 20:08:18 -07:00
ArthurHoaro
14c9370b4f
Merge pull request #1615 from ArthurHoaro/hotfix/save-redirect
Remove unnecessary escape of referer
2020-10-28 14:18:25 +01:00
ArthurHoaro
114a43b20e Remove unnecessary escape of referer
Fixes #1611
2020-10-28 14:13:50 +01:00
ArthurHoaro
1ca7ddd76b
Merge pull request #1614 from ArthurHoaro/hotfix/php71-compat-login
Fix compatiliby issue on login with PHP 7.1
2020-10-28 14:08:08 +01:00
ArthurHoaro
d3f6d52525 Fix compatiliby issue on login with PHP 7.1
session_set_cookie_params does not return any value in PHP 7.1
2020-10-28 14:02:08 +01:00
ArthurHoaro
d2bb40cc7c
Merge pull request #1613 from ArthurHoaro/hotfix/404-not-authorized
Raise 404 error instead of 500 if permalink access is denied
2020-10-28 13:22:40 +01:00
ArthurHoaro
156061d445 Raise 404 error instead of 500 if permalink access is denied 2020-10-28 13:16:18 +01:00
ArthurHoaro
06734af130
Merge pull request #1612 from ArthurHoaro/hotfix/simplexml
Include php-simplexml in Docker image
2020-10-28 12:30:19 +01:00
ArthurHoaro
ff9686066e Include php-simplexml in Docker image
Composer 2.0 is now blocking everything if requirements are not met
2020-10-28 12:25:52 +01:00
ArthurHoaro
358cb20bcb Plugin wallabag: minor improvements
- hide the wallabag icon for logged out users
  - set API V2 as default parameter
  - fix URL encoding issue with special chars

Fixes #1147
2020-10-27 21:03:29 +01:00
ArthurHoaro
b2b5ef3122
Merge pull request #1587 from ArthurHoaro/feature/batch-bookmark-creation 2020-10-27 20:18:18 +01:00
ArthurHoaro
34c8f558e5 Bulk creation: ignore blank lines 2020-10-27 20:11:30 +01:00
ArthurHoaro
6a71675887 Bulk creation: displays a progress bar when saving all displayed forms 2020-10-27 20:11:30 +01:00
ArthurHoaro
c609944cb9 Bulk creation: improve performances using memoization
Reduced additional processing time per links from ~40ms to ~5ms
2020-10-27 20:11:30 +01:00
ArthurHoaro
25e90d8d75 Bulk creation: fix private status based on the first form 2020-10-27 20:11:30 +01:00
ArthurHoaro
5d8de7587d Feature: bulk creation of bookmarks
This changes creates a new form in addlink page allowing to create
multiple bookmarks at once more easily. It focuses on re-using as much
existing code and template component as  possible.

These changes includes:
  - a new form in addlink (hidden behind a button by default),
containing a text area for URL, and tags/private status to apply to
created links
  - this form displays a new template called editlink.batch, itself
including editlink template multiple times
  - User interation in this new templates are handle by a new JS script
(shaare-batch.js) making AJAX requests, and therefore does not need page
reloading
  - ManageShaareController has been split into 3 distinct controllers:
    + ShaareAdd: displays addlink template
    + ShaareManage: various operation applied on existing shaares
(change visibility, pin, deletion, etc.)
    + ShaarePublish: handles creation/edit forms and saving Shaare's
form
  - Updated translations

Fixes #137
2020-10-27 20:11:30 +01:00
ArthurHoaro
b8e5a253ab
Merge pull request #1595 from ArthurHoaro/feature/daily-period 2020-10-27 19:59:28 +01:00
ArthurHoaro
54afb1d6f6 Fix rebase issue 2020-10-27 19:55:29 +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
c2cd15dac2 Move utils classes to Shaarli\Helper namespace and folder 2020-10-27 19:41:38 +01:00
ArthurHoaro
977db7eabc
Merge pull request #1597 from ArthurHoaro/feature/share-private-bookmark
Feature: Share private bookmarks using a URL containing a private key
2020-10-27 19:40:57 +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
e6215a2ad9
Merge pull request #1604 from ArthurHoaro/feature/server-admin-page
Feature: add a Server administration page
2020-10-27 19:29:43 +01:00
ArthurHoaro
034c1ce526
Merge pull request #1609 from GaneshKandu/patch-1 2020-10-27 19:27:06 +01:00
Ganesh Kandu
e69e3fef7b
Removed PHP_EOL
just replace "*/ ?>" and "<?php /*" with '' and "Trim" output whatever is EOF will trimmed out.
2020-10-27 18:08:14 +05:30
Ganesh Kandu
42a72c02fa
Replaced PHP_EOL to "\n"
i was getting error 

```
An error occurred while parsing JSON configuration file (data/config.json.php): error code #4
➜ Syntax error
Please check your JSON syntax (without PHP comment tags) using a JSON lint tool such as jsonlint.com.
```
after debug i found 
```php
        $data = str_replace(self::getPhpHeaders(), '', $data);
        $data = str_replace(self::getPhpSuffix(), '', $data);
```
doesn't removing php header and php suffix

cause of this issue was PHP_EOL represents the endline character for the current system. if my  ```config.json.php```  was encoded with unix ( LF ) and php running on windows windows encoding ( CR LF ) is not same as unix encoding ( LF ) so ```str_replace``` doesn't replace strin  then it causes issue.
2020-10-27 17:42:35 +05:30
ArthurHoaro
820cae27cf
Merge pull request #1601 from ArthurHoaro/feature/psr3 2020-10-24 11:37:29 +02:00
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