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

Merge branch 'pr/83' - Adds the fix to the conference script disallowing a CfP and Conference announcement to be made at the same time.

This commit is contained in:
Eli White
2017-03-16 08:26:43 -04:00

View File

@@ -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);