aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/ApplicationUtils.php
Commit message (Collapse)AuthorAgeFilesLines
* Run Unit Tests against PHP 7.4ArthurHoaro2020-01-171-0/+3
| | | | | | | | Bump PHPUnit version and fix unit test - Globals are handled differently and are persistent through tests - Tests without assertions are marked as risky: some of them are just meant to check that no error is raised.
* namespacing: \Shaarli\ApplicationUtilsVirtualTam2019-01-121-35/+40
| | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* lint: apply phpcbf to application/VirtualTam2018-12-021-8/+9
| | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Shaarli's translationArthurHoaro2017-10-221-9/+10
| | | | | | | | | * translation system and unit tests * Translations everywhere Dont use translation merge It is not available with PHP builtin gettext, so it would have lead to inconsistency.
* Merge pull request #979 from ArthurHoaro/feature/assets-cache-versionVirtualTam2017-10-061-0/+15
|\ | | | | Add a version hash for asset loading to prevent browser's cache issue
| * Add a version hash for asset loading to prevent browser's cache issueArthurHoaro2017-10-011-0/+15
| | | | | | | | | | | | The hash is generated using the same salt as the one used for credentials (1 salt per instance) in order to avoid exposing the instance version. Fixes #965
* | Robustness: safer RainTPL directory handlingVirtualTam2017-09-281-2/+3
|/ | | | | | | | Relates to https://github.com/shaarli/Shaarli/issues/845 Relates to https://github.com/shaarli/Shaarli/issues/846 Relates to https://github.com/shaarli/Shaarli/pull/909 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Set Shaarli's version only in shaarli_version.php fileArthurHoaro2017-03-211-2/+30
|
* Use 'dev' version on the master branchArthurHoaro2017-03-121-8/+5
| | | | Allowed check branches are now `latest` and `stable`.
* Updater: keep custom theme preference with the new theme settingArthurHoaro2017-01-051-20/+0
|
* Minor improvements regarding #705 (coding style, unit tests, etc.)ArthurHoaro2017-01-051-0/+20
|
* Change templates set through administration UIKnah Tsaeb2017-01-051-0/+1
|
* Minor code cleanup: PHPDoc, spelling, unused variables, etc.ArthurHoaro2016-10-201-2/+6
|
* Rename configuration key for better sectionsArthurHoaro2016-06-111-9/+9
|
* ConfigManager no longer uses singleton patternArthurHoaro2016-06-111-3/+4
|
* Rename configuration keys and fix GLOBALS in templatesArthurHoaro2016-06-111-10/+9
|
* Replace $GLOBALS configuration with the configuration manager in the whole ↵ArthurHoaro2016-06-111-13/+13
| | | | code base
* Fixes #410 - Retrieve title fails in multiple casesArthurHoaro2016-01-111-1/+1
| | | | | | | | | * `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.
* 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>
* application: default to the "stable" branch for update checksVirtualTam2015-11-271-4/+14
| | | | | | | Relates to #372 Relates to #390 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* application: refactor version checks, move to ApplicationUtilsVirtualTam2015-11-261-0/+92
| | | | | | | | | | | | | | | 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>
* application: move checkPHPVersion from Utils to ApplicationUtilsVirtualTam2015-11-241-0/+20
| | | | | | Relates to #372 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* install: check file/directory permissions for Shaarli resourcesVirtualTam2015-11-241-0/+69
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>