diff options
-rw-r--r-- | application/Thumbnailer.php | 17 | ||||
-rw-r--r-- | composer.json | 2 | ||||
-rw-r--r-- | composer.lock | 130 | ||||
-rw-r--r-- | doc/md/Server-configuration.md | 2 | ||||
-rw-r--r-- | inc/languages/fr/LC_MESSAGES/shaarli.po | 56 | ||||
-rw-r--r-- | inc/web-thumbnailer.json | 1 | ||||
-rw-r--r-- | index.php | 4 | ||||
-rw-r--r-- | tpl/default/configure.html | 10 |
8 files changed, 133 insertions, 89 deletions
diff --git a/application/Thumbnailer.php b/application/Thumbnailer.php index 9cf5dacd..d2284e79 100644 --- a/application/Thumbnailer.php +++ b/application/Thumbnailer.php | |||
@@ -32,6 +32,14 @@ class Thumbnailer | |||
32 | public function __construct($conf) | 32 | public function __construct($conf) |
33 | { | 33 | { |
34 | $this->conf = $conf; | 34 | $this->conf = $conf; |
35 | |||
36 | if (! $this->checkRequirements()) { | ||
37 | $this->conf->set('thumbnails.enabled', false); | ||
38 | $this->conf->write(true); | ||
39 | // TODO: create a proper error handling system able to catch exceptions... | ||
40 | die(t('php-gd extension must be loaded to use thumbnails. Thumbnails are now disabled. Please reload the page.')); | ||
41 | } | ||
42 | |||
35 | $this->wt = new WebThumbnailer(); | 43 | $this->wt = new WebThumbnailer(); |
36 | WTConfigManager::addFile('inc/web-thumbnailer.json'); | 44 | WTConfigManager::addFile('inc/web-thumbnailer.json'); |
37 | $this->wt->maxWidth($this->conf->get('thumbnails.width')) | 45 | $this->wt->maxWidth($this->conf->get('thumbnails.width')) |
@@ -57,4 +65,13 @@ class Thumbnailer | |||
57 | return false; | 65 | return false; |
58 | } | 66 | } |
59 | } | 67 | } |
68 | |||
69 | /** | ||
70 | * Make sure that requirements are match to use thumbnails: | ||
71 | * - php-gd is loaded | ||
72 | */ | ||
73 | protected function checkRequirements() | ||
74 | { | ||
75 | return extension_loaded('gd'); | ||
76 | } | ||
60 | } | 77 | } |
diff --git a/composer.json b/composer.json index bdf52fcc..99ef0b5e 100644 --- a/composer.json +++ b/composer.json | |||
@@ -19,7 +19,7 @@ | |||
19 | "shaarli/netscape-bookmark-parser": "^2.0", | 19 | "shaarli/netscape-bookmark-parser": "^2.0", |
20 | "erusev/parsedown": "^1.6", | 20 | "erusev/parsedown": "^1.6", |
21 | "slim/slim": "^3.0", | 21 | "slim/slim": "^3.0", |
22 | "arthurhoaro/web-thumbnailer": "^1.0", | 22 | "arthurhoaro/web-thumbnailer": "^1.1", |
23 | "pubsubhubbub/publisher": "dev-master", | 23 | "pubsubhubbub/publisher": "dev-master", |
24 | "gettext/gettext": "^4.4" | 24 | "gettext/gettext": "^4.4" |
25 | }, | 25 | }, |
diff --git a/composer.lock b/composer.lock index 3f9ef7e2..f97a688c 100644 --- a/composer.lock +++ b/composer.lock | |||
@@ -1,30 +1,35 @@ | |||
1 | { | 1 | { |
2 | "_readme": [ | 2 | "_readme": [ |
3 | "This file locks the dependencies of your project to a known state", | 3 | "This file locks the dependencies of your project to a known state", |
4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", | 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", |
5 | "This file is @generated automatically" | 5 | "This file is @generated automatically" |
6 | ], | 6 | ], |
7 | "content-hash": "efa8b74ec9a15bb8c18e4a36fd13d480", | 7 | "content-hash": "da7a0c081b61d949154c5d2e5370cbab", |
8 | "packages": [ | 8 | "packages": [ |
9 | { | 9 | { |
10 | "name": "arthurhoaro/web-thumbnailer", | 10 | "name": "arthurhoaro/web-thumbnailer", |
11 | "version": "v1.0.1", | 11 | "version": "v1.1.2", |
12 | "source": { | 12 | "source": { |
13 | "type": "git", | 13 | "type": "git", |
14 | "url": "https://github.com/ArthurHoaro/web-thumbnailer.git", | 14 | "url": "https://github.com/ArthurHoaro/web-thumbnailer.git", |
15 | "reference": "10e2919c2aa0bf55f4593c8b05508a98c79d6706" | 15 | "reference": "21cf6493014cb0949a7485bfc170763d964aefd4" |
16 | }, | 16 | }, |
17 | "dist": { | 17 | "dist": { |
18 | "type": "zip", | 18 | "type": "zip", |
19 | "url": "https://api.github.com/repos/ArthurHoaro/web-thumbnailer/zipball/10e2919c2aa0bf55f4593c8b05508a98c79d6706", | 19 | "url": "https://api.github.com/repos/ArthurHoaro/web-thumbnailer/zipball/21cf6493014cb0949a7485bfc170763d964aefd4", |
20 | "reference": "10e2919c2aa0bf55f4593c8b05508a98c79d6706", | 20 | "reference": "21cf6493014cb0949a7485bfc170763d964aefd4", |
21 | "shasum": "" | 21 | "shasum": "" |
22 | }, | 22 | }, |
23 | "require": { | 23 | "require": { |
24 | "php": ">=5.6" | 24 | "php": ">=5.6" |
25 | }, | 25 | }, |
26 | "conflict": { | ||
27 | "phpunit/php-timer": ">=2" | ||
28 | }, | ||
26 | "require-dev": { | 29 | "require-dev": { |
27 | "phpunit/phpunit": "5.2.*" | 30 | "php-coveralls/php-coveralls": "^2.0", |
31 | "phpunit/phpunit": "5.2.*", | ||
32 | "squizlabs/php_codesniffer": "^3.2" | ||
28 | }, | 33 | }, |
29 | "type": "library", | 34 | "type": "library", |
30 | "autoload": { | 35 | "autoload": { |
@@ -45,7 +50,8 @@ | |||
45 | "homepage": "http://hoa.ro" | 50 | "homepage": "http://hoa.ro" |
46 | } | 51 | } |
47 | ], | 52 | ], |
48 | "time": "2017-11-11T15:39:49+00:00" | 53 | "description": "PHP library which will retrieve a thumbnail for any given URL", |
54 | "time": "2018-05-05T10:32:59+00:00" | ||
49 | }, | 55 | }, |
50 | { | 56 | { |
51 | "name": "container-interop/container-interop", | 57 | "name": "container-interop/container-interop", |
@@ -126,16 +132,16 @@ | |||
126 | }, | 132 | }, |
127 | { | 133 | { |
128 | "name": "gettext/gettext", | 134 | "name": "gettext/gettext", |
129 | "version": "v4.4.4", | 135 | "version": "v4.5.0", |
130 | "source": { | 136 | "source": { |
131 | "type": "git", | 137 | "type": "git", |
132 | "url": "https://github.com/oscarotero/Gettext.git", | 138 | "url": "https://github.com/oscarotero/Gettext.git", |
133 | "reference": "ab5e863de2f60806d02e6e6081e21efd45249168" | 139 | "reference": "81c05cb213e8e4828db7aabd9dd363367ebca9f2" |
134 | }, | 140 | }, |
135 | "dist": { | 141 | "dist": { |
136 | "type": "zip", | 142 | "type": "zip", |
137 | "url": "https://api.github.com/repos/oscarotero/Gettext/zipball/ab5e863de2f60806d02e6e6081e21efd45249168", | 143 | "url": "https://api.github.com/repos/oscarotero/Gettext/zipball/81c05cb213e8e4828db7aabd9dd363367ebca9f2", |
138 | "reference": "ab5e863de2f60806d02e6e6081e21efd45249168", | 144 | "reference": "81c05cb213e8e4828db7aabd9dd363367ebca9f2", |
139 | "shasum": "" | 145 | "shasum": "" |
140 | }, | 146 | }, |
141 | "require": { | 147 | "require": { |
@@ -184,7 +190,7 @@ | |||
184 | "po", | 190 | "po", |
185 | "translation" | 191 | "translation" |
186 | ], | 192 | ], |
187 | "time": "2018-02-21T18:49:59+00:00" | 193 | "time": "2018-04-23T17:22:10+00:00" |
188 | }, | 194 | }, |
189 | { | 195 | { |
190 | "name": "gettext/languages", | 196 | "name": "gettext/languages", |
@@ -639,16 +645,16 @@ | |||
639 | }, | 645 | }, |
640 | { | 646 | { |
641 | "name": "slim/slim", | 647 | "name": "slim/slim", |
642 | "version": "3.9.2", | 648 | "version": "3.10.0", |
643 | "source": { | 649 | "source": { |
644 | "type": "git", | 650 | "type": "git", |
645 | "url": "https://github.com/slimphp/Slim.git", | 651 | "url": "https://github.com/slimphp/Slim.git", |
646 | "reference": "4086d0106cf5a7135c69fce4161fe355a8feb118" | 652 | "reference": "d8aabeacc3688b25e2f2dd2db91df91ec6fdd748" |
647 | }, | 653 | }, |
648 | "dist": { | 654 | "dist": { |
649 | "type": "zip", | 655 | "type": "zip", |
650 | "url": "https://api.github.com/repos/slimphp/Slim/zipball/4086d0106cf5a7135c69fce4161fe355a8feb118", | 656 | "url": "https://api.github.com/repos/slimphp/Slim/zipball/d8aabeacc3688b25e2f2dd2db91df91ec6fdd748", |
651 | "reference": "4086d0106cf5a7135c69fce4161fe355a8feb118", | 657 | "reference": "d8aabeacc3688b25e2f2dd2db91df91ec6fdd748", |
652 | "shasum": "" | 658 | "shasum": "" |
653 | }, | 659 | }, |
654 | "require": { | 660 | "require": { |
@@ -706,7 +712,7 @@ | |||
706 | "micro", | 712 | "micro", |
707 | "router" | 713 | "router" |
708 | ], | 714 | ], |
709 | "time": "2017-11-26T19:13:09+00:00" | 715 | "time": "2018-04-19T19:29:08+00:00" |
710 | } | 716 | } |
711 | ], | 717 | ], |
712 | "packages-dev": [ | 718 | "packages-dev": [ |
@@ -1063,23 +1069,23 @@ | |||
1063 | }, | 1069 | }, |
1064 | { | 1070 | { |
1065 | "name": "phpspec/prophecy", | 1071 | "name": "phpspec/prophecy", |
1066 | "version": "1.7.5", | 1072 | "version": "1.7.6", |
1067 | "source": { | 1073 | "source": { |
1068 | "type": "git", | 1074 | "type": "git", |
1069 | "url": "https://github.com/phpspec/prophecy.git", | 1075 | "url": "https://github.com/phpspec/prophecy.git", |
1070 | "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401" | 1076 | "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712" |
1071 | }, | 1077 | }, |
1072 | "dist": { | 1078 | "dist": { |
1073 | "type": "zip", | 1079 | "type": "zip", |
1074 | "url": "https://api.github.com/repos/phpspec/prophecy/zipball/dfd6be44111a7c41c2e884a336cc4f461b3b2401", | 1080 | "url": "https://api.github.com/repos/phpspec/prophecy/zipball/33a7e3c4fda54e912ff6338c48823bd5c0f0b712", |
1075 | "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401", | 1081 | "reference": "33a7e3c4fda54e912ff6338c48823bd5c0f0b712", |
1076 | "shasum": "" | 1082 | "shasum": "" |
1077 | }, | 1083 | }, |
1078 | "require": { | 1084 | "require": { |
1079 | "doctrine/instantiator": "^1.0.2", | 1085 | "doctrine/instantiator": "^1.0.2", |
1080 | "php": "^5.3|^7.0", | 1086 | "php": "^5.3|^7.0", |
1081 | "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", | 1087 | "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", |
1082 | "sebastian/comparator": "^1.1|^2.0", | 1088 | "sebastian/comparator": "^1.1|^2.0|^3.0", |
1083 | "sebastian/recursion-context": "^1.0|^2.0|^3.0" | 1089 | "sebastian/recursion-context": "^1.0|^2.0|^3.0" |
1084 | }, | 1090 | }, |
1085 | "require-dev": { | 1091 | "require-dev": { |
@@ -1122,7 +1128,7 @@ | |||
1122 | "spy", | 1128 | "spy", |
1123 | "stub" | 1129 | "stub" |
1124 | ], | 1130 | ], |
1125 | "time": "2018-02-19T10:16:54+00:00" | 1131 | "time": "2018-04-18T13:57:24+00:00" |
1126 | }, | 1132 | }, |
1127 | { | 1133 | { |
1128 | "name": "phpunit/php-code-coverage", | 1134 | "name": "phpunit/php-code-coverage", |
@@ -2248,16 +2254,16 @@ | |||
2248 | }, | 2254 | }, |
2249 | { | 2255 | { |
2250 | "name": "symfony/config", | 2256 | "name": "symfony/config", |
2251 | "version": "v3.4.6", | 2257 | "version": "v3.4.9", |
2252 | "source": { | 2258 | "source": { |
2253 | "type": "git", | 2259 | "type": "git", |
2254 | "url": "https://github.com/symfony/config.git", | 2260 | "url": "https://github.com/symfony/config.git", |
2255 | "reference": "05e10567b529476a006b00746c5f538f1636810e" | 2261 | "reference": "7c2a9d44f4433863e9bca682e7f03609234657f9" |
2256 | }, | 2262 | }, |
2257 | "dist": { | 2263 | "dist": { |
2258 | "type": "zip", | 2264 | "type": "zip", |
2259 | "url": "https://api.github.com/repos/symfony/config/zipball/05e10567b529476a006b00746c5f538f1636810e", | 2265 | "url": "https://api.github.com/repos/symfony/config/zipball/7c2a9d44f4433863e9bca682e7f03609234657f9", |
2260 | "reference": "05e10567b529476a006b00746c5f538f1636810e", | 2266 | "reference": "7c2a9d44f4433863e9bca682e7f03609234657f9", |
2261 | "shasum": "" | 2267 | "shasum": "" |
2262 | }, | 2268 | }, |
2263 | "require": { | 2269 | "require": { |
@@ -2307,20 +2313,20 @@ | |||
2307 | ], | 2313 | ], |
2308 | "description": "Symfony Config Component", | 2314 | "description": "Symfony Config Component", |
2309 | "homepage": "https://symfony.com", | 2315 | "homepage": "https://symfony.com", |
2310 | "time": "2018-02-14T10:03:57+00:00" | 2316 | "time": "2018-03-19T22:32:39+00:00" |
2311 | }, | 2317 | }, |
2312 | { | 2318 | { |
2313 | "name": "symfony/console", | 2319 | "name": "symfony/console", |
2314 | "version": "v3.4.6", | 2320 | "version": "v3.4.9", |
2315 | "source": { | 2321 | "source": { |
2316 | "type": "git", | 2322 | "type": "git", |
2317 | "url": "https://github.com/symfony/console.git", | 2323 | "url": "https://github.com/symfony/console.git", |
2318 | "reference": "067339e9b8ec30d5f19f5950208893ff026b94f7" | 2324 | "reference": "5b1fdfa8eb93464bcc36c34da39cedffef822cdf" |
2319 | }, | 2325 | }, |
2320 | "dist": { | 2326 | "dist": { |
2321 | "type": "zip", | 2327 | "type": "zip", |
2322 | "url": "https://api.github.com/repos/symfony/console/zipball/067339e9b8ec30d5f19f5950208893ff026b94f7", | 2328 | "url": "https://api.github.com/repos/symfony/console/zipball/5b1fdfa8eb93464bcc36c34da39cedffef822cdf", |
2323 | "reference": "067339e9b8ec30d5f19f5950208893ff026b94f7", | 2329 | "reference": "5b1fdfa8eb93464bcc36c34da39cedffef822cdf", |
2324 | "shasum": "" | 2330 | "shasum": "" |
2325 | }, | 2331 | }, |
2326 | "require": { | 2332 | "require": { |
@@ -2341,7 +2347,7 @@ | |||
2341 | "symfony/process": "~3.3|~4.0" | 2347 | "symfony/process": "~3.3|~4.0" |
2342 | }, | 2348 | }, |
2343 | "suggest": { | 2349 | "suggest": { |
2344 | "psr/log": "For using the console logger", | 2350 | "psr/log-implementation": "For using the console logger", |
2345 | "symfony/event-dispatcher": "", | 2351 | "symfony/event-dispatcher": "", |
2346 | "symfony/lock": "", | 2352 | "symfony/lock": "", |
2347 | "symfony/process": "" | 2353 | "symfony/process": "" |
@@ -2376,20 +2382,20 @@ | |||
2376 | ], | 2382 | ], |
2377 | "description": "Symfony Console Component", | 2383 | "description": "Symfony Console Component", |
2378 | "homepage": "https://symfony.com", | 2384 | "homepage": "https://symfony.com", |
2379 | "time": "2018-02-26T15:46:28+00:00" | 2385 | "time": "2018-04-30T01:22:56+00:00" |
2380 | }, | 2386 | }, |
2381 | { | 2387 | { |
2382 | "name": "symfony/debug", | 2388 | "name": "symfony/debug", |
2383 | "version": "v3.4.6", | 2389 | "version": "v3.4.9", |
2384 | "source": { | 2390 | "source": { |
2385 | "type": "git", | 2391 | "type": "git", |
2386 | "url": "https://github.com/symfony/debug.git", | 2392 | "url": "https://github.com/symfony/debug.git", |
2387 | "reference": "9b1071f86e79e1999b3d3675d2e0e7684268b9bc" | 2393 | "reference": "1b95888cfd996484527cb41e8952d9a5eaf7454f" |
2388 | }, | 2394 | }, |
2389 | "dist": { | 2395 | "dist": { |
2390 | "type": "zip", | 2396 | "type": "zip", |
2391 | "url": "https://api.github.com/repos/symfony/debug/zipball/9b1071f86e79e1999b3d3675d2e0e7684268b9bc", | 2397 | "url": "https://api.github.com/repos/symfony/debug/zipball/1b95888cfd996484527cb41e8952d9a5eaf7454f", |
2392 | "reference": "9b1071f86e79e1999b3d3675d2e0e7684268b9bc", | 2398 | "reference": "1b95888cfd996484527cb41e8952d9a5eaf7454f", |
2393 | "shasum": "" | 2399 | "shasum": "" |
2394 | }, | 2400 | }, |
2395 | "require": { | 2401 | "require": { |
@@ -2432,20 +2438,20 @@ | |||
2432 | ], | 2438 | ], |
2433 | "description": "Symfony Debug Component", | 2439 | "description": "Symfony Debug Component", |
2434 | "homepage": "https://symfony.com", | 2440 | "homepage": "https://symfony.com", |
2435 | "time": "2018-02-28T21:49:22+00:00" | 2441 | "time": "2018-04-30T16:53:52+00:00" |
2436 | }, | 2442 | }, |
2437 | { | 2443 | { |
2438 | "name": "symfony/dependency-injection", | 2444 | "name": "symfony/dependency-injection", |
2439 | "version": "v3.4.6", | 2445 | "version": "v3.4.9", |
2440 | "source": { | 2446 | "source": { |
2441 | "type": "git", | 2447 | "type": "git", |
2442 | "url": "https://github.com/symfony/dependency-injection.git", | 2448 | "url": "https://github.com/symfony/dependency-injection.git", |
2443 | "reference": "12e901abc1cb0d637a0e5abe9923471361d96b07" | 2449 | "reference": "54ff9d78b56429f9a1ac12e60bfb6d169c0468e3" |
2444 | }, | 2450 | }, |
2445 | "dist": { | 2451 | "dist": { |
2446 | "type": "zip", | 2452 | "type": "zip", |
2447 | "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/12e901abc1cb0d637a0e5abe9923471361d96b07", | 2453 | "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/54ff9d78b56429f9a1ac12e60bfb6d169c0468e3", |
2448 | "reference": "12e901abc1cb0d637a0e5abe9923471361d96b07", | 2454 | "reference": "54ff9d78b56429f9a1ac12e60bfb6d169c0468e3", |
2449 | "shasum": "" | 2455 | "shasum": "" |
2450 | }, | 2456 | }, |
2451 | "require": { | 2457 | "require": { |
@@ -2503,11 +2509,11 @@ | |||
2503 | ], | 2509 | ], |
2504 | "description": "Symfony DependencyInjection Component", | 2510 | "description": "Symfony DependencyInjection Component", |
2505 | "homepage": "https://symfony.com", | 2511 | "homepage": "https://symfony.com", |
2506 | "time": "2018-03-04T03:54:53+00:00" | 2512 | "time": "2018-04-29T14:04:08+00:00" |
2507 | }, | 2513 | }, |
2508 | { | 2514 | { |
2509 | "name": "symfony/filesystem", | 2515 | "name": "symfony/filesystem", |
2510 | "version": "v3.4.6", | 2516 | "version": "v3.4.9", |
2511 | "source": { | 2517 | "source": { |
2512 | "type": "git", | 2518 | "type": "git", |
2513 | "url": "https://github.com/symfony/filesystem.git", | 2519 | "url": "https://github.com/symfony/filesystem.git", |
@@ -2556,16 +2562,16 @@ | |||
2556 | }, | 2562 | }, |
2557 | { | 2563 | { |
2558 | "name": "symfony/finder", | 2564 | "name": "symfony/finder", |
2559 | "version": "v3.4.6", | 2565 | "version": "v3.4.9", |
2560 | "source": { | 2566 | "source": { |
2561 | "type": "git", | 2567 | "type": "git", |
2562 | "url": "https://github.com/symfony/finder.git", | 2568 | "url": "https://github.com/symfony/finder.git", |
2563 | "reference": "a479817ce0a9e4adfd7d39c6407c95d97c254625" | 2569 | "reference": "bd14efe8b1fabc4de82bf50dce62f05f9a102433" |
2564 | }, | 2570 | }, |
2565 | "dist": { | 2571 | "dist": { |
2566 | "type": "zip", | 2572 | "type": "zip", |
2567 | "url": "https://api.github.com/repos/symfony/finder/zipball/a479817ce0a9e4adfd7d39c6407c95d97c254625", | 2573 | "url": "https://api.github.com/repos/symfony/finder/zipball/bd14efe8b1fabc4de82bf50dce62f05f9a102433", |
2568 | "reference": "a479817ce0a9e4adfd7d39c6407c95d97c254625", | 2574 | "reference": "bd14efe8b1fabc4de82bf50dce62f05f9a102433", |
2569 | "shasum": "" | 2575 | "shasum": "" |
2570 | }, | 2576 | }, |
2571 | "require": { | 2577 | "require": { |
@@ -2601,20 +2607,20 @@ | |||
2601 | ], | 2607 | ], |
2602 | "description": "Symfony Finder Component", | 2608 | "description": "Symfony Finder Component", |
2603 | "homepage": "https://symfony.com", | 2609 | "homepage": "https://symfony.com", |
2604 | "time": "2018-03-05T18:28:11+00:00" | 2610 | "time": "2018-04-04T05:07:11+00:00" |
2605 | }, | 2611 | }, |
2606 | { | 2612 | { |
2607 | "name": "symfony/polyfill-mbstring", | 2613 | "name": "symfony/polyfill-mbstring", |
2608 | "version": "v1.7.0", | 2614 | "version": "v1.8.0", |
2609 | "source": { | 2615 | "source": { |
2610 | "type": "git", | 2616 | "type": "git", |
2611 | "url": "https://github.com/symfony/polyfill-mbstring.git", | 2617 | "url": "https://github.com/symfony/polyfill-mbstring.git", |
2612 | "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b" | 2618 | "reference": "3296adf6a6454a050679cde90f95350ad604b171" |
2613 | }, | 2619 | }, |
2614 | "dist": { | 2620 | "dist": { |
2615 | "type": "zip", | 2621 | "type": "zip", |
2616 | "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b", | 2622 | "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171", |
2617 | "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b", | 2623 | "reference": "3296adf6a6454a050679cde90f95350ad604b171", |
2618 | "shasum": "" | 2624 | "shasum": "" |
2619 | }, | 2625 | }, |
2620 | "require": { | 2626 | "require": { |
@@ -2626,7 +2632,7 @@ | |||
2626 | "type": "library", | 2632 | "type": "library", |
2627 | "extra": { | 2633 | "extra": { |
2628 | "branch-alias": { | 2634 | "branch-alias": { |
2629 | "dev-master": "1.7-dev" | 2635 | "dev-master": "1.8-dev" |
2630 | } | 2636 | } |
2631 | }, | 2637 | }, |
2632 | "autoload": { | 2638 | "autoload": { |
@@ -2660,20 +2666,20 @@ | |||
2660 | "portable", | 2666 | "portable", |
2661 | "shim" | 2667 | "shim" |
2662 | ], | 2668 | ], |
2663 | "time": "2018-01-30T19:27:44+00:00" | 2669 | "time": "2018-04-26T10:06:28+00:00" |
2664 | }, | 2670 | }, |
2665 | { | 2671 | { |
2666 | "name": "symfony/yaml", | 2672 | "name": "symfony/yaml", |
2667 | "version": "v3.4.6", | 2673 | "version": "v3.4.9", |
2668 | "source": { | 2674 | "source": { |
2669 | "type": "git", | 2675 | "type": "git", |
2670 | "url": "https://github.com/symfony/yaml.git", | 2676 | "url": "https://github.com/symfony/yaml.git", |
2671 | "reference": "6af42631dcf89e9c616242c900d6c52bd53bd1bb" | 2677 | "reference": "033cfa61ef06ee0847e056e530201842b6e926c3" |
2672 | }, | 2678 | }, |
2673 | "dist": { | 2679 | "dist": { |
2674 | "type": "zip", | 2680 | "type": "zip", |
2675 | "url": "https://api.github.com/repos/symfony/yaml/zipball/6af42631dcf89e9c616242c900d6c52bd53bd1bb", | 2681 | "url": "https://api.github.com/repos/symfony/yaml/zipball/033cfa61ef06ee0847e056e530201842b6e926c3", |
2676 | "reference": "6af42631dcf89e9c616242c900d6c52bd53bd1bb", | 2682 | "reference": "033cfa61ef06ee0847e056e530201842b6e926c3", |
2677 | "shasum": "" | 2683 | "shasum": "" |
2678 | }, | 2684 | }, |
2679 | "require": { | 2685 | "require": { |
@@ -2718,7 +2724,7 @@ | |||
2718 | ], | 2724 | ], |
2719 | "description": "Symfony Yaml Component", | 2725 | "description": "Symfony Yaml Component", |
2720 | "homepage": "https://symfony.com", | 2726 | "homepage": "https://symfony.com", |
2721 | "time": "2018-02-16T09:50:28+00:00" | 2727 | "time": "2018-04-08T08:21:29+00:00" |
2722 | }, | 2728 | }, |
2723 | { | 2729 | { |
2724 | "name": "theseer/fdomdocument", | 2730 | "name": "theseer/fdomdocument", |
diff --git a/doc/md/Server-configuration.md b/doc/md/Server-configuration.md index ca82b2ec..e281dc85 100644 --- a/doc/md/Server-configuration.md +++ b/doc/md/Server-configuration.md | |||
@@ -29,7 +29,7 @@ Extension | Required? | Usage | |||
29 | ---|:---:|--- | 29 | ---|:---:|--- |
30 | [`openssl`](http://php.net/manual/en/book.openssl.php) | All | OpenSSL, HTTPS | 30 | [`openssl`](http://php.net/manual/en/book.openssl.php) | All | OpenSSL, HTTPS |
31 | [`php-mbstring`](http://php.net/manual/en/book.mbstring.php) | CentOS, Fedora, RHEL, Windows, some hosting providers | multibyte (Unicode) string support | 31 | [`php-mbstring`](http://php.net/manual/en/book.mbstring.php) | CentOS, Fedora, RHEL, Windows, some hosting providers | multibyte (Unicode) string support |
32 | [`php-gd`](http://php.net/manual/en/book.image.php) | optional | thumbnail resizing | 32 | [`php-gd`](http://php.net/manual/en/book.image.php) | optional | required to use thumbnails |
33 | [`php-intl`](http://php.net/manual/en/book.intl.php) | optional | localized text sorting (e.g. `e->è->f`) | 33 | [`php-intl`](http://php.net/manual/en/book.intl.php) | optional | localized text sorting (e.g. `e->è->f`) |
34 | [`php-curl`](http://php.net/manual/en/book.curl.php) | optional | using cURL for fetching webpages and thumbnails in a more robust way | 34 | [`php-curl`](http://php.net/manual/en/book.curl.php) | optional | using cURL for fetching webpages and thumbnails in a more robust way |
35 | [`php-gettext`](http://php.net/manual/en/book.gettext.php) | optional | Use the translation system in gettext mode (faster) | 35 | [`php-gettext`](http://php.net/manual/en/book.gettext.php) | optional | Use the translation system in gettext mode (faster) |
diff --git a/inc/languages/fr/LC_MESSAGES/shaarli.po b/inc/languages/fr/LC_MESSAGES/shaarli.po index 15c8b2bb..f5189478 100644 --- a/inc/languages/fr/LC_MESSAGES/shaarli.po +++ b/inc/languages/fr/LC_MESSAGES/shaarli.po | |||
@@ -1,8 +1,8 @@ | |||
1 | msgid "" | 1 | msgid "" |
2 | msgstr "" | 2 | msgstr "" |
3 | "Project-Id-Version: Shaarli\n" | 3 | "Project-Id-Version: Shaarli\n" |
4 | "POT-Creation-Date: 2018-05-05 12:47+0200\n" | 4 | "POT-Creation-Date: 2018-05-05 12:48+0200\n" |
5 | "PO-Revision-Date: 2018-05-05 12:47+0200\n" | 5 | "PO-Revision-Date: 2018-05-05 12:49+0200\n" |
6 | "Last-Translator: \n" | 6 | "Last-Translator: \n" |
7 | "Language-Team: Shaarli\n" | 7 | "Language-Team: Shaarli\n" |
8 | "Language: fr_FR\n" | 8 | "Language: fr_FR\n" |
@@ -180,6 +180,14 @@ msgstr "404 Introuvable" | |||
180 | msgid "Plugin \"%s\" files not found." | 180 | msgid "Plugin \"%s\" files not found." |
181 | msgstr "Les fichiers de l'extension \"%s\" sont introuvables." | 181 | msgstr "Les fichiers de l'extension \"%s\" sont introuvables." |
182 | 182 | ||
183 | #: application/Thumbnailer.php:40 | ||
184 | msgid "" | ||
185 | "php-gd extension must be loaded to use thumbnails. Thumbnails are now " | ||
186 | "disabled. Please reload the page." | ||
187 | msgstr "" | ||
188 | "php-gd extension must be loaded to use thumbnails. Thumbnails are now " | ||
189 | "disabled. Please reload the page." | ||
190 | |||
183 | #: application/Updater.php:76 | 191 | #: application/Updater.php:76 |
184 | msgid "Couldn't retrieve Updater class methods." | 192 | msgid "Couldn't retrieve Updater class methods." |
185 | msgstr "Impossible de récupérer les méthodes de la classe Updater." | 193 | msgstr "Impossible de récupérer les méthodes de la classe Updater." |
@@ -311,7 +319,7 @@ msgid "You are not supposed to change a password on an Open Shaarli." | |||
311 | msgstr "" | 319 | msgstr "" |
312 | "Vous n'êtes pas censé modifier le mot de passe d'un Shaarli en mode ouvert." | 320 | "Vous n'êtes pas censé modifier le mot de passe d'un Shaarli en mode ouvert." |
313 | 321 | ||
314 | #: index.php:1070 index.php:1112 index.php:1189 index.php:1220 index.php:1325 | 322 | #: index.php:1070 index.php:1112 index.php:1190 index.php:1221 index.php:1326 |
315 | msgid "Wrong token." | 323 | msgid "Wrong token." |
316 | msgstr "Jeton invalide." | 324 | msgstr "Jeton invalide." |
317 | 325 | ||
@@ -333,56 +341,56 @@ msgstr "Modification du mot de passe" | |||
333 | msgid "Configuration was saved." | 341 | msgid "Configuration was saved." |
334 | msgstr "La configuration a été sauvegardé." | 342 | msgstr "La configuration a été sauvegardé." |
335 | 343 | ||
336 | #: index.php:1172 tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:24 | 344 | #: index.php:1173 tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:24 |
337 | msgid "Configure" | 345 | msgid "Configure" |
338 | msgstr "Configurer" | 346 | msgstr "Configurer" |
339 | 347 | ||
340 | #: index.php:1183 tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:13 | 348 | #: index.php:1184 tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:13 |
341 | #: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36 | 349 | #: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36 |
342 | msgid "Manage tags" | 350 | msgid "Manage tags" |
343 | msgstr "Gérer les tags" | 351 | msgstr "Gérer les tags" |
344 | 352 | ||
345 | #: index.php:1201 | 353 | #: index.php:1202 |
346 | #, php-format | 354 | #, php-format |
347 | msgid "The tag was removed from %d link." | 355 | msgid "The tag was removed from %d link." |
348 | msgid_plural "The tag was removed from %d links." | 356 | msgid_plural "The tag was removed from %d links." |
349 | msgstr[0] "Le tag a été supprimé de %d lien." | 357 | msgstr[0] "Le tag a été supprimé de %d lien." |
350 | msgstr[1] "Le tag a été supprimé de %d liens." | 358 | msgstr[1] "Le tag a été supprimé de %d liens." |
351 | 359 | ||
352 | #: index.php:1202 | 360 | #: index.php:1203 |
353 | #, php-format | 361 | #, php-format |
354 | msgid "The tag was renamed in %d link." | 362 | msgid "The tag was renamed in %d link." |
355 | msgid_plural "The tag was renamed in %d links." | 363 | msgid_plural "The tag was renamed in %d links." |
356 | msgstr[0] "Le tag a été renommé dans %d lien." | 364 | msgstr[0] "Le tag a été renommé dans %d lien." |
357 | msgstr[1] "Le tag a été renommé dans %d liens." | 365 | msgstr[1] "Le tag a été renommé dans %d liens." |
358 | 366 | ||
359 | #: index.php:1210 tmp/addlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:13 | 367 | #: index.php:1211 tmp/addlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:13 |
360 | msgid "Shaare a new link" | 368 | msgid "Shaare a new link" |
361 | msgstr "Partager un nouveau lien" | 369 | msgstr "Partager un nouveau lien" |
362 | 370 | ||
363 | #: index.php:1385 tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:169 | 371 | #: index.php:1386 tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:169 |
364 | msgid "Edit" | 372 | msgid "Edit" |
365 | msgstr "Modifier" | 373 | msgstr "Modifier" |
366 | 374 | ||
367 | #: index.php:1385 index.php:1455 | 375 | #: index.php:1386 index.php:1456 |
368 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:26 | 376 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:26 |
369 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:26 | 377 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:26 |
370 | msgid "Shaare" | 378 | msgid "Shaare" |
371 | msgstr "Shaare" | 379 | msgstr "Shaare" |
372 | 380 | ||
373 | #: index.php:1424 | 381 | #: index.php:1425 |
374 | msgid "Note: " | 382 | msgid "Note: " |
375 | msgstr "Note : " | 383 | msgstr "Note : " |
376 | 384 | ||
377 | #: index.php:1464 tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:65 | 385 | #: index.php:1465 tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:65 |
378 | msgid "Export" | 386 | msgid "Export" |
379 | msgstr "Exporter" | 387 | msgstr "Exporter" |
380 | 388 | ||
381 | #: index.php:1526 tmp/import.b91ef64efc3688266305ea9b42e5017e.rtpl.php:83 | 389 | #: index.php:1527 tmp/import.b91ef64efc3688266305ea9b42e5017e.rtpl.php:83 |
382 | msgid "Import" | 390 | msgid "Import" |
383 | msgstr "Importer" | 391 | msgstr "Importer" |
384 | 392 | ||
385 | #: index.php:1536 | 393 | #: index.php:1537 |
386 | #, php-format | 394 | #, php-format |
387 | msgid "" | 395 | msgid "" |
388 | "The file you are trying to upload is probably bigger than what this " | 396 | "The file you are trying to upload is probably bigger than what this " |
@@ -392,16 +400,16 @@ msgstr "" | |||
392 | "le serveur web peut accepter (%s). Merci de l'envoyer en parties plus " | 400 | "le serveur web peut accepter (%s). Merci de l'envoyer en parties plus " |
393 | "légères." | 401 | "légères." |
394 | 402 | ||
395 | #: index.php:1575 tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:26 | 403 | #: index.php:1576 tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:26 |
396 | #: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:22 | 404 | #: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:22 |
397 | msgid "Plugin administration" | 405 | msgid "Plugin administration" |
398 | msgstr "Administration des extensions" | 406 | msgstr "Administration des extensions" |
399 | 407 | ||
400 | #: index.php:1759 | 408 | #: index.php:1761 |
401 | msgid "Search: " | 409 | msgid "Search: " |
402 | msgstr "Recherche : " | 410 | msgstr "Recherche : " |
403 | 411 | ||
404 | #: index.php:1798 | 412 | #: index.php:1800 |
405 | #, php-format | 413 | #, php-format |
406 | msgid "" | 414 | msgid "" |
407 | "<pre>Sessions do not seem to work correctly on your server.<br>Make sure the " | 415 | "<pre>Sessions do not seem to work correctly on your server.<br>Make sure the " |
@@ -420,7 +428,7 @@ msgstr "" | |||
420 | "cookies. Nous vous recommandons d'accéder à votre serveur depuis son adresse " | 428 | "cookies. Nous vous recommandons d'accéder à votre serveur depuis son adresse " |
421 | "IP ou un <em>Fully Qualified Domain Name</em>.<br>" | 429 | "IP ou un <em>Fully Qualified Domain Name</em>.<br>" |
422 | 430 | ||
423 | #: index.php:1808 | 431 | #: index.php:1810 |
424 | msgid "Click to try again." | 432 | msgid "Click to try again." |
425 | msgstr "Cliquer ici pour réessayer." | 433 | msgstr "Cliquer ici pour réessayer." |
426 | 434 | ||
@@ -747,20 +755,26 @@ msgstr "Activer les miniatures" | |||
747 | msgid "Warning: " | 755 | msgid "Warning: " |
748 | msgstr "Attention : " | 756 | msgstr "Attention : " |
749 | 757 | ||
750 | #: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:281 | 758 | #: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:283 |
751 | msgid "It's recommended to visit the picture wall after enabling this feature." | 759 | msgid "It's recommended to visit the picture wall after enabling this feature." |
752 | msgstr "" | 760 | msgstr "" |
753 | "Il est recommandé de visiter le Mur d'images après avoir activé cette " | 761 | "Il est recommandé de visiter le Mur d'images après avoir activé cette " |
754 | "fonctionnalité." | 762 | "fonctionnalité." |
755 | 763 | ||
756 | #: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:283 | 764 | #: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:285 |
757 | msgid "" | 765 | msgid "" |
758 | "If you have a large database, the first retrieval may take a few minutes." | 766 | "If you have a large database, the first retrieval may take a few minutes." |
759 | msgstr "" | 767 | msgstr "" |
760 | "Si vous avez beaucoup de liens, la première récupération peut prendre " | 768 | "Si vous avez beaucoup de liens, la première récupération peut prendre " |
761 | "plusieurs minutes." | 769 | "plusieurs minutes." |
762 | 770 | ||
763 | #: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:297 | 771 | #: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:289 |
772 | msgid "You need to enable the extension <code>php-gd</code> to use thumbnails." | ||
773 | msgstr "" | ||
774 | "Vous devez activer l'extension <code>php-gd</code> pour utiliser les " | ||
775 | "miniatures." | ||
776 | |||
777 | #: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:305 | ||
764 | #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:72 | 778 | #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:72 |
765 | #: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:139 | 779 | #: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:139 |
766 | #: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:199 | 780 | #: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:199 |
diff --git a/inc/web-thumbnailer.json b/inc/web-thumbnailer.json index 263529fd..b8db561e 100644 --- a/inc/web-thumbnailer.json +++ b/inc/web-thumbnailer.json | |||
@@ -1,6 +1,7 @@ | |||
1 | { | 1 | { |
2 | "settings": { | 2 | "settings": { |
3 | "default": { | 3 | "default": { |
4 | "download_mode": "HOTLINK", | ||
4 | "_comment": "infinite cache", | 5 | "_comment": "infinite cache", |
5 | "cache_duration": -1, | 6 | "cache_duration": -1, |
6 | "timeout": 10 | 7 | "timeout": 10 |
@@ -1036,7 +1036,7 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager, | |||
1036 | $conf->set('api.enabled', !empty($_POST['enableApi'])); | 1036 | $conf->set('api.enabled', !empty($_POST['enableApi'])); |
1037 | $conf->set('api.secret', escape($_POST['apiSecret'])); | 1037 | $conf->set('api.secret', escape($_POST['apiSecret'])); |
1038 | $conf->set('translation.language', escape($_POST['language'])); | 1038 | $conf->set('translation.language', escape($_POST['language'])); |
1039 | $conf->set('thumbnails.enabled', !empty($_POST['enableThumbnails'])); | 1039 | $conf->set('thumbnails.enabled', extension_loaded('gd') && !empty($_POST['enableThumbnails'])); |
1040 | 1040 | ||
1041 | try { | 1041 | try { |
1042 | $conf->write($loginManager->isLoggedIn()); | 1042 | $conf->write($loginManager->isLoggedIn()); |
@@ -1076,6 +1076,7 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager, | |||
1076 | $PAGE->assign('api_secret', $conf->get('api.secret')); | 1076 | $PAGE->assign('api_secret', $conf->get('api.secret')); |
1077 | $PAGE->assign('languages', Languages::getAvailableLanguages()); | 1077 | $PAGE->assign('languages', Languages::getAvailableLanguages()); |
1078 | $PAGE->assign('language', $conf->get('translation.language')); | 1078 | $PAGE->assign('language', $conf->get('translation.language')); |
1079 | $PAGE->assign('gd_enabled', extension_loaded('gd')); | ||
1079 | $PAGE->assign('pagetitle', t('Configure') .' - '. $conf->get('general.title', 'Shaarli')); | 1080 | $PAGE->assign('pagetitle', t('Configure') .' - '. $conf->get('general.title', 'Shaarli')); |
1080 | $PAGE->renderPage('configure'); | 1081 | $PAGE->renderPage('configure'); |
1081 | exit; | 1082 | exit; |
@@ -1618,6 +1619,7 @@ function buildLinkList($PAGE, $LINKSDB, $conf, $pluginManager, $loginManager) | |||
1618 | $elem['thumbnail'] = $thumbnailer->get($link['url']); | 1619 | $elem['thumbnail'] = $thumbnailer->get($link['url']); |
1619 | $LINKSDB[$keys[$i]] = $elem; | 1620 | $LINKSDB[$keys[$i]] = $elem; |
1620 | $updateDB = true; | 1621 | $updateDB = true; |
1622 | $link['thumbnail'] = $elem['thumbnail']; | ||
1621 | } | 1623 | } |
1622 | 1624 | ||
1623 | // Check for both signs of a note: starting with ? and 7 chars long. | 1625 | // Check for both signs of a note: starting with ? and 7 chars long. |
diff --git a/tpl/default/configure.html b/tpl/default/configure.html index b91fc07e..5695ae8e 100644 --- a/tpl/default/configure.html +++ b/tpl/default/configure.html | |||
@@ -249,8 +249,12 @@ | |||
249 | <span class="label-name">{'Enable thumbnails'|t}</span><br> | 249 | <span class="label-name">{'Enable thumbnails'|t}</span><br> |
250 | <span class="label-desc"> | 250 | <span class="label-desc"> |
251 | {'Warning: '|t} | 251 | {'Warning: '|t} |
252 | {'It\'s recommended to visit the picture wall after enabling this feature.'|t} | 252 | {if="$gd_enabled"} |
253 | {'If you have a large database, the first retrieval may take a few minutes.'|t} | 253 | {'It\'s recommended to visit the picture wall after enabling this feature.'|t} |
254 | {'If you have a large database, the first retrieval may take a few minutes.'|t} | ||
255 | {else} | ||
256 | {'You need to enable the extension <code>php-gd</code> to use thumbnails.'|t} | ||
257 | {/if} | ||
254 | </span> | 258 | </span> |
255 | </label> | 259 | </label> |
256 | </div> | 260 | </div> |
@@ -258,7 +262,7 @@ | |||
258 | <div class="pure-u-lg-{$ratioInput} pure-u-{$ratioInputMobile}"> | 262 | <div class="pure-u-lg-{$ratioInput} pure-u-{$ratioInputMobile}"> |
259 | <div class="form-input"> | 263 | <div class="form-input"> |
260 | <input type="checkbox" name="enableThumbnails" id="enableThumbnails" | 264 | <input type="checkbox" name="enableThumbnails" id="enableThumbnails" |
261 | {if="$thumbnails_enabled"}checked{/if}/> | 265 | {if="$thumbnails_enabled"}checked{/if} {if="!$gd_enabled"}disabled{/if} /> |
262 | </div> | 266 | </div> |
263 | </div> | 267 | </div> |
264 | </div> | 268 | </div> |