mirror of
https://github.com/OPSnet/Gazelle.git
synced 2026-01-16 18:04:34 -05:00
23 lines
528 B
PHP
23 lines
528 B
PHP
<?php
|
|
/** @phpstan-var \Gazelle\User $Viewer */
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Gazelle;
|
|
|
|
authorize();
|
|
|
|
if ($_POST['type'] === 'torrents') {
|
|
$editor = new Editor\UserBookmark($Viewer->id());
|
|
if (isset($_POST['update']) && !empty($_POST['sort'])) {
|
|
$editor->modify($_POST['sort']);
|
|
} elseif (isset($_POST['delete'])) {
|
|
$remove = array_keys($_POST['remove']);
|
|
if (!empty($remove)) {
|
|
$editor->remove($remove);
|
|
}
|
|
}
|
|
}
|
|
|
|
header('Location: bookmarks.php?type=torrents');
|