aboutsummaryrefslogtreecommitdiffhomepage
path: root/application
Commit message (Collapse)AuthorAgeFilesLines
* Use PSR-3 logger for login attemptsArthurHoaro2020-10-207-76/+87
| | | | Fixes #1122
* Asynchronous retrieval of bookmark's thumbnailsArthurHoaro2020-10-203-7/+24
| | | | | | | | | 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
* Merge pull request #1567 from ArthurHoaro/feature/async-title-retrievalArthurHoaro2020-10-208-80/+209
|\
| * Improve metadata retrieval (performances and accuracy)ArthurHoaro2020-10-153-55/+91
| | | | | | | | | | - Use dedicated function to download headers to avoid apply multiple regexps on headers - Also try to extract title from meta tags
| * Add a setting to retrieve bookmark metadata asynchrounouslyArthurHoaro2020-10-156-25/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | Feature: highlight fulltext search resultsArthurHoaro2020-10-165-32/+342
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Merge pull request #1593 from ArthurHoaro/fix/no-url-rewritingArthurHoaro2020-10-163-1/+5
|\ \
| * | Inject ROOT_PATH in plugin instead of regenerating it everywhereArthurHoaro2020-10-162-0/+2
| | |
| * | Support using Shaarli without URL rewritingArthurHoaro2020-10-161-1/+3
| |/ | | | | | | | | | | | | | | | | - 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
* / Strict types: fix an issue in daily where the date could be an intArthurHoaro2020-10-161-1/+1
|/
* Add strict types for bookmarks managementArthurHoaro2020-10-1312-176/+187
| | | | | | | | 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.
* Add mutex on datastore I/O operationsArthurHoaro2020-10-135-21/+38
| | | | | | To make sure that there is no concurrent operation on the datastore file. Fixes #1132
* Merge pull request #1540 from ArthurHoaro/fix/metadata-regexesArthurHoaro2020-10-131-2/+4
|\ | | | | Improve regex to extract HTML metadata (title, description, etc.)
| * Improve regex to extract HTML metadata (title, description, etc.)ArthurHoaro2020-09-031-2/+4
| | | | | | | | | | | | Also added a bunch of tests to cover more use cases. Fixes #1375
* | Merge pull request #1525 from ArthurHoaro/feature/rest-api-bookmark-datesArthurHoaro2020-10-133-4/+14
|\ \ | | | | | | REST API: allow override of creation and update dates
| * | REST API: allow override of creation and update datesArthurHoaro2020-08-293-4/+14
| | | | | | | | | | | | | | | | | | | | | Note that if they're not provided, default behaviour will apply: creation and update dates will be autogenerated, and not empty. Fixes #1223
* | | Add Markdown Extra formatterArthurHoaro2020-10-132-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | Library: [Parsedown Extra](https://github.com/erusev/parsedown-extra) Also sort dependencies alphabetically. Fixes #1169
* | | Security: fix multiple XSS vulnerabilities + fix search tags with special charsArthurHoaro2020-10-067-15/+50
| | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #1575 from ArthurHoaro/feature/php8ArthurHoaro2020-10-031-1/+1
|\ \ \
| * | | Compatibility with PHP 8ArthurHoaro2020-09-291-1/+1
| | | |
* | | | Merge pull request #1574 from stoeps13/hosting-fixArthurHoaro2020-10-031-2/+8
|\ \ \ \
| * | | | Revert unrelated changes and add unit testsArthurHoaro2020-09-301-7/+17
| | | | |
| * | | | Fix identationChristoph Stoettner2020-09-301-5/+5
| | | | |
| * | | | Change to ->container->environmentChristoph Stoettner2020-09-301-18/+10
| | | | |
| * | | | Workaround for hoster (ionos)Christoph Stoettner2020-09-291-2/+6
| |/ / / | | | | | | | | | | | | | | | | | | | | The hoster writes the environment variable with bearer token to REDIRECT_HTTP_AUTHORIZATION and needs to provide RewriteBase / to .htaccess
* | | | Fix a bug preventing to edit bookmark with ID #0ArthurHoaro2020-09-301-1/+1
| | | |
* | | | Fix warning if the encoding retrieved from external headers is invalidArthurHoaro2020-09-302-2/+2
|/ / / | | | | | | | | | Also fixed the regex to support this failing header: charset="utf-8"\r\n"
* | | Fix invalid redirection using the path of an external domainArthurHoaro2020-09-221-0/+7
| | | | | | | | | | | | Fixes #1554
* | | Merge pull request #1559 from ArthurHoaro/fix/edit-redirectArthurHoaro2020-09-221-1/+1
|\ \ \ | | | | | | | | Fix redirection to referer after editing a link
| * | | Fix redirection to referer after editing a linkArthurHoaro2020-09-221-1/+1
| | | | | | | | | | | | | | | | Fixes #1545
* | | | Merge pull request #1539 from ArthurHoaro/feature/manual-root-urlArthurHoaro2020-09-223-6/+10
|\ \ \ \ | |/ / / |/| | |
| * | | Fix subfolder configuration in unit testsArthurHoaro2020-09-121-1/+1
| | | |
| * | | Add manual configuration for root URLArthurHoaro2020-09-122-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | This new setting under 'general.root_url' allows to override automatic discovery of Shaarli instance's URL. Fixes #1339
* | | | Merge pull request #1553 from ArthurHoaro/fix/404-pageArthurHoaro2020-09-123-4/+38
|\ \ \ \ | | | | | | | | | | Properly handle 404 errors
| * | | | Properly handle 404 errorsArthurHoaro2020-09-123-4/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use 404 template instead of default Slim error page if the route is not found. Fixes #827
* | | | | Merge pull request #1551 from ArthurHoaro/fix/plugin-save-metadataArthurHoaro2020-09-122-14/+16
|\ \ \ \ \ | |_|/ / / |/| | | | Plugins: do not save metadata along plugin parameters
| * | | | Plugins: do not save metadata along plugin parametersArthurHoaro2020-09-122-14/+16
| |/ / / | | | | | | | | | | | | | | | | | | | | Also prevent the token to be saved. Fixes #1550
* | | | Merge pull request #1552 from ArthurHoaro/feature/better-initializerArthurHoaro2020-09-121-11/+63
|\ \ \ \ | |/ / / |/| | |
| * | | Improve default bookmarks after installArthurHoaro2020-09-101-11/+63
| | |/ | |/| | | | | | | | | | | | | | | | Used @nodiscc suggestion in #1148 (slightly edited). It provides a description of what Shaarli does, Markdown rendering demo, and a thumbnail link. Fixes #1148
* | | Merge pull request #1547 from ArthurHoaro/fix/daily-visibilityArthurHoaro2020-09-062-7/+14
|\ \ \ | | | | | | | | Fix visibility issue on daily page
| * | | Fix visibility issue on daily pageArthurHoaro2020-09-062-7/+14
| |/ / | | | | | | | | | | | | | | | This filter (links by day) didn't apply any visibility parameter. Fixes #1543
* | | Merge pull request #1538 from ArthurHoaro/feature/plugins-bookmark-serviceArthurHoaro2020-09-063-14/+18
|\ \ \ | | | | | | | | Inject BookmarkServiceInterface in plugins data
| * | | Inject BookmarkServiceInterface in plugins dataArthurHoaro2020-09-033-14/+18
| | | | | | | | | | | | | | | | Related discussion: ilesinge/shaarli-related#7
* | | | Merge pull request #1541 from ArthurHoaro/fix/legacy-login-encodingArthurHoaro2020-09-031-1/+11
|\ \ \ \
| * | | | Fix: encoding in legacy route login redirection to post bookmarkArthurHoaro2020-09-031-1/+11
| | |/ / | |/| | | | | | | | | | | | | | When a bookmark is post from a logged out user, he is first redirected to the login page with 'returnurl' containing the link, then redirected again when the login is processed. We need to reencode the posted URL, otherwise the browser does not handle the fragment as a part of the posted parameter.
* | | | Merge pull request #1537 from ArthurHoaro/fix/back-compatible-targetsArthurHoaro2020-09-032-131/+7
|\ \ \ \ | |/ / / |/| | |
| * | | Improve backward compatibility for LegacyRouterArthurHoaro2020-09-032-131/+7
| |/ / | | | | | | | | | | | | | | | | | | LegacyRouter is no longer used for routing, only in existing plugins to match the _PAGE_ parameter. So we change a few of its values there, to match the new ones defined in TemplatePage. @see discussion in shaarli/Shaarli#1537
* | | Merge pull request #1520 from ArthurHoaro/fix/jp-languageArthurHoaro2020-09-031-1/+2
|\ \ \
| * | | Japanese translation: add language to admin configuration pageArthurHoaro2020-08-271-1/+2
| | |/ | |/| | | | | | | Also use ISO country code (JP) instead of JA.
* | | Merge pull request #1526 from kcaran/links_per_pageArthurHoaro2020-09-031-0/+2
|\ \ \