aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
Commit message (Collapse)AuthorAgeFilesLines
* Introduce the Updater class whichArthurHoaro2016-02-151-10/+23
| | | | | | | * contains methods designed to be run once. * is able to upgrade the datastore or the configuration. * is based on methods names, stored in a text file with ';' separator (updates.txt). * begins with existing function 'mergeDeprecatedConfigFile()' (options.php).
* Bump version to v0.6.3ArthurHoaro2016-01-311-2/+2
|
* Fixes #378 - Plugin administration UI.ArthurHoaro2016-01-311-0/+48
|
* Create 404 templateDimtion2016-01-201-5/+14
| | | | Solve #430 for links
* Logging: move logm() from index.php to application/Utils.phpVirtualTam2016-01-161-13/+5
| | | | | | | | | | | Relates to #436 Modifications: - inject dependencies to global variables ($_SERVER, $GLOBALS) - apply coding conventions - add test coverage Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Fixes #410 - Retrieve title fails in multiple casesArthurHoaro2016-01-111-50/+37
| | | | | | | | | * `get_http_url()` renamed to `get_http_response()`. * Use the same HTTP context to retrieve response headers and content. * Follow HTTP 301 and 302 redirections to retrieve the title (default max 3 redirections). * Add `LinkUtils` to extract titles and charset. * Try to retrieve charset from HTTP headers first (new), then HTML content. * Use mb_string to re-encode title if necessary.
* Merge pull request #424 from ArthurHoaro/searchArthur2016-01-061-93/+117
|\ | | | | Link filter refactoring
| * Fixes #426 - Do not filter with blank tags.ArthurHoaro2016-01-061-4/+6
| |
| * Link filter refactoringArthurHoaro2016-01-061-89/+111
| | | | | | | | | | | | | | | | | | | | * introduce class LinkFilter to handle link filter operation (and lighten LinkDB). * handle 'private only' in filtering. * update template to prefill search fields with current search terms. * coding style. * unit test (mostly move from LinkDB to LinkFilter). PS: preparation for #358 #315 and 'AND' search.
* | Fixes #428: validate buttons presence instead of valueArthurHoaro2016-01-031-9/+9
|/ | | | | Also adds a validation where renaming with 'fromtag' specified and empty 'totag'. It was causing a 404, now it just re-render the form.
* Bump version to v0.6.2v0.6.2VirtualTam2015-12-231-2/+2
| | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Merge pull request #407 from ArthurHoaro/daily-routerVirtualTam2015-12-081-6/+14
|\ | | | | Fixes #402: build the daily page through renderPage()
| * Fixes #403: build the daily page through renderPage()ArthurHoaro2015-12-081-6/+14
| | | | | | | | | | * new entry in the Router for daily page. * add an always displayed button in demo_plugin
* | Reset permissions on index.php (changed in ↵ArthurHoaro2015-12-081-0/+0
| | | | | | | | 18cca483b0b51f190bd875fc4273a0fff3fedebd ).
* | Temporary fix for head titlesArthurHoaro2015-12-071-1/+4
|/ | | | only set the title on permalink.
* Fixes #399 - show single link title as page titleArthurHoaro2015-12-051-0/+1
|
* fix: assign template variables to empty values so they can be evaluatedVirtualTam2015-12-031-0/+2
| | | | | | Regression introduced in #394 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Bump version to v0.6.1v0.6.1VirtualTam2015-12-011-2/+2
| | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* application: default to the "stable" branch for update checksVirtualTam2015-11-271-13/+19
| | | | | | | Relates to #372 Relates to #390 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* application: refactor version checks, move to ApplicationUtilsVirtualTam2015-11-261-27/+12
| | | | | | | | | | | | | | | Relates to #372 Modifications: - move checkUpdate() to ApplicationUtils - reduce file I/O operations during version checks - apply coding conventions - add test coverage Tools: - create a sandbox directory for tests Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Merge pull request #355 from ArthurHoaro/redirector-urlVirtualTam2015-11-261-27/+21
|\ | | | | URL encode links when a redirector is set
| * URL encode links when a redirector is set.ArthurHoaro2015-11-261-27/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #328 - URL encode links when a redirector is set * WARNING - template edit - new variable available : "real_url" Contains the final real url (redirected or any other change on original URL) * Don't redirect shaares link in RSS/Atom. * Affects links shaared in description. * Move text2clickable and keepMultipleSpaces to Utils.php + unit test UPDATE: * keepMultipleSpaces renamed to space2nbsp * space2nbsp improved to handle single space at line beginning * links in text description aren't 'nofollow' anymore
* | Fixes incorrect call toArthurHoaro2015-11-261-1/+1
|/ | | | From 2e28269baed195d58bbe169841eed176b171db76
* cleanup: remove json_encode() (built-in since PHP 5.2)Nicolas Danelon2015-11-251-39/+0
| | | | | | See http://php.net/manual/en/function.json-encode.php Legacy since php 5.2.x . If php5.3 is required for the install script
* application: move checkPHPVersion from Utils to ApplicationUtilsVirtualTam2015-11-241-1/+1
| | | | | | Relates to #372 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* install: check file/directory permissions for Shaarli resourcesVirtualTam2015-11-241-9/+27
| | | | | | | | | | | | | | | | | | | | | | | Relates to #40 Relates to #372 Additions: - FileUtils: IOException - ApplicationUtils: - check if Shaarli resources are accessible with sufficient permissions - basic test coverage - index.php: - check access permissions and redirect to an error page if needed: - before running the first installation Modifications: - LinkDB: - factorize datastore write code - check if the datastore (exists AND is writeable) OR (doesn't exist AND its parent dir is writable) - raise an IOException if needed Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Merge pull request #384 from roidelapluie/masterVirtualTam2015-11-231-10/+10
|\ | | | | fill session info when shaarli is in open mode
| * Fix authentification when Shaarli is in Open Mode.Julien Pivotto2015-11-231-10/+10
| |
* | Merge pull request #387 from ArthurHoaro/bookmarklet-quoteVirtualTam2015-11-221-4/+4
|\ \ | | | | | | Fixes #382: Bookmarklet can not retrieve title when there is a quotation mark in it
| * | Fixes #382: Bookmarklet can not retrieve title when there is a quotation ↵ArthurHoaro2015-11-221-4/+4
| |/ | | | | | | | | | | mark in it bookmarklet fields weren't correctly escaped
* | Merge pull request #376 from ArthurHoaro/opensearchVirtualTam2015-11-221-0/+8
|\ \ | | | | | | Fixes #176 - Add opensearch functionality
| * | Fixes #176 - Add opensearch functionalityArthurHoaro2015-11-171-0/+8
| | | | | | | | | | | | | | | * add a new page in Router: do=opensearch which displays the opensearch plugin * using base64 compressed image to avoid issue encountered with HTTPS
* | | Bugfix: do not store plugin errors in data.phpArthurHoaro2015-11-221-2/+2
| |/ |/| | | | | | | | | Before this, calling writeConfig() would have write error messages in data.php, because it uses 'plugins' array which is used for plugin configuration. Causing the message error appear everytime.
* | Bump version to v0.6.0v0.6.0ArthurHoaro2015-11-181-2/+2
|/ | | | Signed-off-by: ArthurHoaro <arthur@hoa.ro>
* cleanup: remove the executable bit from source scriptsVirtualTam2015-11-111-0/+0
| | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* index.php: group globals by theme, format commentsVirtualTam2015-11-111-33/+99
| | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Merge pull request #275 from shaarli/plugin-propositionArthur2015-11-081-85/+193
|\ | | | | Plugin proposition
| * Handle errors raised by plugins in template. fixes #370ArthurHoaro2015-11-081-19/+33
| |
| * Plugin system - COREArthurHoaro2015-11-071-68/+162
| | | | | | | | see shaarli/Shaarli#275
* | Fixes #356ArthurHoaro2015-11-041-3/+7
|/ | | | | * adding a link should return added link's hash * allow redirection relative urls in generateLocation
* Bump version to 0.5.4v0.5.4VirtualTam2015-09-141-2/+2
| | | | | | | | | | | | | | | | Fixes: - PHP session IDs: handle hash algorithms and bits per char representations Minor changes: - HTTPS: support being served behing an SSL-enabled proxy - HTTP/Server utilities: refactor & add test coverage Project & documentation: - improve/rewrite `README.md` - update contributor list - update `index.php` header Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Update project information: contributors, `index.php` headerVirtualTam2015-09-141-6/+16
| | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* HTTP: move server URL functions to `HttpUtils.php`VirtualTam2015-09-141-53/+25
| | | | | | | | | | | | | Relates to #333 Modifications: - refactor server URL utility functions - do not access global `$_SERVER` variables - add test coverage - improve readability - apply coding conventions Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* SSL detection: add support for `X-Forwarded-Proto`Fanch2015-09-131-1/+1
| | | | | | | | | | | | Duplicates #332 See: - RFC 7239 - Forwarded HTTP Extension http://www.ietf.org/rfc/rfc7239.txt - RFC 6238 - Deprecating the "X-" Prefix and Similar Constructs in Application Protocols http://www.ietf.org/rfc/rfc6648.txt - StackOverflow - Custom HTTP headers: naming conventions http://stackoverflow.com/a/3561399
* Url: introduce global helper functions for cleanup and scheme detectionGuillaume Virlet2015-09-081-5/+4
| | | | | | | | | | | | Relates to #314 & #326 Additions: - add global `cleanup_url()` and `get_url_scheme()` functions Modifications: - replace `Url` usage in `index.php` by calls to global functions - fix `Url` tests not being run: PHPUnit expects a single test class per file - move classes to separate files
* HTTP: move utils to a proper file, add testsVirtualTam2015-09-061-78/+32
| | | | | | | | | | | | | | Relates to #333 Modifications: - move HTTP utils to 'application/HttpUtils.php' - simplify logic - replace 'http_parse_headers_shaarli' by built-in 'get_headers()' - remove superfluous '$status' parameter (provided by the HTTP headers) - apply coding conventions - add test coverage (unitary only) Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Session ID: extend the regex to match possible hash representationsVirtualTam2015-09-061-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Improves #306 Relates to #335 & #336 Duplicated by #339 Issues: - PHP regenerates the session ID if it is not compliant - the regex checking the session ID does not cover all cases - different algorithms: md5, sha1, sha256, etc. - bit representations: 4, 5, 6 Fix: - `index.php`: - remove `uniqid()` usage - call `session_regenerate_id()` if an invalid cookie is detected - regex: support all possible characters - '[a-zA-Z,-]{2,128}' - tests: add coverage for all algorithms & bit representations See: - http://php.net/manual/en/session.configuration.php#ini.session.hash-function - https://secure.php.net/manual/en/session.configuration.php#ini.session.hash-bits-per-character - http://php.net/manual/en/function.session-id.php - http://php.net/manual/en/function.session-regenerate-id.php - http://php.net/manual/en/function.hash-algos.php Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Bump version to v0.5.3v0.5.3ArthurHoaro2015-09-021-2/+2
| | | | Fixes a bug that could prevent user to login.
* Bump version to 0.5.2v0.5.2VirtualTam2015-08-311-2/+2
| | | | | | | | | | Minor changes - fix Full Path Disclosure upon cookie forgery - fix regression preventing to load LinkDB info when adding an existing link - also extract HTTPS page metadata (title) - add PHP 7 to Travis platforms Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Merge pull request #326 from ArthurHoaro/bug-urlVirtualTam2015-08-311-38/+44
|\ | | | | Fixes #325 - Shaarli does not recognize saved links