1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

Improve prompts in createNewsEntry script (#1516)

This commit is contained in:
natsuki ueda
2025-11-04 11:44:46 +09:00
committed by GitHub
parent b0c6afa372
commit 812eed591b

View File

@@ -107,7 +107,7 @@ function getConfTime(): int { for(;;) {
function getImage(): ?array {
global $imageRestriction;
fwrite(STDOUT, "Will a picture be accompanying this entry? ");
fwrite(STDOUT, "Will a picture be accompanying this entry?(y/N) ");
$yn = fgets(STDIN);
@@ -129,7 +129,7 @@ function getImage(): ?array {
$imageSizes = getimagesize("./images/news/$path");
if (($imageSizes[0] > $imageRestriction['width']) || ($imageSizes[1] > $imageRestriction['height'])) {
fwrite(STDOUT, "Provided image has a higher size than recommended (" . implode(' by ', $imageRestriction) . "). Continue? ");
fwrite(STDOUT, "Provided image has a higher size than recommended (" . implode(' by ', $imageRestriction) . "). Continue with this image?(y/N) ");
$ynImg = fgets(STDIN);
if (strtoupper($ynImg[0]) !== "Y") {
$isValidImage = false;