2 Commits
0.11 ... 0.11.1

Author SHA1 Message Date
Luc Didry
85d0aabef8 Add upload_enabled info to server infos endpoint 2018-07-30 13:45:48 +02:00
Luc Didry
da8a0642ec Fix year_disabled_in_month_pct stat 2018-07-30 13:36:24 +02:00
5 changed files with 24 additions and 16 deletions

View File

@@ -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

View File

@@ -126,7 +126,7 @@ sub run {
disabled => $year_disabled
};
my $year_disabled_in_month_pct = ($year_enabled != 0) ? " (".sprintf('%.2f', $year_disabled_in_month/$year_enabled)."%)" : '';
my $year_disabled_in_month_pct = ($year_enabled != 0) ? " (".sprintf('%.2f', 100*$year_disabled_in_month/$year_enabled)."%)" : '';
$raw->append_content("\n<tr><td><%= \$raw[4] %></td><td>".$unlimited_enabled."</td><td>".$unlimited_disabled."</td><td>ø</td></tr>\n");
$raw->append_content("<tr><td><%= \$raw[5] %></td><td>".$day_enabled."</td><td>".$day_disabled."</td><td>".$day_enabled." (100%)</td></tr>\n");

View File

@@ -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

View File

@@ -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

View File

@@ -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 <a href=\"http://en.wikipedia.org/wiki/Free_software\">free software</a>, which allows you to download and install it on you own server. Have a look at the <a href=\"https://www.gnu.org/licenses/agpl-3.0.html\">AGPL</a> 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 ""