Fixes thumbnail regeneration, only a problem with proper execution order
This commit is contained in:
Garvin Hicking 2014-06-25 13:22:39 +02:00
parent 6b1b4f2448
commit 63f7510ebd
3 changed files with 8 additions and 5 deletions

@ -4,6 +4,8 @@
Version 2.0-beta3 ()
------------------------------------------------------------------------
* Fixed thumbnail recreation, Issue #134
* Merged external JS libraries into a central "plugins.js" of the 2k11
backend template, can be updated through
templates/2k11/admin/js/gruntipity.php helper script.

@ -30,10 +30,6 @@ switch ($serendipity['GET']['adminAction']) {
}
@ignore_user_abort();
$i = serendipity_syncThumbs($deleteThumbs);
$data['print_SYNC_DONE'] = sprintf(SYNC_DONE, $i);
flush();
$deleteThumbs = false;
if (isset($serendipity['POST']['deleteThumbs'])) {
switch ($serendipity['POST']['deleteThumbs'])
@ -47,6 +43,10 @@ switch ($serendipity['GET']['adminAction']) {
}
}
$i = serendipity_syncThumbs($deleteThumbs);
$data['print_SYNC_DONE'] = sprintf(SYNC_DONE, $i);
flush();
$i = serendipity_generateThumbs();
$data['print_RESIZE_DONE'] = sprintf(RESIZE_DONE, $i);
flush();

@ -832,7 +832,7 @@ function serendipity_generateThumbs() {
echo "\n" . '<ul class="serendipityFileList">' . "\n";
$msg_printed = true;
}
echo '<li>' . $sThumb . ': ' . $returnsize[0] . 'x' . $returnsize[1] . "</li>\n";
echo '<li>' . $sThumb . ': ' . $returnsize['width'] . 'x' . $returnsize['height'] . "</li>\n";
if (!file_exists($newThumb)) {
printf('<li><span class="msg_error"><span class="icon-attention"></span> ' . THUMBNAIL_FAILED_COPY . '</span></li>' . "\n", $sThumb);
} else {
@ -1097,6 +1097,7 @@ function serendipity_syncThumbs($deleteThumbs = false) {
$files = serendipity_fetchImages();
$fcount = count($files);
for ($x = 0; $x < $fcount; $x++) {
$update = array();
$f = serendipity_parseFileName($files[$x]);