diff options
| author | Georgi Nikolov <ggeorgi60@gmail.com> | 2025-02-01 18:20:15 +0200 |
|---|---|---|
| committer | Georgi Nikolov <ggeorgi60@gmail.com> | 2025-02-01 18:20:15 +0200 |
| commit | 40b78735aeba6082363e6a8d98b78da9ba230687 (patch) | |
| tree | 036207435be8d7cc27e1f468f7791c11890709c3 /models | |
| parent | 34903b6553f6483f52e57133fc6305779461db29 (diff) | |
| download | nowayforward_human-40b78735aeba6082363e6a8d98b78da9ba230687.tar nowayforward_human-40b78735aeba6082363e6a8d98b78da9ba230687.tar.gz nowayforward_human-40b78735aeba6082363e6a8d98b78da9ba230687.zip | |
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
Diffstat (limited to 'models')
| -rw-r--r-- | models/webpage.php | 5 |
1 files changed, 5 insertions, 0 deletions
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', |
