mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
notify: Do not pass notification texts via pipes
Directly retrieve comments from the database instead of additionally passing them via stdin. Fixes FS#46742. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
5931d5ceec
commit
e45609cf66
4 changed files with 30 additions and 12 deletions
|
@ -100,8 +100,9 @@ function pkgbase_add_comment($base_id, $uid, $comment) {
|
|||
$q.= intval($base_id) . ", " . $uid . ", ";
|
||||
$q.= $dbh->quote($comment) . ", UNIX_TIMESTAMP())";
|
||||
$dbh->exec($q);
|
||||
$comment_id = $dbh->lastInsertId();
|
||||
|
||||
notify(array('comment', $uid, $base_id), $comment);
|
||||
notify(array('comment', $uid, $base_id, $comment_id));
|
||||
|
||||
return array(true, __('Comment has been added.'));
|
||||
}
|
||||
|
@ -401,7 +402,7 @@ function pkgbase_flag($base_ids, $comment) {
|
|||
$dbh->exec($q);
|
||||
|
||||
foreach ($base_ids as $base_id) {
|
||||
notify(array('flag', $uid, $base_id), $comment);
|
||||
notify(array('flag', $uid, $base_id));
|
||||
}
|
||||
|
||||
return array(true, __("The selected packages have been flagged out-of-date."));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue