diff --git a/CHANGELOG b/CHANGELOG
index 778a9df..493e9e6 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,9 @@
Revision history for Lutim
+0.11.1 2018-07-30
+ - Add upload_enabled info to server infos endpoint
+ - Add log message when failing to render an image
+
0.11.0 2018-07-29
- Allow to install only needed deps
- Notification when copying to clipboard or deleting images
diff --git a/lib/Lutim/Controller/Image.pm b/lib/Lutim/Controller/Image.pm
index 2bfbbac..e3bbc62 100644
--- a/lib/Lutim/Controller/Image.pm
+++ b/lib/Lutim/Controller/Image.pm
@@ -81,6 +81,7 @@ sub infos {
default_delay => $c->config('default_delay'),
max_delay => $c->config('max_delay'),
always_encrypt => ($c->config('always_encrypt')) ? true : false,
+ upload_enabled => ($c->app->stop_upload()) ? false : true,
}
);
}
@@ -647,6 +648,8 @@ sub short {
$c->delete_image($image);
}
});
+ } else {
+ $c->app->log->error('[ERROR] Can\'t render '.$image->short);
}
} elsif ($image->path && !$image->enabled) {
# Log access try
diff --git a/t/test.t b/t/test.t
index 00850b0..b8aeb18 100644
--- a/t/test.t
+++ b/t/test.t
@@ -88,7 +88,8 @@ $t->get_ok('/infos')
'/contact' => 'John Doe, admin[at]example.com',
'/default_delay' => 30,
'/max_delay' => 200,
- '/max_file_size' => 1048576
+ '/max_file_size' => 1048576,
+ '/upload_enabled' => true
);
# Post image
diff --git a/themes/default/lib/Lutim/I18N/lutim.pot b/themes/default/lib/Lutim/I18N/lutim.pot
index 28440d5..c4851dd 100644
--- a/themes/default/lib/Lutim/I18N/lutim.pot
+++ b/themes/default/lib/Lutim/I18N/lutim.pot
@@ -52,7 +52,7 @@ msgstr ""
msgid "Active images"
msgstr ""
-#: lib/Lutim/Controller/Image.pm:327
+#: lib/Lutim/Controller/Image.pm:328
msgid "An error occured while downloading the image."
msgstr ""
@@ -212,7 +212,7 @@ msgstr ""
msgid "Image deleted"
msgstr ""
-#: lib/Lutim/Controller/Image.pm:753
+#: lib/Lutim/Controller/Image.pm:756
msgid "Image not found."
msgstr ""
@@ -362,7 +362,7 @@ msgid "Something bad happened"
msgstr ""
#. ($c->config('contact')
-#: lib/Lutim/Controller/Image.pm:760
+#: lib/Lutim/Controller/Image.pm:763
msgid "Something went wrong when creating the zip file. Try again later or contact the administrator (%1)."
msgstr ""
@@ -386,7 +386,7 @@ msgstr ""
msgid "The Lutim software is a free software, which allows you to download and install it on you own server. Have a look at the AGPL to see what you can do."
msgstr ""
-#: lib/Lutim/Controller/Image.pm:346
+#: lib/Lutim/Controller/Image.pm:347
msgid "The URL is not valid."
msgstr ""
@@ -398,19 +398,19 @@ msgstr ""
msgid "The data has been successfully imported."
msgstr ""
-#: lib/Lutim/Controller/Image.pm:159 lib/Lutim/Controller/Image.pm:227
+#: lib/Lutim/Controller/Image.pm:160 lib/Lutim/Controller/Image.pm:228
msgid "The delete token is invalid."
msgstr ""
#. ($upload->filename)
-#: lib/Lutim/Controller/Image.pm:487
+#: lib/Lutim/Controller/Image.pm:488
msgid "The file %1 is not an image."
msgstr ""
#. ($tx->res->max_message_size)
#. ($c->req->max_message_size)
#. (config('max_file_size')
-#: lib/Lutim/Controller/Image.pm:310 lib/Lutim/Controller/Image.pm:379 themes/default/templates/partial/lutim.js.ep:249
+#: lib/Lutim/Controller/Image.pm:311 lib/Lutim/Controller/Image.pm:380 themes/default/templates/partial/lutim.js.ep:249
msgid "The file exceed the size limit (%1)"
msgstr ""
@@ -419,16 +419,16 @@ msgid "The graph's datas are not updated in real-time."
msgstr ""
#. ($image->filename)
-#: lib/Lutim/Controller/Image.pm:229
+#: lib/Lutim/Controller/Image.pm:230
msgid "The image %1 has already been deleted."
msgstr ""
#. ($image->filename)
-#: lib/Lutim/Controller/Image.pm:238 lib/Lutim/Controller/Image.pm:243
+#: lib/Lutim/Controller/Image.pm:239 lib/Lutim/Controller/Image.pm:244
msgid "The image %1 has been successfully deleted"
msgstr ""
-#: lib/Lutim/Controller/Image.pm:167
+#: lib/Lutim/Controller/Image.pm:168
msgid "The image's delay has been successfully modified"
msgstr ""
@@ -445,7 +445,7 @@ msgid "There is XXXX image(s) in the gallery"
msgstr ""
#. ($c->config->{contact})
-#: lib/Lutim/Controller/Image.pm:484
+#: lib/Lutim/Controller/Image.pm:485
msgid "There is no more available URL. Retry or contact the administrator. %1"
msgstr ""
@@ -470,15 +470,15 @@ msgid "Unable to copy to clipboard"
msgstr ""
#. ($short)
-#: lib/Lutim/Controller/Image.pm:107 lib/Lutim/Controller/Image.pm:201 lib/Lutim/Controller/Image.pm:272
+#: lib/Lutim/Controller/Image.pm:108 lib/Lutim/Controller/Image.pm:202 lib/Lutim/Controller/Image.pm:273
msgid "Unable to find the image %1."
msgstr ""
-#: lib/Lutim/Controller/Image.pm:573 lib/Lutim/Controller/Image.pm:618 lib/Lutim/Controller/Image.pm:657 lib/Lutim/Controller/Image.pm:700 lib/Lutim/Controller/Image.pm:712 lib/Lutim/Controller/Image.pm:723 lib/Lutim/Controller/Image.pm:750 lib/Lutim/Plugin/Helpers.pm:88
+#: lib/Lutim/Controller/Image.pm:574 lib/Lutim/Controller/Image.pm:619 lib/Lutim/Controller/Image.pm:660 lib/Lutim/Controller/Image.pm:703 lib/Lutim/Controller/Image.pm:715 lib/Lutim/Controller/Image.pm:726 lib/Lutim/Controller/Image.pm:753 lib/Lutim/Plugin/Helpers.pm:88
msgid "Unable to find the image: it has been deleted."
msgstr ""
-#: lib/Lutim/Controller/Image.pm:144
+#: lib/Lutim/Controller/Image.pm:145
msgid "Unable to get counter"
msgstr ""