aboutsummaryrefslogtreecommitdiff
path: root/views/list
diff options
context:
space:
mode:
Diffstat (limited to 'views/list')
-rw-r--r--views/list/add/index.php5
-rw-r--r--views/list/delete/index.php5
-rw-r--r--views/list/update/index.php5
3 files changed, 4 insertions, 11 deletions
diff --git a/views/list/add/index.php b/views/list/add/index.php
index 98c768d..272efda 100644
--- a/views/list/add/index.php
+++ b/views/list/add/index.php
@@ -1,11 +1,10 @@
<?php
- require_login();
-
+ $user = require_login();
$webpage = null;
$list = null;
try {
- $list = Database\Cookie::fromDB($TOKEN)->archiveLists();
+ $list = $user->archiveLists();
$webpage = Database\Webpage::fromDBwid($_GET['wid']);
}
catch (Exception $e) {}
diff --git a/views/list/delete/index.php b/views/list/delete/index.php
index 7d5bf5b..02eb37d 100644
--- a/views/list/delete/index.php
+++ b/views/list/delete/index.php
@@ -1,14 +1,11 @@
<?php
- require_login();
-
+ $user = require_login();
$list = null;
$author = null;
- $user = null;
try {
$list = Database\ArchiveList::fromDB($_GET['lid'] ?? -1);
$author = Database\User::fromDBuid($list->AuthorUID);
- $user = Database\Cookie::fromDB($TOKEN);
}
catch(Exception $e) {}
?>
diff --git a/views/list/update/index.php b/views/list/update/index.php
index 9374aef..e8b562c 100644
--- a/views/list/update/index.php
+++ b/views/list/update/index.php
@@ -1,14 +1,11 @@
<?php
- require_login();
-
+ $user = require_login();
$list = null;
$author = null;
- $user = null;
try {
$list = Database\ArchiveList::fromDB($_GET['lid'] ?? -1);
$author = Database\User::fromDBuid($list->AuthorUID);
- $user = Database\Cookie::fromDB($TOKEN);
}
catch(Exception $e) {}
?>