Skip to content

Commit

Permalink
Qrequest: Handle arrays differently.
Browse files Browse the repository at this point in the history
* Don't dynamically create properties. This is more robust to users who
  supply names like ____VAR____ as a surprise. Also, PHP is going
  to discourage dynamic properties.
* Add get(), set(), has(), get_a(), set_a(), has_a().
* Remove allow_a().
  • Loading branch information
kohler committed Dec 16, 2021
1 parent 3ce3f5c commit 44ed524
Show file tree
Hide file tree
Showing 10 changed files with 163 additions and 168 deletions.
1 change: 0 additions & 1 deletion autoassign.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
}

// PC selection
$Qreq->allow_a("pap", "p");
if (!isset($Qreq->has_pcc) && isset($Qreq->pcs)) {
$Qreq->has_pcc = true;
foreach (preg_split('/\s+/', $Qreq->pcs) as $n) {
Expand Down
24 changes: 12 additions & 12 deletions bulkassign.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,18 +212,18 @@ function complete_assignment($qreq, $callback) {

echo '<div id="foldoptions" class="lg foldc fold2c fold3c"><label>',
'Default action:&nbsp; ',
Ht::select("default_action", array("guess" => "guess from input",
"primary" => "assign primary reviews",
"secondary" => "assign secondary reviews",
"pcreview" => "assign optional PC reviews",
"metareview" => "assign metareviews",
"review" => "assign external reviews",
"conflict" => "assign PC conflicts",
"lead" => "assign discussion leads",
"shepherd" => "assign shepherds",
"settag" => "set tags",
"preference" => "set reviewer preferences"),
$Qreq->get("default_action", "guess"),
Ht::select("default_action", ["guess" => "guess from input",
"primary" => "assign primary reviews",
"secondary" => "assign secondary reviews",
"pcreview" => "assign optional PC reviews",
"metareview" => "assign metareviews",
"review" => "assign external reviews",
"conflict" => "assign PC conflicts",
"lead" => "assign discussion leads",
"shepherd" => "assign shepherds",
"settag" => "set tags",
"preference" => "set reviewer preferences"],
$Qreq->default_action ?? "guess",
["id" => "tsel"]),
'</label>';
Ht::stash_script('$(function(){
Expand Down
Loading

0 comments on commit 44ed524

Please sign in to comment.