aboutsummaryrefslogtreecommitdiffhomepage
path: root/application
Commit message (Collapse)AuthorAgeFilesLines
* Set updated date for items in feedsArthurHoaro2016-11-051-6/+32
| | | | | RSS doesn't support updated date for items, so we use the ATOM extension. Updated dates also bump the global update
* Save the update date in LinkDB and pass it to linklist templatesArthurHoaro2016-11-051-1/+2
| | | | It can be used as a timestamp by templates under the key 'updated_timestamp'.
* Add trusted IPs in config and try to ban forwarded IP on failed loginArthurHoaro2016-11-051-0/+26
| | | | | | | | * Add a new settings (which needs to be manually set): `security.trusted_proxies` * On login failure, if the `REMOTE_ADDR` is in the trusted proxies, try to retrieve the forwarded IP in headers. * If found, the client address is added in ipbans, else we do nothing. Fixes #409
* Parse plugin parameters description with the PluginManagerArthurHoaro2016-11-052-4/+12
| | | | | | Plugin parameter can contain a description in their meta file under the key: parameter.<param_name>="<description>"
* Fix: add missing final newlines, untabify textVirtualTam2016-11-052-2/+2
| | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Fix: ensure Internet Explorer bookmark dumps can be importedVirtualTam2016-11-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | Relates to https://github.com/shaarli/Shaarli/issues/607 Modifications: - [application][tests] NetscapeBookmarkUtils: more permissive doctype detection The IE bookmark exports contain extra escape sequences, which can be observed by binary comparison of the reference input data used in tests: $ cmp -b -l -n 8 netscape_basic.htm internet_explorer_encoding.htm 1 74 < 357 M-o 2 41 ! 273 M-; 3 104 D 277 M-? 4 117 O 74 < 5 103 C 41 ! 6 124 T 104 D 7 131 Y 117 O 8 120 P 103 C Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Refactor bookmark import using a generic Netscape parserVirtualTam2016-11-051-0/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | Relates to #607 Relates to #608 Relates to #493 (abandoned) Additions: - use Composer's autoload to load 3rd-party dependencies under vendor/ Modifications: - [import] replace the current parser with a generic, stable parser - move code to application/NetscapeBookmarkUtils - improve status report after parsing - [router] use the same endpoint for both bookmark upload and import dialog - [template] update bookmark import options - allow adding tags to all imported links - allow selecting the visibility (privacy) of imported links - [tests] ensure bookmarks are properly parsed and imported in the LinkDB - reuse reference input from the parser's test data See: - https://github.com/shaarli/netscape-bookmark-parser - https://getcomposer.org/doc/01-basic-usage.md#autoloading Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Set cURL as default in HTTP fetching, a fallback method and consistency ↵julienCXX2016-11-051-10/+150
| | | | fixup between both methods
* Initialize a translation functionArthurHoaro2016-08-071-0/+21
| | | | It matches the API of ngettext().
* Generate a token for every pagesArthurHoaro2016-08-061-0/+1
|
* Merge pull request #621 from ArthurHoaro/hotfix/update-escape-configVirtualTam2016-08-021-2/+2
|\ | | | | Fix update method escapeUnescapedConfig
| * Fix update method escapeUnescapedConfigArthurHoaro2016-08-021-2/+2
| | | | | | | | | | | | | | * Actually run it * unit tests Fixes #611
* | Better whitespace handling in tagsArthurHoaro2016-08-021-1/+1
| | | | | | | | | | | | Correct PR #573 to work properly with hidden tags, and add ReferenceLinkDB UT. Fixes #571 - Closes #573
* | Better whitespace handling in tags. Fixes #571Chris Kuethe2016-08-021-2/+2
|/
* Fixes #600 - Shaarli's title is not set with the new config managerArthurHoaro2016-07-191-8/+2
| | | | | - Fixed title config key - Page title (in head tag) is no longer set through the config manager
* Merge pull request #558 from ArthurHoaro/hashtag4Arthur2016-07-094-56/+107
|\ | | | | Hashtag system
| * Hashtag systemArthurHoaro2016-06-064-57/+108
| | | | | | | | | | | | * Hashtag are auto-linked with a filter search * Supports unicode * Compatible with markdown (excluded in code blocks)
* | Merge pull request #570 from ArthurHoaro/config-managerArthur2016-07-0912-311/+905
|\ \ | |/ |/| Introduce a configuration manager
| * Add closing PHP tags to JSON config filesArthurHoaro2016-06-201-1/+14
| |
| * Pass the configuration manager to templatesArthurHoaro2016-06-151-0/+2
| |
| * Rename configuration key for better sectionsArthurHoaro2016-06-115-73/+77
| |
| * PluginManager no longer uses singleton patternArthurHoaro2016-06-111-36/+14
| |
| * ConfigManager no longer uses singleton patternArthurHoaro2016-06-114-95/+101
| |
| * Remove remaining settings initialization in index.phpArthurHoaro2016-06-112-51/+36
| | | | | | | | Except for those which require external data (timezone and $_SERVER).
| * Rename configuration keys and fix GLOBALS in templatesArthurHoaro2016-06-116-76/+150
| |
| * Set the default timezone in index.phpArthurHoaro2016-06-111-3/+0
| |
| * Adds ConfigJson which handle the configuration in JSON format.ArthurHoaro2016-06-115-7/+112
| | | | | | | | Also use the Updater to make the transition
| * Replace $GLOBALS configuration with the configuration manager in the whole ↵ArthurHoaro2016-06-1110-275/+98
| | | | | | | | code base
| * Introduce a configuration manager (not plugged yet)ArthurHoaro2016-06-114-0/+607
| |
* | Merge pull request #583 from ArthurHoaro/enhance/tag-caseArthur2016-06-031-2/+9
|\ \ | | | | | | Fixes #497: ignore case difference between tags
| * | Fixes #497: ignore case difference between tagsArthurHoaro2016-05-311-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | While retrieving all tags, case differences will be ignored. This affects: * tag cloud * tag autocompletion
* | | Url.php: remove unwanted ?PHPSESSID= URL parameters,nodiscc2016-05-201-0/+1
| |/ |/| | | | | update test case
* | Merge pull request #560 from ArthurHoaro/nb-private-shaareArthur2016-05-142-0/+161
|\ \ | | | | | | Private links counter in the header
| * | Add private link counterArthurHoaro2016-05-131-0/+16
| | |
| * | Extract PageBuilder class from index.phpArthurHoaro2016-05-131-0/+145
| | |
* | | Fix startsWith and endsWith caseArthurHoaro2016-05-103-16/+28
|/ /
* | Export: allow prepending notes with the Shaarli instance's URLVirtualTam2016-05-061-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Relates to #102 Additions: - application: - export: allow prepending note permalinks with the instance's URL - test coverage Modifications: - export template: switch to an HTML form - link selection (all/private/public) - prepend note permalinks with the instance's URL Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* | typoArthurHoaro2016-05-052-3/+3
| |
* | Merge pull request #551 from ArthurHoaro/hotfix/timezoneArthur2016-05-051-4/+0
|\ \ | | | | | | Use correct 'UTC' timezone
| * | Use correct 'UTC' timezoneArthurHoaro2016-05-031-4/+0
| | |
* | | Merge pull request #532 from ArthurHoaro/hotfix/title-retrieve-the-returnArthur2016-05-033-13/+95
|\ \ \ | | | | | | | | Fixes #531 - Title retrieving is failing with multiple use case
| * | | Fixes #531 - Title retrieving is failing with multiple use caseArthurHoaro2016-05-033-13/+95
| | |/ | |/| | | | | | | see https://github.com/shaarli/Shaarli/issues/531 for details
* | | Fix error when filtering search tagsD Low2016-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Arrays are key-value maps. We should reindex the array after a filter since we are using the key and count to do array access in filterTags. An example would be searching for "foo, bar", after the array filter, our array is actually (0 -> foo, 2 -> bar) which will cause an error when trying to access $searchtags[1].
* | | Refactor Netscape bookmark exportingVirtualTam2016-04-101-0/+47
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | Relates to https://github.com/shaarli/netscape-bookmark-parser/issues/5 Fixes: - respect the Netscape bookmark format "specification" Modifications: - [application] introduce the NetscapeBookmarkUtils class - [template] export - improve formatting, rename export selection parameter - [template] export.bookmarks - template for Netscape exports - [tests] bookmark filtering, additional field generation Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* | Fixes #480: add an option to urlencode redirector URLArthurHoaro2016-04-091-6/+29
|/ | | | | | | | * New config: `$GLOBALS['config']['REDIRECTOR_URLENCODE']` (default `true`). * Parameter added to LinkDB constructor. * Fixes a bug with urlencode and escaped url. * In `index.php`, LinkDB is now instanciate once for `importFile()` and `showDaily()`. * TU
* Merge pull request #522 from ArthurHoaro/hotfix/readershaareVirtualTam2016-03-301-1/+31
|\ | | | | Refactor and rebase #380: Firefox reader view links
| * Refactor and rebase #380: Firefox reader view linksArthurHoaro2016-03-261-13/+29
| | | | | | | | | | Fixes #366 Closes #380
| * Fix issue 366, Problem when shaaring a link in Reader View of Firefox.Kevin Canévet2016-03-241-1/+15
| |
* | Merge pull request #515 from ArthurHoaro/template-feedsArthur2016-03-256-12/+377
|\ \ | |/ |/| Refactor RSS feeds generation, and do it through templates
| * Refactor filter in LinkDBArthurHoaro2016-03-254-24/+74
| | | | | | | | | | | | | | | | * search type now carried by LinkDB in order to factorize code between different search sources. * LinkDB->filter split in 3 method: filterSearch, filterHash, filterDay (we know what type of filter is needed). * filterHash now throw a LinkNotFoundException if it doesn't exist: internal implementation choice, still displays a 404. * Smallhash regex has been rewritten. * Unit tests update