diff options
Diffstat (limited to 'views')
| -rw-r--r-- | views/archive/index.php | 2 | ||||
| -rw-r--r-- | views/home/index.php | 2 | ||||
| -rw-r--r-- | views/list/update/index.php | 4 | ||||
| -rw-r--r-- | views/profile/index.php | 4 |
4 files changed, 5 insertions, 7 deletions
diff --git a/views/archive/index.php b/views/archive/index.php index 085a033..846f910 100644 --- a/views/archive/index.php +++ b/views/archive/index.php @@ -24,7 +24,7 @@ <!-- Button to delete --> <h2>Archives by date:</h2> - <?php foreach (Database\Webpage::allArchives($page->URL) as $page): ?> + <?php foreach ($page->allArchives() as $page): ?> <section class="item"> <section> <div> diff --git a/views/home/index.php b/views/home/index.php index abc872b..e14e23a 100644 --- a/views/home/index.php +++ b/views/home/index.php @@ -11,7 +11,7 @@ <h1>Most popular archives</h1> -<?php foreach(Database\Webpage::mostVisited(10) as $page): ?> +<?php foreach(Database\Webpage::fromDBmostVisited(10) as $page): ?> <section class="card" onclick="goto_archive('<?= $page->URL ?>')"> <section class="quickinfo"> <a href="<?= $page->URL ?>"><?= $page->URL ?></a> diff --git a/views/list/update/index.php b/views/list/update/index.php index 6fa91e1..b3737f0 100644 --- a/views/list/update/index.php +++ b/views/list/update/index.php @@ -4,12 +4,10 @@ <?php $user = null; $webpage = null; - $lists = null; try { $user = Database\Cookie::fromDB($TOKEN); $webpage = Database\Webpage::fromDBwid($_GET['wid']); - $lists = Database\ArchiveList::allListsByUser($user->UID); } catch (Exception $e) {} ?> @@ -22,7 +20,7 @@ <form action="/list" method="GET"> <input type="hidden" name="method" value="PATCH"> <select name="lid"> - <?php foreach ($lists as $list): ?> + <?php foreach ($user->archiveLists() as $list): ?> <option value="<?= $list->LID ?>"><?= $list->Name ?></option> <?php endforeach; ?> </select> diff --git a/views/profile/index.php b/views/profile/index.php index dad2070..0a10e4a 100644 --- a/views/profile/index.php +++ b/views/profile/index.php @@ -18,7 +18,7 @@ <h2 onclick="openArchives()">Archives</h2> <h2 onclick="openLists()">Lists</h2> <section id="user-archives"> - <?php foreach (Database\Webpage::allArchivesByUser($user->UID) as $page): ?> + <?php foreach ($user->archives() as $page): ?> <section class="item"> <section> <div> @@ -51,7 +51,7 @@ </section> <section id="user-lists" hidden> - <?php foreach(Database\ArchiveList::allListsByUser($user->UID) as $list): ?> + <?php foreach($user->archiveLists() as $list): ?> <section> <?= $list->Name ?> <?= $list->Description ?> |
