mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Split package flagging and unflagging into separate functions
Currently, package flagging and unflagging takes place within the pkg_flag() function. A bool is set to true or false depending on the action. Create new pkg_unflag() function with sole purpose of unflagging and keep pkg_flag() in place. This split will be useful in the overhaul of the notification system. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
c7d20163a4
commit
20407bb8c6
2 changed files with 45 additions and 33 deletions
|
@ -51,9 +51,9 @@ if (isset($_POST['IDs'])) {
|
|||
$output = "";
|
||||
if (check_token()) {
|
||||
if (current_action("do_Flag")) {
|
||||
$output = pkg_flag($atype, $ids, true);
|
||||
$output = pkg_flag($atype, $ids);
|
||||
} elseif (current_action("do_UnFlag")) {
|
||||
$output = pkg_flag($atype, $ids, False);
|
||||
$output = pkg_unflag($atype, $ids);
|
||||
} elseif (current_action("do_Adopt")) {
|
||||
$output = pkg_adopt($atype, $ids, true);
|
||||
} elseif (current_action("do_Disown")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue