Skip to content
Permalink
Browse files

Braces.

  • Loading branch information
kohler committed Dec 8, 2019
1 parent ed1edb6 commit b78edf507c79ed8b51e518aa2938c745ce3f7168
Showing with 129 additions and 79 deletions.
  1. +6 −3 help.php
  2. +19 −11 settings.php
  3. +95 −59 src/conference.php
  4. +9 −6 src/help/h_bulkassign.php
@@ -9,14 +9,17 @@
"etc/helptopics.json"
], $Conf->opt("helpTopics"));

if (!$Qreq->t && preg_match(',\A/(\w+)\z,i', Navigation::path()))
if (!$Qreq->t && preg_match(',\A/(\w+)\z,i', Navigation::path())) {
$Qreq->t = substr(Navigation::path(), 1);
}
$topic = $Qreq->t ? : "topics";
$want_topic = $help_topics->canonical_group($topic);
if (!$want_topic)
if (!$want_topic) {
$want_topic = "topics";
if ($want_topic !== $topic)
}
if ($want_topic !== $topic) {
$Conf->self_redirect($Qreq, ["t" => $want_topic]);
}
$topicj = $help_topics->get($topic);

$Conf->header("Help", "help", ["title_div" => '<hr class="c">', "body_class" => "leftmenu"]);
@@ -3,33 +3,39 @@
// Copyright (c) 2006-2019 Eddie Kohler; see LICENSE.

require_once("src/initweb.php");
if (!$Me->privChair)
if (!$Me->privChair) {
$Me->escape();
}

$Sv = SettingValues::make_request($Me, $Qreq);
$Sv->session_highlight();

function choose_setting_group($qreq, SettingValues $sv) {
global $Conf, $Me;
$req_group = $qreq->group;
if (!$req_group && preg_match(',\A/\w+\z,', Navigation::path()))
if (!$req_group && preg_match(',\A/\w+\z,', Navigation::path())) {
$req_group = substr(Navigation::path(), 1);
}
$want_group = $req_group;
if (!$want_group && isset($_SESSION["sg"])) // NB not conf-specific session, global
if (!$want_group && isset($_SESSION["sg"])) { // NB not conf-specific session, global
$want_group = $_SESSION["sg"];
}
$want_group = $sv->canonical_group($want_group);
if (!$want_group || !$sv->is_titled_group($want_group)) {
if ($sv->conf->can_some_author_view_review())
if ($sv->conf->can_some_author_view_review()) {
$want_group = $sv->canonical_group("decisions");
else if ($sv->conf->deadlinesAfter("sub_sub") || $sv->conf->time_review_open())
} else if ($sv->conf->deadlinesAfter("sub_sub") || $sv->conf->time_review_open()) {
$want_group = $sv->canonical_group("reviews");
else
} else {
$want_group = $sv->canonical_group("sub");
}
}
if (!$want_group)
if (!$want_group) {
$Me->escape();
if ($want_group !== $req_group && !$qreq->post && $qreq->post_empty())
}
if ($want_group !== $req_group && !$qreq->post && $qreq->post_empty()) {
$Conf->self_redirect($qreq, ["group" => $want_group, "anchor" => $sv->group_anchorid($req_group)]);
}
$sv->mark_interesting_group($want_group);
return $want_group;
}
@@ -47,8 +53,9 @@ function choose_setting_group($qreq, SettingValues $sv) {
$Conf->self_redirect($Qreq);
}
}
if (isset($Qreq->cancel) && $Qreq->post_ok())
if (isset($Qreq->cancel) && $Qreq->post_ok()) {
$Conf->self_redirect($Qreq);
}

$Sv->crosscheck();

@@ -62,11 +69,12 @@ function choose_setting_group($qreq, SettingValues $sv) {

echo '<div class="leftmenu-left"><div class="leftmenu-menu"><h1 class="leftmenu">Settings</h1><div class="leftmenu-list">';
foreach ($group_titles as $name => $title) {
if ($name === $Group)
if ($name === $Group) {
echo '<div class="leftmenu-item active">', $title, '</div>';
else
} else {
echo '<div class="leftmenu-item ui js-click-child">',
'<a href="', hoturl("settings", "group={$name}"), '">', $title, '</a></div>';
}
}
echo '</div><div class="leftmenu-if-left if-alert mt-5">',
Ht::submit("update", "Save changes", ["class" => "btn-primary"]),

0 comments on commit b78edf5

Please sign in to comment.
You can’t perform that action at this time.