1
0

Proper error messages, layout and button states for rebuilding thumbs.

This commit is contained in:
Matthias Mees
2013-02-18 14:28:14 +01:00
parent cc0c879538
commit 991266a50c
2 changed files with 4 additions and 3 deletions

View File

@ -5,6 +5,7 @@
<span class="msg_notice"><span class="icon-info-circle"></span> {$CONST.PREFERENCE_USE_JS_WARNING}</span>
{/if}
{if $case_sync}
<h2>{$CONST.CREATE_THUMBS}</h2>
{if !$perm_adminImagesSync}
<span class="msg_error"><span class="icon-attention"></span> {$CONST.PERM_DENIED}</span>
{else}
@ -34,7 +35,7 @@
<div class="form_buttons">
<input name="doSync" type="submit" value="{$CONST.CREATE_THUMBS}">
<a href="serendipity_admin.php" class="button_link icon_link">{$CONST.ABORT_NOW}</a>
<a href="serendipity_admin.php" class="button_link state_cancel">{$CONST.ABORT_NOW}</a>
</div>
</form>
{/if}

View File

@ -1098,7 +1098,7 @@ function serendipity_syncThumbs($deleteThumbs = false) {
$f = serendipity_parseFileName($files[$x]);
if (empty($f[1]) || $f[1] == $files[$x]) {
// No extension means bad file most probably. Skip it.
printf(SKIPPING_FILE_EXTENSION . '<br />', $files[$x]);
printf('<span class="msg_error"><span class="icon-attention"></span> ' . SKIPPING_FILE_EXTENSION . '</span>', $files[$x]);
continue;
}
@ -1112,7 +1112,7 @@ function serendipity_syncThumbs($deleteThumbs = false) {
}
if (!is_readable($ffull) || filesize($ffull) == 0) {
printf(SKIPPING_FILE_UNREADABLE . '<br />', $files[$x]);
printf('<span class="msg_error"><span class="icon-attention"></span> ' . SKIPPING_FILE_UNREADABLE . '</span>', $files[$x]);
continue;
}