com web/php: Removes possibility to add CfP AND conference: bin/createNewsEntry
| From: | Eli White | Date: | Fri, 09 Oct 2015 19:12:33 +0000 |
| Subject: | com web/php: Removes possibility to add CfP AND conference: bin/createNewsEntry | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-25676@lists.php.net to get a copy of this message | ||
Commit: 589a30929bdf929d3c274e5e955d195d56026fb7
Author: Andreas Heigl <andreas@heigl.org> Fri, 9 Oct 2015 21:12:33 +0200
Parents: cb31387978bd6e4f294f1207dc81a023d46a621f
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=589a30929bdf929d3c274e5e955d195d56026fb7
Log:
Removes possibility to add CfP AND conference
This commit eliminates the possibility to add a conference AND a CfP in
one news. If you want to create both you will then have to create two
separate news. This makes it easier to get informations regarding CfP
and Conferences separate from one another
Changed paths:
M bin/createNewsEntry
Diff:
diff --git a/bin/createNewsEntry b/bin/createNewsEntry
index f639dac..4b3b4c0 100755
--- a/bin/createNewsEntry
+++ b/bin/createNewsEntry
@@ -49,7 +49,7 @@ $categories = array(
array("frontpage" => "PHP.net frontpage news"),
array("releases" => "New PHP release"),
array("conferences" => "Conference announcement"),
- array("cfp" => "Call for Papers"),
+ array("cfp " => "Call for Papers"),
);
$confs = array(2, 3);
@@ -61,11 +61,18 @@ do {
fwrite(STDOUT, "Please select appropriate categories, seperated with space: ");
$cat = explode(" ", rtrim(fgets(STDIN)));
+ $cat = array_intersect(array_keys(array_values($categories)), $cat);
- if ($cat) {
+ $intersect = array_intersect(array(2,3), $cat);
+ if ($cat && (count($intersect) < 2)) {
break;
}
- fwrite(STDERR, "You have to pick at least one category\n");
+
+ if (count($intersect) == 2) {
+ fwrite(STDERR, "Pick either a CfP OR a conference\n");
+ } else {
+ fwrite(STDERR, "You have to pick at least one category\n");
+ }
} while(1);