diff options
author | ArthurHoaro <arthur@hoa.ro> | 2017-11-11 14:01:21 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2018-07-05 20:31:35 +0200 |
commit | e85b7a05a177f803ae36ba5c12835313f31177bc (patch) | |
tree | 99216fbcb3343b74eac2589d14bf75c0a6d5fb01 | |
parent | a3724717ec37d4bd54dc117ef439c8a182157882 (diff) | |
download | Shaarli-e85b7a05a177f803ae36ba5c12835313f31177bc.tar.gz Shaarli-e85b7a05a177f803ae36ba5c12835313f31177bc.tar.zst Shaarli-e85b7a05a177f803ae36ba5c12835313f31177bc.zip |
Update thumbnail integration after rebasing the branch
-rw-r--r-- | application/Thumbnailer.php | 15 | ||||
-rw-r--r-- | application/Updater.php | 12 | ||||
-rw-r--r-- | assets/common/js/picwall.js | 10 | ||||
-rw-r--r-- | assets/common/js/thumbnails.js | 7 | ||||
-rw-r--r-- | assets/default/scss/shaarli.scss | 4 | ||||
-rw-r--r-- | composer.json | 2 | ||||
-rw-r--r-- | composer.lock | 43 | ||||
-rw-r--r-- | inc/languages/fr/LC_MESSAGES/shaarli.po | 241 | ||||
-rw-r--r-- | inc/web-thumbnailer.json | 5 | ||||
-rw-r--r-- | index.php | 39 | ||||
-rw-r--r-- | tests/ThumbnailerTest.php | 64 | ||||
-rw-r--r-- | tests/Updater/UpdaterTest.php | 15 | ||||
-rw-r--r-- | tests/utils/config/configJson.json.php | 70 | ||||
-rw-r--r-- | tests/utils/config/wt.json | 12 | ||||
-rw-r--r-- | tpl/default/configure.html | 20 | ||||
-rw-r--r-- | tpl/default/linklist.html | 15 | ||||
-rw-r--r-- | tpl/default/page.header.html | 8 | ||||
-rw-r--r-- | tpl/default/picwall.html | 68 | ||||
-rw-r--r-- | tpl/vintage/linklist.html | 1 | ||||
-rw-r--r-- | tpl/vintage/picwall.html | 2 | ||||
-rw-r--r-- | webpack.config.js | 4 |
21 files changed, 450 insertions, 207 deletions
diff --git a/application/Thumbnailer.php b/application/Thumbnailer.php index b669adae..9cf5dacd 100644 --- a/application/Thumbnailer.php +++ b/application/Thumbnailer.php | |||
@@ -1,6 +1,11 @@ | |||
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace Shaarli; | ||
4 | |||
5 | use Shaarli\Config\ConfigManager; | ||
6 | use WebThumbnailer\Exception\WebThumbnailerException; | ||
3 | use WebThumbnailer\WebThumbnailer; | 7 | use WebThumbnailer\WebThumbnailer; |
8 | use WebThumbnailer\Application\ConfigManager as WTConfigManager; | ||
4 | 9 | ||
5 | /** | 10 | /** |
6 | * Class Thumbnailer | 11 | * Class Thumbnailer |
@@ -28,7 +33,7 @@ class Thumbnailer | |||
28 | { | 33 | { |
29 | $this->conf = $conf; | 34 | $this->conf = $conf; |
30 | $this->wt = new WebThumbnailer(); | 35 | $this->wt = new WebThumbnailer(); |
31 | \WebThumbnailer\Application\ConfigManager::addFile('inc/web-thumbnailer.json'); | 36 | WTConfigManager::addFile('inc/web-thumbnailer.json'); |
32 | $this->wt->maxWidth($this->conf->get('thumbnails.width')) | 37 | $this->wt->maxWidth($this->conf->get('thumbnails.width')) |
33 | ->maxHeight($this->conf->get('thumbnails.height')) | 38 | ->maxHeight($this->conf->get('thumbnails.height')) |
34 | ->crop(true) | 39 | ->crop(true) |
@@ -44,6 +49,12 @@ class Thumbnailer | |||
44 | */ | 49 | */ |
45 | public function get($url) | 50 | public function get($url) |
46 | { | 51 | { |
47 | return $this->wt->thumbnail($url); | 52 | try { |
53 | return $this->wt->thumbnail($url); | ||
54 | } catch (WebThumbnailerException $e) { | ||
55 | // Exceptions are only thrown in debug mode. | ||
56 | error_log(get_class($e) .': '. $e->getMessage()); | ||
57 | return false; | ||
58 | } | ||
48 | } | 59 | } |
49 | } | 60 | } |
diff --git a/application/Updater.php b/application/Updater.php index dece2c02..6fbe3e00 100644 --- a/application/Updater.php +++ b/application/Updater.php | |||
@@ -480,7 +480,19 @@ class Updater | |||
480 | } | 480 | } |
481 | 481 | ||
482 | $this->conf->write($this->isLoggedIn); | 482 | $this->conf->write($this->isLoggedIn); |
483 | return true; | ||
484 | } | ||
483 | 485 | ||
486 | /** | ||
487 | * * Move thumbnails management to WebThumbnailer, coming with new settings. | ||
488 | */ | ||
489 | public function updateMethodWebThumbnailer() | ||
490 | { | ||
491 | $this->conf->set('thumbnails.enabled', $this->conf->get('thumbnail.enable_thumbnails', true)); | ||
492 | $this->conf->set('thumbnails.width', 125); | ||
493 | $this->conf->set('thumbnails.height', 90); | ||
494 | $this->conf->remove('thumbnail'); | ||
495 | $this->conf->write(true); | ||
484 | return true; | 496 | return true; |
485 | } | 497 | } |
486 | } | 498 | } |
diff --git a/assets/common/js/picwall.js b/assets/common/js/picwall.js deleted file mode 100644 index 87a93fc3..00000000 --- a/assets/common/js/picwall.js +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | import Blazy from 'blazy'; | ||
2 | |||
3 | (() => { | ||
4 | const picwall = document.getElementById('picwall_container'); | ||
5 | if (picwall != null) { | ||
6 | // Suppress ESLint error because that's how bLazy works | ||
7 | /* eslint-disable no-new */ | ||
8 | new Blazy(); | ||
9 | } | ||
10 | })(); | ||
diff --git a/assets/common/js/thumbnails.js b/assets/common/js/thumbnails.js new file mode 100644 index 00000000..c28322bb --- /dev/null +++ b/assets/common/js/thumbnails.js | |||
@@ -0,0 +1,7 @@ | |||
1 | import Blazy from 'blazy'; | ||
2 | |||
3 | (() => { | ||
4 | // Suppress ESLint error because that's how bLazy works | ||
5 | /* eslint-disable no-new */ | ||
6 | new Blazy(); | ||
7 | })(); | ||
diff --git a/assets/default/scss/shaarli.scss b/assets/default/scss/shaarli.scss index 09d5efbe..425a0490 100644 --- a/assets/default/scss/shaarli.scss +++ b/assets/default/scss/shaarli.scss | |||
@@ -146,6 +146,10 @@ body, | |||
146 | background-color: $main-green; | 146 | background-color: $main-green; |
147 | } | 147 | } |
148 | 148 | ||
149 | .page-single-alert { | ||
150 | margin-top: 100px; | ||
151 | } | ||
152 | |||
149 | .anchor { | 153 | .anchor { |
150 | &:target { | 154 | &:target { |
151 | padding-top: 40px; | 155 | padding-top: 40px; |
diff --git a/composer.json b/composer.json index 983bf9e9..bdf52fcc 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": "dev-master", | 22 | "arthurhoaro/web-thumbnailer": "^1.0", |
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 ee762c0e..3f9ef7e2 100644 --- a/composer.lock +++ b/composer.lock | |||
@@ -4,9 +4,50 @@ | |||
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#composer-lock-the-lock-file", |
5 | "This file is @generated automatically" | 5 | "This file is @generated automatically" |
6 | ], | 6 | ], |
7 | "content-hash": "308a35eab91602fbb449f2c669c445ed", | 7 | "content-hash": "efa8b74ec9a15bb8c18e4a36fd13d480", |
8 | "packages": [ | 8 | "packages": [ |
9 | { | 9 | { |
10 | "name": "arthurhoaro/web-thumbnailer", | ||
11 | "version": "v1.0.1", | ||
12 | "source": { | ||
13 | "type": "git", | ||
14 | "url": "https://github.com/ArthurHoaro/web-thumbnailer.git", | ||
15 | "reference": "10e2919c2aa0bf55f4593c8b05508a98c79d6706" | ||
16 | }, | ||
17 | "dist": { | ||
18 | "type": "zip", | ||
19 | "url": "https://api.github.com/repos/ArthurHoaro/web-thumbnailer/zipball/10e2919c2aa0bf55f4593c8b05508a98c79d6706", | ||
20 | "reference": "10e2919c2aa0bf55f4593c8b05508a98c79d6706", | ||
21 | "shasum": "" | ||
22 | }, | ||
23 | "require": { | ||
24 | "php": ">=5.6" | ||
25 | }, | ||
26 | "require-dev": { | ||
27 | "phpunit/phpunit": "5.2.*" | ||
28 | }, | ||
29 | "type": "library", | ||
30 | "autoload": { | ||
31 | "psr-0": { | ||
32 | "WebThumbnailer\\": [ | ||
33 | "src/", | ||
34 | "tests/" | ||
35 | ] | ||
36 | } | ||
37 | }, | ||
38 | "notification-url": "https://packagist.org/downloads/", | ||
39 | "license": [ | ||
40 | "MIT" | ||
41 | ], | ||
42 | "authors": [ | ||
43 | { | ||
44 | "name": "Arthur Hoaro", | ||
45 | "homepage": "http://hoa.ro" | ||
46 | } | ||
47 | ], | ||
48 | "time": "2017-11-11T15:39:49+00:00" | ||
49 | }, | ||
50 | { | ||
10 | "name": "container-interop/container-interop", | 51 | "name": "container-interop/container-interop", |
11 | "version": "1.2.0", | 52 | "version": "1.2.0", |
12 | "source": { | 53 | "source": { |
diff --git a/inc/languages/fr/LC_MESSAGES/shaarli.po b/inc/languages/fr/LC_MESSAGES/shaarli.po index 2ebeccbc..15c8b2bb 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-01-24 18:43+0100\n" | 4 | "POT-Creation-Date: 2018-05-05 12:47+0200\n" |
5 | "PO-Revision-Date: 2018-03-06 18:44+0100\n" | 5 | "PO-Revision-Date: 2018-05-05 12:47+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" |
@@ -56,7 +56,7 @@ msgstr "Liens directs" | |||
56 | 56 | ||
57 | #: application/FeedBuilder.php:153 | 57 | #: application/FeedBuilder.php:153 |
58 | #: tmp/daily.b91ef64efc3688266305ea9b42e5017e.rtpl.php:88 | 58 | #: tmp/daily.b91ef64efc3688266305ea9b42e5017e.rtpl.php:88 |
59 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:178 | 59 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:177 |
60 | msgid "Permalink" | 60 | msgid "Permalink" |
61 | msgstr "Permalien" | 61 | msgstr "Permalien" |
62 | 62 | ||
@@ -68,18 +68,22 @@ msgstr "Le fichier d'historique n'est pas accessible en lecture ou en écriture" | |||
68 | msgid "Could not parse history file" | 68 | msgid "Could not parse history file" |
69 | msgstr "Format incorrect pour le fichier d'historique" | 69 | msgstr "Format incorrect pour le fichier d'historique" |
70 | 70 | ||
71 | #: application/Languages.php:161 | 71 | #: application/Languages.php:177 |
72 | msgid "Automatic" | 72 | msgid "Automatic" |
73 | msgstr "Automatique" | 73 | msgstr "Automatique" |
74 | 74 | ||
75 | #: application/Languages.php:162 | 75 | #: application/Languages.php:178 |
76 | msgid "English" | 76 | msgid "English" |
77 | msgstr "Anglais" | 77 | msgstr "Anglais" |
78 | 78 | ||
79 | #: application/Languages.php:163 | 79 | #: application/Languages.php:179 |
80 | msgid "French" | 80 | msgid "French" |
81 | msgstr "Français" | 81 | msgstr "Français" |
82 | 82 | ||
83 | #: application/Languages.php:180 | ||
84 | msgid "German" | ||
85 | msgstr "Allemand" | ||
86 | |||
83 | #: application/LinkDB.php:136 | 87 | #: application/LinkDB.php:136 |
84 | msgid "You are not authorized to add a link." | 88 | msgid "You are not authorized to add a link." |
85 | msgstr "Vous n'êtes pas autorisé à ajouter un lien." | 89 | msgstr "Vous n'êtes pas autorisé à ajouter un lien." |
@@ -163,11 +167,11 @@ msgstr "" | |||
163 | "a été importé avec succès en %d secondes : %d liens importés, %d liens " | 167 | "a été importé avec succès en %d secondes : %d liens importés, %d liens " |
164 | "écrasés, %d liens ignorés." | 168 | "écrasés, %d liens ignorés." |
165 | 169 | ||
166 | #: application/PageBuilder.php:168 | 170 | #: application/PageBuilder.php:173 |
167 | msgid "The page you are trying to reach does not exist or has been deleted." | 171 | msgid "The page you are trying to reach does not exist or has been deleted." |
168 | msgstr "La page que vous essayez de consulter n'existe pas ou a été supprimée." | 172 | msgstr "La page que vous essayez de consulter n'existe pas ou a été supprimée." |
169 | 173 | ||
170 | #: application/PageBuilder.php:170 | 174 | #: application/PageBuilder.php:175 |
171 | msgid "404 Not Found" | 175 | msgid "404 Not Found" |
172 | msgstr "404 Introuvable" | 176 | msgstr "404 Introuvable" |
173 | 177 | ||
@@ -180,17 +184,17 @@ msgstr "Les fichiers de l'extension \"%s\" sont introuvables." | |||
180 | msgid "Couldn't retrieve Updater class methods." | 184 | msgid "Couldn't retrieve Updater class methods." |
181 | msgstr "Impossible de récupérer les méthodes de la classe Updater." | 185 | msgstr "Impossible de récupérer les méthodes de la classe Updater." |
182 | 186 | ||
183 | #: application/Updater.php:506 | 187 | #: application/Updater.php:544 |
184 | msgid "An error occurred while running the update " | 188 | msgid "An error occurred while running the update " |
185 | msgstr "Une erreur s'est produite lors de l'exécution de la mise à jour " | 189 | msgstr "Une erreur s'est produite lors de l'exécution de la mise à jour " |
186 | 190 | ||
187 | #: application/Updater.php:546 | 191 | #: application/Updater.php:584 |
188 | msgid "Updates file path is not set, can't write updates." | 192 | msgid "Updates file path is not set, can't write updates." |
189 | msgstr "" | 193 | msgstr "" |
190 | "Le chemin vers le fichier de mise à jour n'est pas défini, impossible " | 194 | "Le chemin vers le fichier de mise à jour n'est pas défini, impossible " |
191 | "d'écrire les mises à jour." | 195 | "d'écrire les mises à jour." |
192 | 196 | ||
193 | #: application/Updater.php:551 | 197 | #: application/Updater.php:589 |
194 | msgid "Unable to write updates in " | 198 | msgid "Unable to write updates in " |
195 | msgstr "Impossible d'écrire les mises à jour dans " | 199 | msgstr "Impossible d'écrire les mises à jour dans " |
196 | 200 | ||
@@ -230,6 +234,7 @@ msgstr "" | |||
230 | "Shaarli a les droits d'écriture dans le dossier dans lequel il est installé." | 234 | "Shaarli a les droits d'écriture dans le dossier dans lequel il est installé." |
231 | 235 | ||
232 | #: application/config/ConfigManager.php:135 | 236 | #: application/config/ConfigManager.php:135 |
237 | #: application/config/ConfigManager.php:162 | ||
233 | msgid "Invalid setting key parameter. String expected, got: " | 238 | msgid "Invalid setting key parameter. String expected, got: " |
234 | msgstr "Clé de paramétrage invalide. Chaîne de caractères obtenue, attendu : " | 239 | msgstr "Clé de paramétrage invalide. Chaîne de caractères obtenue, attendu : " |
235 | 240 | ||
@@ -251,135 +256,133 @@ msgstr "Vous n'êtes pas autorisé à modifier la configuration." | |||
251 | msgid "Error accessing" | 256 | msgid "Error accessing" |
252 | msgstr "Une erreur s'est produite en accédant à " | 257 | msgstr "Une erreur s'est produite en accédant à " |
253 | 258 | ||
254 | #: index.php:142 | 259 | #: index.php:143 |
255 | msgid "Shared links on " | 260 | msgid "Shared links on " |
256 | msgstr "Liens partagés sur " | 261 | msgstr "Liens partagés sur " |
257 | 262 | ||
258 | #: index.php:164 | 263 | #: index.php:165 |
259 | msgid "Insufficient permissions:" | 264 | msgid "Insufficient permissions:" |
260 | msgstr "Permissions insuffisantes :" | 265 | msgstr "Permissions insuffisantes :" |
261 | 266 | ||
262 | #: index.php:303 | 267 | #: index.php:304 |
263 | msgid "I said: NO. You are banned for the moment. Go away." | 268 | msgid "I said: NO. You are banned for the moment. Go away." |
264 | msgstr "NON. Vous êtes banni pour le moment. Revenez plus tard." | 269 | msgstr "NON. Vous êtes banni pour le moment. Revenez plus tard." |
265 | 270 | ||
266 | #: index.php:368 | 271 | #: index.php:369 |
267 | msgid "Wrong login/password." | 272 | msgid "Wrong login/password." |
268 | msgstr "Nom d'utilisateur ou mot de passe incorrects." | 273 | msgstr "Nom d'utilisateur ou mot de passe incorrects." |
269 | 274 | ||
270 | #: index.php:576 tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:42 | 275 | #: index.php:577 tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:46 |
271 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:42 | 276 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:46 |
272 | msgid "Daily" | 277 | msgid "Daily" |
273 | msgstr "Quotidien" | 278 | msgstr "Quotidien" |
274 | 279 | ||
275 | #: index.php:681 tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:28 | 280 | #: index.php:682 tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:28 |
276 | #: tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:44 | 281 | #: tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:44 |
277 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:71 | 282 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:75 |
278 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:95 | 283 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:99 |
279 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:71 | 284 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:75 |
280 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:95 | 285 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:99 |
281 | msgid "Login" | 286 | msgid "Login" |
282 | msgstr "Connexion" | 287 | msgstr "Connexion" |
283 | 288 | ||
284 | #: index.php:722 tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:39 | 289 | #: index.php:750 tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:41 |
285 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:39 | 290 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:41 |
286 | msgid "Picture wall" | 291 | msgid "Picture wall" |
287 | msgstr "Mur d'images" | 292 | msgstr "Mur d'images" |
288 | 293 | ||
289 | #: index.php:770 tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36 | 294 | #: index.php:798 tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36 |
290 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:36 | 295 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:36 |
291 | #: tmp/tag.cloud.b91ef64efc3688266305ea9b42e5017e.rtpl.php:19 | 296 | #: tmp/tag.cloud.b91ef64efc3688266305ea9b42e5017e.rtpl.php:19 |
292 | msgid "Tag cloud" | 297 | msgid "Tag cloud" |
293 | msgstr "Nuage de tags" | 298 | msgstr "Nuage de tags" |
294 | 299 | ||
295 | #: index.php:803 tmp/tag.list.b91ef64efc3688266305ea9b42e5017e.rtpl.php:19 | 300 | #: index.php:831 tmp/tag.list.b91ef64efc3688266305ea9b42e5017e.rtpl.php:19 |
296 | msgid "Tag list" | 301 | msgid "Tag list" |
297 | msgstr "Liste des tags" | 302 | msgstr "Liste des tags" |
298 | 303 | ||
299 | #: index.php:1028 tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:31 | 304 | #: index.php:1056 tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:31 |
300 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:31 | 305 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:31 |
301 | msgid "Tools" | 306 | msgid "Tools" |
302 | msgstr "Outils" | 307 | msgstr "Outils" |
303 | 308 | ||
304 | #: index.php:1037 | 309 | #: index.php:1065 |
305 | msgid "You are not supposed to change a password on an Open Shaarli." | 310 | msgid "You are not supposed to change a password on an Open Shaarli." |
306 | msgstr "" | 311 | msgstr "" |
307 | "Vous n'êtes pas censé modifier le mot de passe d'un Shaarli en mode ouvert." | 312 | "Vous n'êtes pas censé modifier le mot de passe d'un Shaarli en mode ouvert." |
308 | 313 | ||
309 | #: index.php:1042 index.php:1084 index.php:1162 index.php:1193 index.php:1293 | 314 | #: index.php:1070 index.php:1112 index.php:1189 index.php:1220 index.php:1325 |
310 | msgid "Wrong token." | 315 | msgid "Wrong token." |
311 | msgstr "Jeton invalide." | 316 | msgstr "Jeton invalide." |
312 | 317 | ||
313 | #: index.php:1047 | 318 | #: index.php:1075 |
314 | msgid "The old password is not correct." | 319 | msgid "The old password is not correct." |
315 | msgstr "L'ancien mot de passe est incorrect." | 320 | msgstr "L'ancien mot de passe est incorrect." |
316 | 321 | ||
317 | #: index.php:1067 | 322 | #: index.php:1095 |
318 | msgid "Your password has been changed" | 323 | msgid "Your password has been changed" |
319 | msgstr "Votre mot de passe a été modifié" | 324 | msgstr "Votre mot de passe a été modifié" |
320 | 325 | ||
321 | #: index.php:1072 | 326 | #: index.php:1100 |
322 | #: tmp/changepassword.b91ef64efc3688266305ea9b42e5017e.rtpl.php:13 | 327 | #: tmp/changepassword.b91ef64efc3688266305ea9b42e5017e.rtpl.php:13 |
323 | #: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:29 | 328 | #: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:29 |
324 | msgid "Change password" | 329 | msgid "Change password" |
325 | msgstr "Modification du mot de passe" | 330 | msgstr "Modification du mot de passe" |
326 | 331 | ||
327 | #: index.php:1121 | 332 | #: index.php:1149 |
328 | msgid "Configuration was saved." | 333 | msgid "Configuration was saved." |
329 | msgstr "La configuration a été sauvegardé." | 334 | msgstr "La configuration a été sauvegardé." |
330 | 335 | ||
331 | #: index.php:1145 tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:24 | 336 | #: index.php:1172 tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:24 |
332 | msgid "Configure" | 337 | msgid "Configure" |
333 | msgstr "Configurer" | 338 | msgstr "Configurer" |
334 | 339 | ||
335 | #: index.php:1156 tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:13 | 340 | #: index.php:1183 tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:13 |
336 | #: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36 | 341 | #: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36 |
337 | msgid "Manage tags" | 342 | msgid "Manage tags" |
338 | msgstr "Gérer les tags" | 343 | msgstr "Gérer les tags" |
339 | 344 | ||
340 | #: index.php:1174 | 345 | #: index.php:1201 |
341 | #, php-format | 346 | #, php-format |
342 | msgid "The tag was removed from %d link." | 347 | msgid "The tag was removed from %d link." |
343 | msgid_plural "The tag was removed from %d links." | 348 | msgid_plural "The tag was removed from %d links." |
344 | msgstr[0] "Le tag a été supprimé de %d lien." | 349 | msgstr[0] "Le tag a été supprimé de %d lien." |
345 | msgstr[1] "Le tag a été supprimé de %d liens." | 350 | msgstr[1] "Le tag a été supprimé de %d liens." |
346 | 351 | ||
347 | #: index.php:1175 | 352 | #: index.php:1202 |
348 | #, php-format | 353 | #, php-format |
349 | msgid "The tag was renamed in %d link." | 354 | msgid "The tag was renamed in %d link." |
350 | msgid_plural "The tag was renamed in %d links." | 355 | msgid_plural "The tag was renamed in %d links." |
351 | msgstr[0] "Le tag a été renommé dans %d lien." | 356 | msgstr[0] "Le tag a été renommé dans %d lien." |
352 | msgstr[1] "Le tag a été renommé dans %d liens." | 357 | msgstr[1] "Le tag a été renommé dans %d liens." |
353 | 358 | ||
354 | #: index.php:1183 tmp/addlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:13 | 359 | #: index.php:1210 tmp/addlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:13 |
355 | msgid "Shaare a new link" | 360 | msgid "Shaare a new link" |
356 | msgstr "Partager un nouveau lien" | 361 | msgstr "Partager un nouveau lien" |
357 | 362 | ||
358 | #: index.php:1353 tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:14 | 363 | #: index.php:1385 tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:169 |
359 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:170 | ||
360 | msgid "Edit" | 364 | msgid "Edit" |
361 | msgstr "Modifier" | 365 | msgstr "Modifier" |
362 | 366 | ||
363 | #: index.php:1353 index.php:1418 | 367 | #: index.php:1385 index.php:1455 |
364 | #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16 | ||
365 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:26 | 368 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:26 |
366 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:26 | 369 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:26 |
367 | msgid "Shaare" | 370 | msgid "Shaare" |
368 | msgstr "Shaare" | 371 | msgstr "Shaare" |
369 | 372 | ||
370 | #: index.php:1387 | 373 | #: index.php:1424 |
371 | msgid "Note: " | 374 | msgid "Note: " |
372 | msgstr "Note : " | 375 | msgstr "Note : " |
373 | 376 | ||
374 | #: index.php:1427 tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:65 | 377 | #: index.php:1464 tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:65 |
375 | msgid "Export" | 378 | msgid "Export" |
376 | msgstr "Exporter" | 379 | msgstr "Exporter" |
377 | 380 | ||
378 | #: index.php:1489 tmp/import.b91ef64efc3688266305ea9b42e5017e.rtpl.php:83 | 381 | #: index.php:1526 tmp/import.b91ef64efc3688266305ea9b42e5017e.rtpl.php:83 |
379 | msgid "Import" | 382 | msgid "Import" |
380 | msgstr "Importer" | 383 | msgstr "Importer" |
381 | 384 | ||
382 | #: index.php:1499 | 385 | #: index.php:1536 |
383 | #, php-format | 386 | #, php-format |
384 | msgid "" | 387 | msgid "" |
385 | "The file you are trying to upload is probably bigger than what this " | 388 | "The file you are trying to upload is probably bigger than what this " |
@@ -389,16 +392,16 @@ msgstr "" | |||
389 | "le serveur web peut accepter (%s). Merci de l'envoyer en parties plus " | 392 | "le serveur web peut accepter (%s). Merci de l'envoyer en parties plus " |
390 | "légères." | 393 | "légères." |
391 | 394 | ||
392 | #: index.php:1538 tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:26 | 395 | #: index.php:1575 tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:26 |
393 | #: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:22 | 396 | #: tmp/tools.b91ef64efc3688266305ea9b42e5017e.rtpl.php:22 |
394 | msgid "Plugin administration" | 397 | msgid "Plugin administration" |
395 | msgstr "Administration des extensions" | 398 | msgstr "Administration des extensions" |
396 | 399 | ||
397 | #: index.php:1703 | 400 | #: index.php:1759 |
398 | msgid "Search: " | 401 | msgid "Search: " |
399 | msgstr "Recherche : " | 402 | msgstr "Recherche : " |
400 | 403 | ||
401 | #: index.php:1930 | 404 | #: index.php:1798 |
402 | #, php-format | 405 | #, php-format |
403 | msgid "" | 406 | msgid "" |
404 | "<pre>Sessions do not seem to work correctly on your server.<br>Make sure the " | 407 | "<pre>Sessions do not seem to work correctly on your server.<br>Make sure the " |
@@ -417,7 +420,7 @@ msgstr "" | |||
417 | "cookies. Nous vous recommandons d'accéder à votre serveur depuis son adresse " | 420 | "cookies. Nous vous recommandons d'accéder à votre serveur depuis son adresse " |
418 | "IP ou un <em>Fully Qualified Domain Name</em>.<br>" | 421 | "IP ou un <em>Fully Qualified Domain Name</em>.<br>" |
419 | 422 | ||
420 | #: index.php:1940 | 423 | #: index.php:1808 |
421 | msgid "Click to try again." | 424 | msgid "Click to try again." |
422 | msgstr "Cliquer ici pour réessayer." | 425 | msgstr "Cliquer ici pour réessayer." |
423 | 426 | ||
@@ -577,11 +580,11 @@ msgstr "URL de l'API Wallabag" | |||
577 | msgid "Wallabag API version (1 or 2)" | 580 | msgid "Wallabag API version (1 or 2)" |
578 | msgstr "Version de l'API Wallabag (1 ou 2)" | 581 | msgstr "Version de l'API Wallabag (1 ou 2)" |
579 | 582 | ||
580 | #: tests/LanguagesTest.php:188 tests/LanguagesTest.php:201 | 583 | #: tests/LanguagesTest.php:214 tests/LanguagesTest.php:227 |
581 | #: tests/languages/fr/LanguagesFrTest.php:160 | 584 | #: tests/languages/fr/LanguagesFrTest.php:160 |
582 | #: tests/languages/fr/LanguagesFrTest.php:173 | 585 | #: tests/languages/fr/LanguagesFrTest.php:173 |
583 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:81 | 586 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:85 |
584 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:81 | 587 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:85 |
585 | msgid "Search" | 588 | msgid "Search" |
586 | msgid_plural "Search" | 589 | msgid_plural "Search" |
587 | msgstr[0] "Rechercher" | 590 | msgstr[0] "Rechercher" |
@@ -625,8 +628,8 @@ msgid "Rename" | |||
625 | msgstr "Renommer" | 628 | msgstr "Renommer" |
626 | 629 | ||
627 | #: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:35 | 630 | #: tmp/changetag.b91ef64efc3688266305ea9b42e5017e.rtpl.php:35 |
628 | #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:79 | 631 | #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:77 |
629 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:172 | 632 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:171 |
630 | msgid "Delete" | 633 | msgid "Delete" |
631 | msgstr "Supprimer" | 634 | msgstr "Supprimer" |
632 | 635 | ||
@@ -736,8 +739,29 @@ msgstr "" | |||
736 | msgid "API secret" | 739 | msgid "API secret" |
737 | msgstr "Clé d'API secrète" | 740 | msgstr "Clé d'API secrète" |
738 | 741 | ||
739 | #: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:274 | 742 | #: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:277 |
740 | #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:74 | 743 | msgid "Enable thumbnails" |
744 | msgstr "Activer les miniatures" | ||
745 | |||
746 | #: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:279 | ||
747 | msgid "Warning: " | ||
748 | msgstr "Attention : " | ||
749 | |||
750 | #: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:281 | ||
751 | msgid "It's recommended to visit the picture wall after enabling this feature." | ||
752 | msgstr "" | ||
753 | "Il est recommandé de visiter le Mur d'images après avoir activé cette " | ||
754 | "fonctionnalité." | ||
755 | |||
756 | #: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:283 | ||
757 | msgid "" | ||
758 | "If you have a large database, the first retrieval may take a few minutes." | ||
759 | msgstr "" | ||
760 | "Si vous avez beaucoup de liens, la première récupération peut prendre " | ||
761 | "plusieurs minutes." | ||
762 | |||
763 | #: tmp/configure.b91ef64efc3688266305ea9b42e5017e.rtpl.php:297 | ||
764 | #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:72 | ||
741 | #: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:139 | 765 | #: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:139 |
742 | #: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:199 | 766 | #: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:199 |
743 | msgid "Save" | 767 | msgid "Save" |
@@ -763,25 +787,27 @@ msgstr "Tous les liens d'un jour sur une page." | |||
763 | msgid "Next day" | 787 | msgid "Next day" |
764 | msgstr "Jour suivant" | 788 | msgstr "Jour suivant" |
765 | 789 | ||
766 | #: tpl/editlink.html | 790 | #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:14 |
767 | msgid "Edit Shaare" | 791 | msgid "Edit Shaare" |
768 | msgstr "Modifier le Shaare" | 792 | msgstr "Modifier le Shaare" |
793 | |||
794 | #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:14 | ||
769 | msgid "New Shaare" | 795 | msgid "New Shaare" |
770 | msgstr "Nouveau Shaare" | 796 | msgstr "Nouveau Shaare" |
771 | 797 | ||
772 | #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:25 | 798 | #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:23 |
773 | msgid "Created:" | 799 | msgid "Created:" |
774 | msgstr "Création :" | 800 | msgstr "Création :" |
775 | 801 | ||
776 | #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:28 | 802 | #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:26 |
777 | msgid "URL" | 803 | msgid "URL" |
778 | msgstr "URL" | 804 | msgstr "URL" |
779 | 805 | ||
780 | #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:34 | 806 | #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:32 |
781 | msgid "Title" | 807 | msgid "Title" |
782 | msgstr "Titre" | 808 | msgstr "Titre" |
783 | 809 | ||
784 | #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:40 | 810 | #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:38 |
785 | #: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:42 | 811 | #: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:42 |
786 | #: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:75 | 812 | #: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:75 |
787 | #: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:99 | 813 | #: tmp/pluginsadmin.b91ef64efc3688266305ea9b42e5017e.rtpl.php:99 |
@@ -789,17 +815,17 @@ msgstr "Titre" | |||
789 | msgid "Description" | 815 | msgid "Description" |
790 | msgstr "Description" | 816 | msgstr "Description" |
791 | 817 | ||
792 | #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:46 | 818 | #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:44 |
793 | msgid "Tags" | 819 | msgid "Tags" |
794 | msgstr "Tags" | 820 | msgstr "Tags" |
795 | 821 | ||
796 | #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:59 | 822 | #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:57 |
797 | #: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36 | 823 | #: tmp/export.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36 |
798 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:168 | 824 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:167 |
799 | msgid "Private" | 825 | msgid "Private" |
800 | msgstr "Privé" | 826 | msgstr "Privé" |
801 | 827 | ||
802 | #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:74 | 828 | #: tmp/editlink.b91ef64efc3688266305ea9b42e5017e.rtpl.php:72 |
803 | msgid "Apply Changes" | 829 | msgid "Apply Changes" |
804 | msgstr "Appliquer" | 830 | msgstr "Appliquer" |
805 | 831 | ||
@@ -876,15 +902,15 @@ msgstr "" | |||
876 | 902 | ||
877 | #: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:33 | 903 | #: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:33 |
878 | #: tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:30 | 904 | #: tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:30 |
879 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:147 | 905 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:151 |
880 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:147 | 906 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:151 |
881 | msgid "Username" | 907 | msgid "Username" |
882 | msgstr "Nom d'utilisateur" | 908 | msgstr "Nom d'utilisateur" |
883 | 909 | ||
884 | #: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:48 | 910 | #: tmp/install.b91ef64efc3688266305ea9b42e5017e.rtpl.php:48 |
885 | #: tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:34 | 911 | #: tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:34 |
886 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:148 | 912 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:152 |
887 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:148 | 913 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:152 |
888 | msgid "Password" | 914 | msgid "Password" |
889 | msgstr "Mot de passe" | 915 | msgstr "Mot de passe" |
890 | 916 | ||
@@ -901,28 +927,28 @@ msgid "Install" | |||
901 | msgstr "Installer" | 927 | msgstr "Installer" |
902 | 928 | ||
903 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:14 | 929 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:14 |
904 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:80 | 930 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:79 |
905 | msgid "shaare" | 931 | msgid "shaare" |
906 | msgid_plural "shaares" | 932 | msgid_plural "shaares" |
907 | msgstr[0] "shaare" | 933 | msgstr[0] "shaare" |
908 | msgstr[1] "shaares" | 934 | msgstr[1] "shaares" |
909 | 935 | ||
910 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:18 | 936 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:18 |
911 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:84 | 937 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:83 |
912 | msgid "private link" | 938 | msgid "private link" |
913 | msgid_plural "private links" | 939 | msgid_plural "private links" |
914 | msgstr[0] "lien privé" | 940 | msgstr[0] "lien privé" |
915 | msgstr[1] "liens privés" | 941 | msgstr[1] "liens privés" |
916 | 942 | ||
917 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:31 | 943 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:30 |
918 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:117 | 944 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:121 |
919 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:117 | 945 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:121 |
920 | msgid "Search text" | 946 | msgid "Search text" |
921 | msgstr "Recherche texte" | 947 | msgstr "Recherche texte" |
922 | 948 | ||
923 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:38 | 949 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:37 |
924 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:124 | 950 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:128 |
925 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:124 | 951 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:128 |
926 | #: tmp/tag.cloud.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36 | 952 | #: tmp/tag.cloud.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36 |
927 | #: tmp/tag.cloud.b91ef64efc3688266305ea9b42e5017e.rtpl.php:64 | 953 | #: tmp/tag.cloud.b91ef64efc3688266305ea9b42e5017e.rtpl.php:64 |
928 | #: tmp/tag.list.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36 | 954 | #: tmp/tag.list.b91ef64efc3688266305ea9b42e5017e.rtpl.php:36 |
@@ -930,52 +956,52 @@ msgstr "Recherche texte" | |||
930 | msgid "Filter by tag" | 956 | msgid "Filter by tag" |
931 | msgstr "Filtrer par tag" | 957 | msgstr "Filtrer par tag" |
932 | 958 | ||
933 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:111 | 959 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:110 |
934 | msgid "Nothing found." | 960 | msgid "Nothing found." |
935 | msgstr "Aucun résultat." | 961 | msgstr "Aucun résultat." |
936 | 962 | ||
937 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:119 | 963 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:118 |
938 | #, php-format | 964 | #, php-format |
939 | msgid "%s result" | 965 | msgid "%s result" |
940 | msgid_plural "%s results" | 966 | msgid_plural "%s results" |
941 | msgstr[0] "%s résultat" | 967 | msgstr[0] "%s résultat" |
942 | msgstr[1] "%s résultats" | 968 | msgstr[1] "%s résultats" |
943 | 969 | ||
944 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:123 | 970 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:122 |
945 | msgid "for" | 971 | msgid "for" |
946 | msgstr "pour" | 972 | msgstr "pour" |
947 | 973 | ||
948 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:130 | 974 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:129 |
949 | msgid "tagged" | 975 | msgid "tagged" |
950 | msgstr "taggé" | 976 | msgstr "taggé" |
951 | 977 | ||
952 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:134 | 978 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:133 |
953 | msgid "Remove tag" | 979 | msgid "Remove tag" |
954 | msgstr "Retirer le tag" | 980 | msgstr "Retirer le tag" |
955 | 981 | ||
956 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:143 | 982 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:142 |
957 | msgid "with status" | 983 | msgid "with status" |
958 | msgstr "avec le statut" | 984 | msgstr "avec le statut" |
959 | 985 | ||
960 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:154 | 986 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:153 |
961 | msgid "without any tag" | 987 | msgid "without any tag" |
962 | msgstr "sans tag" | 988 | msgstr "sans tag" |
963 | 989 | ||
964 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:174 | 990 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:173 |
965 | #: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:42 | 991 | #: tmp/page.footer.b91ef64efc3688266305ea9b42e5017e.rtpl.php:42 |
966 | #: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:42 | 992 | #: tmp/page.footer.cedf684561d925457130839629000a81.rtpl.php:42 |
967 | msgid "Fold" | 993 | msgid "Fold" |
968 | msgstr "Replier" | 994 | msgstr "Replier" |
969 | 995 | ||
970 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:176 | 996 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:175 |
971 | msgid "Edited: " | 997 | msgid "Edited: " |
972 | msgstr "Modifié : " | 998 | msgstr "Modifié : " |
973 | 999 | ||
974 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:180 | 1000 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:179 |
975 | msgid "permalink" | 1001 | msgid "permalink" |
976 | msgstr "permalien" | 1002 | msgstr "permalien" |
977 | 1003 | ||
978 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:182 | 1004 | #: tmp/linklist.b91ef64efc3688266305ea9b42e5017e.rtpl.php:181 |
979 | msgid "Add tag" | 1005 | msgid "Add tag" |
980 | msgstr "Ajouter un tag" | 1006 | msgstr "Ajouter un tag" |
981 | 1007 | ||
@@ -1021,8 +1047,8 @@ msgstr "" | |||
1021 | "réessayer plus tard." | 1047 | "réessayer plus tard." |
1022 | 1048 | ||
1023 | #: tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:41 | 1049 | #: tmp/loginform.b91ef64efc3688266305ea9b42e5017e.rtpl.php:41 |
1024 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:151 | 1050 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:155 |
1025 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:151 | 1051 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:155 |
1026 | msgid "Remember me" | 1052 | msgid "Remember me" |
1027 | msgstr "Rester connecté" | 1053 | msgstr "Rester connecté" |
1028 | 1054 | ||
@@ -1053,35 +1079,40 @@ msgstr "Déplier tout" | |||
1053 | msgid "Are you sure you want to delete this link?" | 1079 | msgid "Are you sure you want to delete this link?" |
1054 | msgstr "Êtes-vous sûr de vouloir supprimer ce lien ?" | 1080 | msgstr "Êtes-vous sûr de vouloir supprimer ce lien ?" |
1055 | 1081 | ||
1056 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:61 | 1082 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:65 |
1057 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:86 | 1083 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:90 |
1058 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:61 | 1084 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:65 |
1059 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:86 | 1085 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:90 |
1060 | msgid "RSS Feed" | 1086 | msgid "RSS Feed" |
1061 | msgstr "Flux RSS" | 1087 | msgstr "Flux RSS" |
1062 | 1088 | ||
1063 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:66 | 1089 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:70 |
1064 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:102 | 1090 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:106 |
1065 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:66 | 1091 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:70 |
1066 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:102 | 1092 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:106 |
1067 | msgid "Logout" | 1093 | msgid "Logout" |
1068 | msgstr "Déconnexion" | 1094 | msgstr "Déconnexion" |
1069 | 1095 | ||
1070 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:169 | 1096 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:173 |
1071 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:169 | 1097 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:173 |
1072 | msgid "is available" | 1098 | msgid "is available" |
1073 | msgstr "est disponible" | 1099 | msgstr "est disponible" |
1074 | 1100 | ||
1075 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:176 | 1101 | #: tmp/page.header.b91ef64efc3688266305ea9b42e5017e.rtpl.php:180 |
1076 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:176 | 1102 | #: tmp/page.header.cedf684561d925457130839629000a81.rtpl.php:180 |
1077 | msgid "Error" | 1103 | msgid "Error" |
1078 | msgstr "Erreur" | 1104 | msgstr "Erreur" |
1079 | 1105 | ||
1080 | #: tmp/picwall.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16 | 1106 | #: tmp/picwall.b91ef64efc3688266305ea9b42e5017e.rtpl.php:14 |
1107 | msgid "Picture wall unavailable (thumbnails are disabled)." | ||
1108 | msgstr "" | ||
1109 | "Le mur d'images n'est pas disponible (les miniatures sont désactivées)." | ||
1110 | |||
1111 | #: tmp/picwall.b91ef64efc3688266305ea9b42e5017e.rtpl.php:25 | ||
1081 | msgid "Picture Wall" | 1112 | msgid "Picture Wall" |
1082 | msgstr "Mur d'images" | 1113 | msgstr "Mur d'images" |
1083 | 1114 | ||
1084 | #: tmp/picwall.b91ef64efc3688266305ea9b42e5017e.rtpl.php:16 | 1115 | #: tmp/picwall.b91ef64efc3688266305ea9b42e5017e.rtpl.php:25 |
1085 | msgid "pics" | 1116 | msgid "pics" |
1086 | msgstr "images" | 1117 | msgstr "images" |
1087 | 1118 | ||
diff --git a/inc/web-thumbnailer.json b/inc/web-thumbnailer.json index 8a19f070..263529fd 100644 --- a/inc/web-thumbnailer.json +++ b/inc/web-thumbnailer.json | |||
@@ -3,7 +3,10 @@ | |||
3 | "default": { | 3 | "default": { |
4 | "_comment": "infinite cache", | 4 | "_comment": "infinite cache", |
5 | "cache_duration": -1, | 5 | "cache_duration": -1, |
6 | "timeout": 60 | 6 | "timeout": 10 |
7 | }, | ||
8 | "path": { | ||
9 | "cache": "cache/" | ||
7 | } | 10 | } |
8 | } | 11 | } |
9 | } \ No newline at end of file | 12 | } \ No newline at end of file |
@@ -74,13 +74,13 @@ require_once 'application/Url.php'; | |||
74 | require_once 'application/Utils.php'; | 74 | require_once 'application/Utils.php'; |
75 | require_once 'application/PluginManager.php'; | 75 | require_once 'application/PluginManager.php'; |
76 | require_once 'application/Router.php'; | 76 | require_once 'application/Router.php'; |
77 | require_once 'application/Thumbnailer.php'; | ||
78 | require_once 'application/Updater.php'; | 77 | require_once 'application/Updater.php'; |
79 | use \Shaarli\Languages; | ||
80 | use \Shaarli\ThemeUtils; | ||
81 | use \Shaarli\Config\ConfigManager; | 78 | use \Shaarli\Config\ConfigManager; |
79 | use \Shaarli\Languages; | ||
82 | use \Shaarli\Security\LoginManager; | 80 | use \Shaarli\Security\LoginManager; |
83 | use \Shaarli\Security\SessionManager; | 81 | use \Shaarli\Security\SessionManager; |
82 | use \Shaarli\ThemeUtils; | ||
83 | use \Shaarli\Thumbnailer; | ||
84 | 84 | ||
85 | // Ensure the PHP version is supported | 85 | // Ensure the PHP version is supported |
86 | try { | 86 | try { |
@@ -603,7 +603,7 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager, | |||
603 | if ($targetPage == Router::$PAGE_PICWALL) | 603 | if ($targetPage == Router::$PAGE_PICWALL) |
604 | { | 604 | { |
605 | if (! $conf->get('thumbnails.enabled')) { | 605 | if (! $conf->get('thumbnails.enabled')) { |
606 | header('Location: ?'); | 606 | $PAGE->renderPage('picwall'); |
607 | exit; | 607 | exit; |
608 | } | 608 | } |
609 | 609 | ||
@@ -614,23 +614,19 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager, | |||
614 | $thumbnailer = new Thumbnailer($conf); | 614 | $thumbnailer = new Thumbnailer($conf); |
615 | 615 | ||
616 | 616 | ||
617 | $cpt = 0; | 617 | $newThumbnailsCpt = 0; |
618 | // Get only links which have a thumbnail. | 618 | // Get only links which have a thumbnail. |
619 | foreach($links as $link) | 619 | foreach($links as $key => $link) |
620 | { | 620 | { |
621 | $permalink='?'.$link['shorturl']; | ||
622 | // Not a note, | 621 | // Not a note, |
623 | // and (never retrieved yet or no valid cache file) | 622 | // and (never retrieved yet or no valid cache file) |
624 | if ($link['url'][0] != '?' | 623 | if ($link['url'][0] != '?' |
625 | && (! isset($link['thumbnail']) || ($link['thumbnail'] !== false && ! is_file($link['thumbnail']))) | 624 | && (! isset($link['thumbnail']) || ($link['thumbnail'] !== false && ! is_file($link['thumbnail']))) |
626 | ) { | 625 | ) { |
627 | $link['thumbnail'] = $thumbnailer->get($link['url']); | 626 | $item = $LINKSDB[$key]; |
628 | // FIXME! we really need to get rid of ArrayAccess... | 627 | $item['thumbnail'] = $thumbnailer->get($link['url']); |
629 | $item = $LINKSDB[$link['linkdate']]; | 628 | $LINKSDB[$key] = $item; |
630 | $item['thumbnail'] = $link['thumbnail']; | 629 | $newThumbnailsCpt++; |
631 | $LINKSDB[$link['linkdate']] = $item; | ||
632 | $updateDB = true; | ||
633 | $cpt++; | ||
634 | } | 630 | } |
635 | 631 | ||
636 | if (isset($link['thumbnail']) && $link['thumbnail'] !== false) { | 632 | if (isset($link['thumbnail']) && $link['thumbnail'] !== false) { |
@@ -639,14 +635,13 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager, | |||
639 | 635 | ||
640 | // If we retrieved new thumbnails, we update the database every 20 links. | 636 | // If we retrieved new thumbnails, we update the database every 20 links. |
641 | // Downloading everything the first time may take a very long time | 637 | // Downloading everything the first time may take a very long time |
642 | if (!empty($updateDB) && $cpt == 20) { | 638 | if ($newThumbnailsCpt == 20) { |
643 | $LINKSDB->save($conf->get('resource.page_cache')); | 639 | $LINKSDB->save($conf->get('resource.page_cache')); |
644 | $updateDB = false; | 640 | $newThumbnailsCpt = 0; |
645 | $cpt = 0; | ||
646 | } | 641 | } |
647 | } | 642 | } |
648 | 643 | ||
649 | if (!empty($updateDB)) { | 644 | if ($newThumbnailsCpt > 0) { |
650 | $LINKSDB->save($conf->get('resource.page_cache')); | 645 | $LINKSDB->save($conf->get('resource.page_cache')); |
651 | } | 646 | } |
652 | 647 | ||
@@ -1619,11 +1614,9 @@ function buildLinkList($PAGE, $LINKSDB, $conf, $pluginManager, $loginManager) | |||
1619 | if ($conf->get('thumbnails.enabled') && $link['url'][0] != '?' | 1614 | if ($conf->get('thumbnails.enabled') && $link['url'][0] != '?' |
1620 | && (! isset($link['thumbnail']) || ($link['thumbnail'] !== false && ! is_file($link['thumbnail']))) | 1615 | && (! isset($link['thumbnail']) || ($link['thumbnail'] !== false && ! is_file($link['thumbnail']))) |
1621 | ) { | 1616 | ) { |
1622 | $link['thumbnail'] = $thumbnailer->get($link['url']); | 1617 | $elem = $LINKSDB[$keys[$i]]; |
1623 | // FIXME! we really need to get rid of ArrayAccess... | 1618 | $elem['thumbnail'] = $thumbnailer->get($link['url']); |
1624 | $item = $LINKSDB[$keys[$i]]; | 1619 | $LINKSDB[$keys[$i]] = $elem; |
1625 | $item['thumbnail'] = $link['thumbnail']; | ||
1626 | $LINKSDB[$keys[$i]] = $item; | ||
1627 | $updateDB = true; | 1620 | $updateDB = true; |
1628 | } | 1621 | } |
1629 | 1622 | ||
diff --git a/tests/ThumbnailerTest.php b/tests/ThumbnailerTest.php index db109321..c04b8fb5 100644 --- a/tests/ThumbnailerTest.php +++ b/tests/ThumbnailerTest.php | |||
@@ -1,7 +1,10 @@ | |||
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | require_once 'application/Thumbnailer.php'; | 3 | namespace Shaarli; |
4 | require_once 'application/config/ConfigManager.php'; | 4 | |
5 | use PHPUnit\Framework\TestCase; | ||
6 | use Shaarli\Config\ConfigManager; | ||
7 | use WebThumbnailer\Application\ConfigManager as WTConfigManager; | ||
5 | 8 | ||
6 | /** | 9 | /** |
7 | * Class ThumbnailerTest | 10 | * Class ThumbnailerTest |
@@ -11,31 +14,48 @@ require_once 'application/config/ConfigManager.php'; | |||
11 | * 1. the thumbnailer library is itself tested | 14 | * 1. the thumbnailer library is itself tested |
12 | * 2. we don't want to make too many external requests during the tests | 15 | * 2. we don't want to make too many external requests during the tests |
13 | */ | 16 | */ |
14 | class ThumbnailerTest extends PHPUnit_Framework_TestCase | 17 | class ThumbnailerTest extends TestCase |
15 | { | 18 | { |
19 | const WIDTH = 190; | ||
20 | |||
21 | const HEIGHT = 210; | ||
22 | |||
16 | /** | 23 | /** |
17 | * Test a thumbnail with a custom size. | 24 | * @var Thumbnailer; |
18 | */ | 25 | */ |
19 | public function testThumbnailValid() | 26 | protected $thumbnailer; |
27 | |||
28 | public function setUp() | ||
20 | { | 29 | { |
21 | $conf = new ConfigManager('tests/utils/config/configJson'); | 30 | $conf = new ConfigManager('tests/utils/config/configJson'); |
22 | $width = 200; | 31 | $conf->set('thumbnails.width', self::WIDTH); |
23 | $height = 200; | 32 | $conf->set('thumbnails.height', self::HEIGHT); |
24 | $conf->set('thumbnails.width', $width); | 33 | $conf->set('dev.debug', true); |
25 | $conf->set('thumbnails.height', $height); | 34 | |
35 | $this->thumbnailer = new Thumbnailer($conf); | ||
36 | // cache files in the sandbox | ||
37 | WTConfigManager::addFile('tests/utils/config/wt.json'); | ||
38 | } | ||
39 | |||
40 | public function tearDown() | ||
41 | { | ||
42 | $this->rrmdirContent('sandbox/'); | ||
43 | } | ||
26 | 44 | ||
27 | $thumbnailer = new Thumbnailer($conf); | 45 | /** |
28 | $thumb = $thumbnailer->get('https://github.com/shaarli/Shaarli/'); | 46 | * Test a thumbnail with a custom size. |
47 | */ | ||
48 | public function testThumbnailValid() | ||
49 | { | ||
50 | $thumb = $this->thumbnailer->get('https://github.com/shaarli/Shaarli/'); | ||
29 | $this->assertNotFalse($thumb); | 51 | $this->assertNotFalse($thumb); |
30 | $image = imagecreatefromstring(file_get_contents($thumb)); | 52 | $image = imagecreatefromstring(file_get_contents($thumb)); |
31 | $this->assertEquals($width, imagesx($image)); | 53 | $this->assertEquals(self::WIDTH, imagesx($image)); |
32 | $this->assertEquals($height, imagesy($image)); | 54 | $this->assertEquals(self::HEIGHT, imagesy($image)); |
33 | } | 55 | } |
34 | 56 | ||
35 | /** | 57 | /** |
36 | * Test a thumbnail that can't be retrieved. | 58 | * Test a thumbnail that can't be retrieved. |
37 | * | ||
38 | * @expectedException WebThumbnailer\Exception\ThumbnailNotFoundException | ||
39 | */ | 59 | */ |
40 | public function testThumbnailNotValid() | 60 | public function testThumbnailNotValid() |
41 | { | 61 | { |
@@ -48,4 +68,18 @@ class ThumbnailerTest extends PHPUnit_Framework_TestCase | |||
48 | 68 | ||
49 | ini_set('error_log', $oldlog); | 69 | ini_set('error_log', $oldlog); |
50 | } | 70 | } |
71 | |||
72 | protected function rrmdirContent($dir) { | ||
73 | if (is_dir($dir)) { | ||
74 | $objects = scandir($dir); | ||
75 | foreach ($objects as $object) { | ||
76 | if ($object != "." && $object != "..") { | ||
77 | if (is_dir($dir."/".$object)) | ||
78 | $this->rrmdirContent($dir."/".$object); | ||
79 | else | ||
80 | unlink($dir."/".$object); | ||
81 | } | ||
82 | } | ||
83 | } | ||
84 | } | ||
51 | } | 85 | } |
diff --git a/tests/Updater/UpdaterTest.php b/tests/Updater/UpdaterTest.php index 94e3c7d3..8b90fd5e 100644 --- a/tests/Updater/UpdaterTest.php +++ b/tests/Updater/UpdaterTest.php | |||
@@ -684,4 +684,19 @@ $GLOBALS[\'privateLinkByDefault\'] = true;'; | |||
684 | $this->assertEquals(4194304, $this->conf->get('general.download_max_size')); | 684 | $this->assertEquals(4194304, $this->conf->get('general.download_max_size')); |
685 | $this->assertEquals(3, $this->conf->get('general.download_timeout')); | 685 | $this->assertEquals(3, $this->conf->get('general.download_timeout')); |
686 | } | 686 | } |
687 | |||
688 | /** | ||
689 | * Test updateMethodAtomDefault with show_atom set to true. | ||
690 | * => nothing to do | ||
691 | */ | ||
692 | public function testUpdateMethodWebThumbnailerEnabled() | ||
693 | { | ||
694 | $this->conf->set('thumbnail.enable_thumbnails', true); | ||
695 | $updater = new Updater([], [], $this->conf, true); | ||
696 | $this->assertTrue($updater->updateMethodWebThumbnailer()); | ||
697 | $this->assertFalse($this->conf->exists('thumbnail')); | ||
698 | $this->assertTrue($this->conf->get('thumbnails.enabled')); | ||
699 | $this->assertEquals(125, $this->conf->get('thumbnails.width')); | ||
700 | $this->assertEquals(90, $this->conf->get('thumbnails.height')); | ||
701 | } | ||
687 | } | 702 | } |
diff --git a/tests/utils/config/configJson.json.php b/tests/utils/config/configJson.json.php index 3101b225..061d4c28 100644 --- a/tests/utils/config/configJson.json.php +++ b/tests/utils/config/configJson.json.php | |||
@@ -1,38 +1,84 @@ | |||
1 | <?php /* | 1 | <?php /* |
2 | { | 2 | { |
3 | "credentials": { | 3 | "credentials": { |
4 | "login":"root", | 4 | "login": "root", |
5 | "hash":"hash", | 5 | "hash": "hash", |
6 | "salt":"salt" | 6 | "salt": "salt" |
7 | }, | 7 | }, |
8 | "security": { | 8 | "security": { |
9 | "session_protection_disabled":false | 9 | "session_protection_disabled": false, |
10 | "ban_after": 4, | ||
11 | "ban_duration": 1800, | ||
12 | "open_shaarli": false, | ||
13 | "allowed_protocols": [ | ||
14 | "ftp", | ||
15 | "ftps", | ||
16 | "magnet" | ||
17 | ] | ||
10 | }, | 18 | }, |
11 | "general": { | 19 | "general": { |
12 | "timezone":"Europe\/Paris", | 20 | "timezone": "Europe\/Paris", |
13 | "title": "Shaarli", | 21 | "title": "Shaarli", |
14 | "header_link": "?" | 22 | "header_link": "?", |
23 | "links_per_page": 20, | ||
24 | "enabled_plugins": [ | ||
25 | "qrcode" | ||
26 | ], | ||
27 | "default_note_title": "Note: " | ||
15 | }, | 28 | }, |
16 | "privacy": { | 29 | "privacy": { |
17 | "default_private_links":true | 30 | "default_private_links": true, |
31 | "hide_public_links": false, | ||
32 | "force_login": false, | ||
33 | "hide_timestamps": false, | ||
34 | "remember_user_default": true | ||
18 | }, | 35 | }, |
19 | "redirector": { | 36 | "redirector": { |
20 | "url":"lala" | 37 | "url": "lala", |
38 | "encode_url": true | ||
21 | }, | 39 | }, |
22 | "config": { | 40 | "config": { |
23 | "foo": "bar" | 41 | "foo": "bar" |
24 | }, | 42 | }, |
25 | "resource": { | 43 | "resource": { |
26 | "datastore": "tests\/utils\/config\/datastore.php", | 44 | "datastore": "tests\/utils\/config\/datastore.php", |
27 | "data_dir": "sandbox/", | 45 | "data_dir": "sandbox\/", |
28 | "raintpl_tpl": "tpl/" | 46 | "raintpl_tpl": "tpl\/", |
47 | "config": "data\/config.php", | ||
48 | "ban_file": "data\/ipbans.php", | ||
49 | "updates": "data\/updates.txt", | ||
50 | "log": "data\/log.txt", | ||
51 | "update_check": "data\/lastupdatecheck.txt", | ||
52 | "history": "data\/history.php", | ||
53 | "theme": "default", | ||
54 | "raintpl_tmp": "tmp\/", | ||
55 | "thumbnails_cache": "cache", | ||
56 | "page_cache": "pagecache" | ||
29 | }, | 57 | }, |
30 | "plugins": { | 58 | "plugins": { |
31 | "WALLABAG_VERSION": 1 | 59 | "WALLABAG_VERSION": 1 |
32 | }, | 60 | }, |
33 | "dev": { | 61 | "dev": { |
34 | "debug": true | 62 | "debug": true |
63 | }, | ||
64 | "thumbnails": { | ||
65 | "enabled": true, | ||
66 | "width": 125, | ||
67 | "height": 90 | ||
68 | }, | ||
69 | "updates": { | ||
70 | "check_updates": false, | ||
71 | "check_updates_branch": "stable", | ||
72 | "check_updates_interval": 86400 | ||
73 | }, | ||
74 | "feed": { | ||
75 | "rss_permalinks": true, | ||
76 | "show_atom": true | ||
77 | }, | ||
78 | "translation": { | ||
79 | "language": "auto", | ||
80 | "mode": "php", | ||
81 | "extensions": [] | ||
35 | } | 82 | } |
36 | } | 83 | } |
37 | */ ?> | 84 | */ ?> \ No newline at end of file |
38 | |||
diff --git a/tests/utils/config/wt.json b/tests/utils/config/wt.json new file mode 100644 index 00000000..69ce49a6 --- /dev/null +++ b/tests/utils/config/wt.json | |||
@@ -0,0 +1,12 @@ | |||
1 | { | ||
2 | "settings": { | ||
3 | "default": { | ||
4 | "_comment": "infinite cache", | ||
5 | "cache_duration": -1, | ||
6 | "timeout": 10 | ||
7 | }, | ||
8 | "path": { | ||
9 | "cache": "sandbox/" | ||
10 | } | ||
11 | } | ||
12 | } \ No newline at end of file | ||
diff --git a/tpl/default/configure.html b/tpl/default/configure.html index a63c7ad3..b91fc07e 100644 --- a/tpl/default/configure.html +++ b/tpl/default/configure.html | |||
@@ -242,6 +242,26 @@ | |||
242 | </div> | 242 | </div> |
243 | </div> | 243 | </div> |
244 | </div> | 244 | </div> |
245 | <div class="pure-g"> | ||
246 | <div class="pure-u-lg-{$ratioLabel} pure-u-{$ratioLabelMobile}"> | ||
247 | <div class="form-label"> | ||
248 | <label for="enableThumbnails"> | ||
249 | <span class="label-name">{'Enable thumbnails'|t}</span><br> | ||
250 | <span class="label-desc"> | ||
251 | {'Warning: '|t} | ||
252 | {'It\'s recommended to visit the picture wall after enabling this feature.'|t} | ||
253 | {'If you have a large database, the first retrieval may take a few minutes.'|t} | ||
254 | </span> | ||
255 | </label> | ||
256 | </div> | ||
257 | </div> | ||
258 | <div class="pure-u-lg-{$ratioInput} pure-u-{$ratioInputMobile}"> | ||
259 | <div class="form-input"> | ||
260 | <input type="checkbox" name="enableThumbnails" id="enableThumbnails" | ||
261 | {if="$thumbnails_enabled"}checked{/if}/> | ||
262 | </div> | ||
263 | </div> | ||
264 | </div> | ||
245 | <div class="center"> | 265 | <div class="center"> |
246 | <input type="submit" value="{'Save'|t}" name="save"> | 266 | <input type="submit" value="{'Save'|t}" name="save"> |
247 | </div> | 267 | </div> |
diff --git a/tpl/default/linklist.html b/tpl/default/linklist.html index 322cddd5..bf88e161 100644 --- a/tpl/default/linklist.html +++ b/tpl/default/linklist.html | |||
@@ -131,9 +131,17 @@ | |||
131 | 131 | ||
132 | <div class="linklist-item linklist-item{if="$value.class"} {$value.class}{/if}" data-id="{$value.id}"> | 132 | <div class="linklist-item linklist-item{if="$value.class"} {$value.class}{/if}" data-id="{$value.id}"> |
133 | <div class="linklist-item-title"> | 133 | <div class="linklist-item-title"> |
134 | {$thumb=thumbnail($value.url)} | 134 | {if="$thumbnails_enabled && !empty($value.thumbnail)"} |
135 | {if="$thumb!=false"} | 135 | <div class="linklist-item-thumbnail"> |
136 | <div class="linklist-item-thumbnail">{$thumb}</div> | 136 | <div class="thumbnail"> |
137 | <a href="{$value.real_url}"> | ||
138 | {ignore}RainTPL hack: put the 2 src on two different line to avoid path replace bug{/ignore} | ||
139 | <img data-src="{$value.thumbnail}#" class="b-lazy" | ||
140 | src="#" | ||
141 | alt="thumbnail" width="{$thumbnails_width}" height="{$thumbnails_height}" /> | ||
142 | </a> | ||
143 | </div> | ||
144 | </div> | ||
137 | {/if} | 145 | {/if} |
138 | 146 | ||
139 | {if="$is_logged_in"} | 147 | {if="$is_logged_in"} |
@@ -268,5 +276,6 @@ | |||
268 | </div> | 276 | </div> |
269 | 277 | ||
270 | {include="page.footer"} | 278 | {include="page.footer"} |
279 | <script src="js/thumbnails.min.js?v={$version_hash}"></script> | ||
271 | </body> | 280 | </body> |
272 | </html> | 281 | </html> |
diff --git a/tpl/default/page.header.html b/tpl/default/page.header.html index 82568d63..840e4352 100644 --- a/tpl/default/page.header.html +++ b/tpl/default/page.header.html | |||
@@ -30,9 +30,11 @@ | |||
30 | <li class="pure-menu-item" id="shaarli-menu-tags"> | 30 | <li class="pure-menu-item" id="shaarli-menu-tags"> |
31 | <a href="?do=tagcloud" class="pure-menu-link">{'Tag cloud'|t}</a> | 31 | <a href="?do=tagcloud" class="pure-menu-link">{'Tag cloud'|t}</a> |
32 | </li> | 32 | </li> |
33 | <li class="pure-menu-item" id="shaarli-menu-picwall"> | 33 | {if="$thumbnails_enabled"} |
34 | <a href="?do=picwall{$searchcrits}" class="pure-menu-link">{'Picture wall'|t}</a> | 34 | <li class="pure-menu-item" id="shaarli-menu-picwall"> |
35 | </li> | 35 | <a href="?do=picwall{$searchcrits}" class="pure-menu-link">{'Picture wall'|t}</a> |
36 | </li> | ||
37 | {/if} | ||
36 | <li class="pure-menu-item" id="shaarli-menu-daily"> | 38 | <li class="pure-menu-item" id="shaarli-menu-daily"> |
37 | <a href="?do=daily" class="pure-menu-link">{'Daily'|t}</a> | 39 | <a href="?do=daily" class="pure-menu-link">{'Daily'|t}</a> |
38 | </li> | 40 | </li> |
diff --git a/tpl/default/picwall.html b/tpl/default/picwall.html index 2f7e03dc..1ea9c20a 100644 --- a/tpl/default/picwall.html +++ b/tpl/default/picwall.html | |||
@@ -5,41 +5,53 @@ | |||
5 | </head> | 5 | </head> |
6 | <body> | 6 | <body> |
7 | {include="page.header"} | 7 | {include="page.header"} |
8 | {if="!$thumbnails_enabled"} | ||
9 | <div class="pure-g pure-alert pure-alert-warning page-single-alert"> | ||
10 | <div class="pure-u-1 center"> | ||
11 | {'Picture wall unavailable (thumbnails are disabled).'|t} | ||
12 | </div> | ||
13 | </div> | ||
14 | {else} | ||
15 | <div class="pure-g"> | ||
16 | <div class="pure-u-lg-1-6 pure-u-1-24"></div> | ||
17 | <div class="pure-u-lg-2-3 pure-u-22-24 page-form page-visitor"> | ||
18 | {$countPics=count($linksToDisplay)} | ||
19 | <h2 class="window-title">{'Picture Wall'|t} - {$countPics} {'pics'|t}</h2> | ||
8 | 20 | ||
9 | <div class="pure-g"> | 21 | <div id="plugin_zone_start_picwall" class="plugin_zone"> |
10 | <div class="pure-u-lg-1-6 pure-u-1-24"></div> | 22 | {loop="$plugin_start_zone"} |
11 | <div class="pure-u-lg-2-3 pure-u-22-24 page-form page-visitor"> | 23 | {$value} |
12 | {$countPics=count($linksToDisplay)} | 24 | {/loop} |
13 | <h2 class="window-title">{'Picture Wall'|t} - {$countPics} {'pics'|t}</h2> | 25 | </div> |
14 | |||
15 | <div id="plugin_zone_start_picwall" class="plugin_zone"> | ||
16 | {loop="$plugin_start_zone"} | ||
17 | {$value} | ||
18 | {/loop} | ||
19 | </div> | ||
20 | 26 | ||
21 | <div id="picwall_container" class="picwall-container"> | 27 | <div id="picwall_container" class="picwall-container"> |
22 | {loop="$linksToDisplay"} | 28 | {loop="$linksToDisplay"} |
23 | <div class="picwall-pictureframe"> | 29 | <div class="picwall_pictureframe"> |
24 | {$value.thumbnail}<a href="{$value.real_url}"><span class="info">{$value.title}</span></a> | 30 | {ignore}RainTPL hack: put the 2 src on two different line to avoid path replace bug{/ignore} |
25 | {loop="$value.picwall_plugin"} | 31 | <img data-src="{$value.thumbnail}#" class="b-lazy" |
26 | {$value} | 32 | src="#" |
27 | {/loop} | 33 | alt="thumbnail" width="{$thumbnails_width}" height="{$thumbnails_height}" /> |
28 | </div> | 34 | <a href="{$value.real_url}"><span class="info">{$value.title}</span></a> |
29 | {/loop} | 35 | {loop="$value.picwall_plugin"} |
30 | <div class="clear"></div> | 36 | {$value} |
31 | </div> | 37 | {/loop} |
38 | </div> | ||
39 | {/loop} | ||
40 | <div class="clear"></div> | ||
41 | </div> | ||
32 | 42 | ||
33 | <div id="plugin_zone_end_picwall" class="plugin_zone"> | 43 | <div id="plugin_zone_end_picwall" class="plugin_zone"> |
34 | {loop="$plugin_end_zone"} | 44 | {loop="$plugin_end_zone"} |
35 | {$value} | 45 | {$value} |
36 | {/loop} | 46 | {/loop} |
47 | </div> | ||
37 | </div> | 48 | </div> |
49 | <div class="pure-u-lg-1-6 pure-u-1-24"></div> | ||
38 | </div> | 50 | </div> |
39 | </div> | 51 | {/if} |
40 | 52 | ||
41 | {include="page.footer"} | 53 | {include="page.footer"} |
42 | <script src="js/picwall.min.js?v={$version_hash}"></script> | 54 | <script src="js/thumbnails.min.js?v={$version_hash}"></script> |
43 | </body> | 55 | </body> |
44 | </html> | 56 | </html> |
45 | 57 | ||
diff --git a/tpl/vintage/linklist.html b/tpl/vintage/linklist.html index 9bdafa8c..3f202849 100644 --- a/tpl/vintage/linklist.html +++ b/tpl/vintage/linklist.html | |||
@@ -154,6 +154,7 @@ | |||
154 | </div> | 154 | </div> |
155 | 155 | ||
156 | {include="page.footer"} | 156 | {include="page.footer"} |
157 | <script src="js/thumbnails.min.js"></script> | ||
157 | 158 | ||
158 | </body> | 159 | </body> |
159 | </html> | 160 | </html> |
diff --git a/tpl/vintage/picwall.html b/tpl/vintage/picwall.html index 2ac11ec2..5f1d266e 100644 --- a/tpl/vintage/picwall.html +++ b/tpl/vintage/picwall.html | |||
@@ -38,6 +38,6 @@ | |||
38 | 38 | ||
39 | {include="page.footer"} | 39 | {include="page.footer"} |
40 | 40 | ||
41 | <script src="js/picwall.min.js"></script> | 41 | <script src="js/thumbnails.min.js"></script> |
42 | </body> | 42 | </body> |
43 | </html> | 43 | </html> |
diff --git a/webpack.config.js b/webpack.config.js index 94b7aa70..1fc5d016 100644 --- a/webpack.config.js +++ b/webpack.config.js | |||
@@ -23,7 +23,7 @@ const extractCssVintage = new ExtractTextPlugin({ | |||
23 | module.exports = [ | 23 | module.exports = [ |
24 | { | 24 | { |
25 | entry: { | 25 | entry: { |
26 | picwall: './assets/common/js/picwall.js', | 26 | thumbnails: './assets/common/js/thumbnails.js', |
27 | pluginsadmin: './assets/default/js/plugins-admin.js', | 27 | pluginsadmin: './assets/default/js/plugins-admin.js', |
28 | shaarli: [ | 28 | shaarli: [ |
29 | './assets/default/js/base.js', | 29 | './assets/default/js/base.js', |
@@ -96,7 +96,7 @@ module.exports = [ | |||
96 | './assets/vintage/css/reset.css', | 96 | './assets/vintage/css/reset.css', |
97 | './assets/vintage/css/shaarli.css', | 97 | './assets/vintage/css/shaarli.css', |
98 | ].concat(glob.sync('./assets/vintage/img/*')), | 98 | ].concat(glob.sync('./assets/vintage/img/*')), |
99 | picwall: './assets/common/js/picwall.js', | 99 | thumbnails: './assets/common/js/thumbnails.js', |
100 | }, | 100 | }, |
101 | output: { | 101 | output: { |
102 | filename: '[name].min.js', | 102 | filename: '[name].min.js', |