Skip to content

Commit

Permalink
Nits.
Browse files Browse the repository at this point in the history
  • Loading branch information
kohler committed Oct 16, 2023
1 parent 947d897 commit faa6590
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
10 changes: 6 additions & 4 deletions src/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,13 @@ function expand_json_includes_callback($includelist, $callback, $parser = null)
}
$expandable = null;
if (is_string($v)) {
if ($v[0] === "@") {
$vl = strlen($v);
$vc = $v[0];
if ($vc === "@") {
$expandable = substr($v, 1);
} else if ($v[0] !== "{"
&& ($v[0] !== "[" || !str_ends_with(rtrim($v), "]"))
&& !ctype_space($v[0])
} else if ($vc !== "{"
&& ($vc !== "[" || ($v[$vl-1] !== "]" && !ctype_space($v[$vl-1])))
&& !ctype_space($vc)
&& strpos($v, "::") === false) {
$expandable = $v;
}
Expand Down
2 changes: 0 additions & 2 deletions src/pages/p_oauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ private function instance_response($authi, $tok, $jdata) {
return $m;
}

error_log("XXX " . json_encode($jid));
if (!isset($jid->email) || !is_string($jid->email)) {
return [
MessageItem::error("<0>The {$authtitle} authenticator didn’t provide your email"),
Expand Down Expand Up @@ -218,7 +217,6 @@ private function instance_response($authi, $tok, $jdata) {
}

static function go(Contact $user, Qrequest $qreq) {
error_log($_SERVER["REQUEST_URI"] . "\n");
$oap = new OAuth_Page($user, $qreq);
if (isset($qreq->state)) {
$mi = $oap->response();
Expand Down
2 changes: 1 addition & 1 deletion src/pages/p_signin.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ static function print_signin_form_description(Contact $user, Qrequest $qreq) {
}
echo '<p class="is-warning"><span class="warning-mark"></span> ', $user->conf->_("You are already signed in as {:list} on this browser.", $links), '</p>';
}
if (($t = $user->conf->_("Sign in to submit or review papers.")) !== "") {
if (($t = $user->conf->_("Sign in to submit or review papers.", new FmtArg("accounts", $su))) !== "") {
echo '<p class="mb-5">', $t, '</p>';
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/siteloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ static function expand_includes($root, $files, $expansions = []) {
}
if (empty($matches) && $includepath === null) {
global $Opt;
$includepath = $Opt["includePath"] ?? $Opt["includepath"] ?? [];
$includepath = $Opt["includePath"] ?? $Opt["includepath"] /* XXX */ ?? [];
}
if (empty($matches) && !empty($includepath)) {
if ($f2 !== null) {
Expand Down

0 comments on commit faa6590

Please sign in to comment.