mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix(web/html/addvote): convert quorum to str using strval
Previous conversion was causing a straight up bug when submitting new proposals. This patch fixes that issue. Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
059733cb8c
commit
d49886f44f
1 changed files with 1 additions and 2 deletions
|
@ -69,9 +69,8 @@ if (has_credential(CRED_TU_ADD_VOTE)) {
|
||||||
|
|
||||||
if (!empty($_POST['addVote']) && empty($error)) {
|
if (!empty($_POST['addVote']) && empty($error)) {
|
||||||
// Convert $quorum to a String of maximum length "12.34" (5).
|
// Convert $quorum to a String of maximum length "12.34" (5).
|
||||||
$quorum_str = substr(strval($quorum), min(5, strlen($quorum)));
|
|
||||||
add_tu_proposal($_POST['agenda'], $_POST['user'],
|
add_tu_proposal($_POST['agenda'], $_POST['user'],
|
||||||
$len, $quorum_str, $uid);
|
$len, strval($quorum), $uid);
|
||||||
|
|
||||||
print "<p class=\"pkgoutput\">" . __("New proposal submitted.") . "</p>\n";
|
print "<p class=\"pkgoutput\">" . __("New proposal submitted.") . "</p>\n";
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue