[web-php] master: Improve prompts in createNewsEntry script (#1516)
| From: | natsuki ueda via GitHub | Date: | Tue, 04 Nov 2025 02:44:49 +0000 |
| Subject: | [web-php] master: Improve prompts in createNewsEntry script (#1516) | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-33300@lists.php.net to get a copy of this message | ||
Author: natsuki ueda (natsuki-engr)
Committer: GitHub (web-flow)
Pusher: sy-records
Date: 2025-11-04T10:44:46+08:00
Commit: https://github.com/php/web-php/commit/812eed591b0c7ea263a66a2859e0dfcbd44986cc
Raw diff: https://github.com/php/web-php/commit/812eed591b0c7ea263a66a2859e0dfcbd44986cc.diff
Improve prompts in createNewsEntry script (#1516)
Changed paths:
M bin/createNewsEntry
Diff:
diff --git a/bin/createNewsEntry b/bin/createNewsEntry
index 8f695494e8..937330218a 100755
--- a/bin/createNewsEntry
+++ b/bin/createNewsEntry
@@ -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;