From 40b78735aeba6082363e6a8d98b78da9ba230687 Mon Sep 17 00:00:00 2001 From: Georgi Nikolov Date: Sat, 1 Feb 2025 18:20:15 +0200 Subject: Fixed the create table workaround This included creating an update function that can update the archive after its creation, setting the correct title and favicon path --- models/webpage.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'models') diff --git a/models/webpage.php b/models/webpage.php index 6347397..e85046f 100644 --- a/models/webpage.php +++ b/models/webpage.php @@ -35,10 +35,15 @@ class Webpage extends Table { } // TODO: remove this, refer to archive.php + // NOTE: Why remove? Let it be. Leave the thing alone static function getPagesCount() : int { return Table::_get_entries_count("Webpages"); } + static function updateNewArchive(int $WID, string $faviconPath, string $newTitle) : void { + Table::_update("Webpages", "FaviconPath = \"$faviconPath\", Title = \"$newTitle\"", "WID = $WID"); + } + static function fromDBmostVisited(int $count) : array { return Table::_get_all( 'Webpages', -- cgit v1.2.3