From 39f5b1fce005ff0a2c3cb552c4ec5f478ab0b831 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 26 Jan 2025 22:17:55 +0200 Subject: feat: Add fromWid, addItem --- models/archivelist.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'models/archivelist.php') diff --git a/models/archivelist.php b/models/archivelist.php index 25b75fe..09d5d86 100644 --- a/models/archivelist.php +++ b/models/archivelist.php @@ -26,8 +26,16 @@ class ArchiveList extends Table { static function allListsByUser(int $UID) : array { return Table::_get_all( 'ArchiveLists', - 'Database\ArchiveLists', + 'Database\ArchiveList', "WHERE AuthorUID = \"$UID\"" ); } + + function addItem(int $WID) { + Table::_create( + 'ArchiveListsWebpages', + '(WID, LID, Position)', + "(\"$WID\", \"$this->LID\", \"0\")" + ); + } } -- cgit v1.2.3