Website Summary Files Commits Branches @commit @diff @stats
path: root / models / webpage.php
diff options
context:
space:
mode:
Commit40b78735aeba6082363e6a8d98b78da9ba230687 (patch)
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
Files036207435be8d7cc27e1f468f7791c11890709c3 /models/webpage.php
nowayforward_human-40b78735aeba6082363e6a8d98b78da9ba230687.tar
nowayforward_human-40b78735aeba6082363e6a8d98b78da9ba230687.tar.gz
nowayforward_human-40b78735aeba6082363e6a8d98b78da9ba230687.zip
Parent34903b6553f6483f52e57133fc6305779461db29 (diff)
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
1 files changed, 5 insertions, 0 deletions
-rw-r--r--models/webpage.php5
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',