Skip to content

Commit

Permalink
webp를 지원하지 않는 서버에서 경고 문구를 출력함
Browse files Browse the repository at this point in the history
  • Loading branch information
Cloud User committed Jul 24, 2021
1 parent d76b371 commit 3f97138
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions adm/config_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -1530,4 +1530,13 @@ function fconfigform_submit(f)
}
}

if (stripos($config['cf_image_extension'], "webp") !== false) {
if (!file_exists("imagewebp")) {
echo '<script>'.PHP_EOL;
echo 'alert("이 서버는 webp 이미지를 지원하고 있지 않습니다.\n이미지 업로드 확장자에서 webp 확장자를 제거해 주십시오.\n제거하지 않으면 이미지와 관련된 오류가 발생할 수 있습니다.");'.PHP_EOL;
echo 'document.getElementById("cf_image_extension").focus();'.PHP_EOL;
echo '</script>'.PHP_EOL;
}
}

include_once ('./admin.tail.php');

0 comments on commit 3f97138

Please sign in to comment.