Skip to content

Commit

Permalink
Override_exists_condition is better than ioptions for topics existence.
Browse files Browse the repository at this point in the history
  • Loading branch information
kohler committed Sep 29, 2023
1 parent 1751e40 commit a08a860
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/paperoptionlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,12 @@ static function make_intrinsic_json_map(Conf $conf, $vconf, $all) {
if (($xv = $vconf->opt("maxAuthors") ?? 0) > 0) {
$map[PaperOption::AUTHORSID]->max = $xv;
}
if (!$vconf->setting("has_topics")) {
$map[PaperOption::TOPICSID]->exists_if = "NONE";
} else {
$xv = $vconf->setting("topic_min");
$xv1 = $vconf->setting("topic_max");
if ($xv > 0 || $xv1 > 0) {
$map[PaperOption::TOPICSID]->min = $xv;
$map[PaperOption::TOPICSID]->max = $xv1;
$map[PaperOption::TOPICSID]->required = $xv > 0;
}
$xv = $vconf->setting("topic_min");
$xv1 = $vconf->setting("topic_max");
if ($xv > 0 || $xv1 > 0) {
$map[PaperOption::TOPICSID]->min = $xv;
$map[PaperOption::TOPICSID]->max = $xv1;
$map[PaperOption::TOPICSID]->required = $xv > 0;
}
$xv = $vconf->setting("sub_pcconf");
$xv1 = $vconf->setting("sub_pcconfsel");
Expand Down

0 comments on commit a08a860

Please sign in to comment.