aboutsummaryrefslogtreecommitdiffhomepage
path: root/application
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1629 from ArthurHoaro/fix/demo-vimeoArthurHoaro2020-11-081-2/+2
|\ | | | | Replace vimeo link in demo bookmarks due to IP ban on the demo instance
| * Replace vimeo link in demo bookmarks due to IP ban on the demo instanceArthurHoaro2020-11-081-2/+2
| | | | | | | | Fixes #1148
* | Fix an issue truncating extracted metadata contentArthurHoaro2020-11-081-4/+4
|/ | | | Previous regex forced the selection to stop at either the first single or double quote found, regardless of the opening quote. Using '\1', we're sure to wait for the proper quote before stopping the capture.
* Display error details even with dev.debug set to falseArthurHoaro2020-11-051-3/+8
| | | | | | | It makes more sense to display the error even if it's unexpected. Only for logged in users. Fixes #1606
* Merge pull request #1620 from ArthurHoaro/feature/no-auto-linkArthurHoaro2020-11-052-4/+14
|\ | | | | Default formatter: add a setting to disable auto-linkification
| * Default formatter: add a setting to disable auto-linkificationArthurHoaro2020-11-032-4/+14
| | | | | | | | | | | | | | + update documentation + single parameter for both URL and hashtags Fixes #1094
* | Fix: redirect to referrer after bookmark deletionArthurHoaro2020-11-051-2/+2
|/ | | | | | Except if the referer points to a permalink (which has been deleted). Fixes #1622
* Merge pull request #1616 from dimtion/fix-api-redirectArthurHoaro2020-10-291-1/+1
|\ | | | | API postLink: change relative path to absolute path
| * postLink: change relative path to absolute pathLoïc Carr2020-10-281-1/+1
| |
* | Merge pull request #1615 from ArthurHoaro/hotfix/save-redirectArthurHoaro2020-10-281-1/+1
|\ \ | | | | | | Remove unnecessary escape of referer
| * | Remove unnecessary escape of refererArthurHoaro2020-10-281-1/+1
| | | | | | | | | | | | Fixes #1611
* | | Fix compatiliby issue on login with PHP 7.1ArthurHoaro2020-10-282-3/+6
|/ / | | | | | | session_set_cookie_params does not return any value in PHP 7.1
* | Raise 404 error instead of 500 if permalink access is deniedArthurHoaro2020-10-281-1/+1
| |
* | Bulk creation: ignore blank linesArthurHoaro2020-10-271-0/+3
| |
* | Bulk creation: improve performances using memoizationArthurHoaro2020-10-271-9/+43
| | | | | | | | Reduced additional processing time per links from ~40ms to ~5ms
* | Bulk creation: fix private status based on the first formArthurHoaro2020-10-271-1/+5
| |
* | Feature: bulk creation of bookmarksArthurHoaro2020-10-275-386/+459
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Fix rebase issueArthurHoaro2020-10-272-3/+3
| |
* | Feature: add weekly and monthly view/RSS feed for daily pageArthurHoaro2020-10-275-73/+338
| | | | | | | | | | | | | | | | | | - 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
* | Move utils classes to Shaarli\Helper namespace and folderArthurHoaro2020-10-278-7/+8
| |
* | Feature: Share private bookmarks using a URL containing a private keyArthurHoaro2020-10-274-5/+37
| | | | | | | | | | | | | | | | | | | | - 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
* | Merge pull request #1604 from ArthurHoaro/feature/server-admin-pageArthurHoaro2020-10-275-25/+251
|\ \ | | | | | | Feature: add a Server administration page
| * | Feature: add a Server administration pageArthurHoaro2020-10-215-25/+251
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Removed PHP_EOLGanesh Kandu2020-10-271-3/+3
| | | | | | | | | just replace "*/ ?>" and "<?php /*" with '' and "Trim" output whatever is EOF will trimmed out.
* | | Replaced PHP_EOL to "\n"Ganesh Kandu2020-10-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge pull request #1601 from ArthurHoaro/feature/psr3ArthurHoaro2020-10-247-76/+87
|\ \ \
| * | | Use PSR-3 logger for login attemptsArthurHoaro2020-10-207-76/+87
| |/ / | | | | | | | | | Fixes #1122
* / / Dislay an error if an exception occurs in the error handlerArthurHoaro2020-10-202-4/+10
|/ / | | | | | | Related to #1598
* | 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
| | | | | |