Website Summary Files Commits Branches @commit @diff @stats
path: root / models / webpage.php
diff options
context:
space:
mode:
Commit3b6dfca6d6b59abd932e94d88f19a8eadcf0d8ca (patch)
Author
 Georgi Nikolov <ggeorgi60@gmail.com>
2025-01-25 18:47:53 +0200
Committer
 Georgi Nikolov <ggeorgi60@gmail.com>
2025-01-25 18:47:53 +0200
Files2dc1181a7c04e33da81daf970a915fdb5e17a625 /models/webpage.php
nowayforward_human-3b6dfca6d6b59abd932e94d88f19a8eadcf0d8ca.tar
nowayforward_human-3b6dfca6d6b59abd932e94d88f19a8eadcf0d8ca.tar.gz
nowayforward_human-3b6dfca6d6b59abd932e94d88f19a8eadcf0d8ca.zip
Parent9863aa1bfcf0ce9874034bfc8fff05fd428c8019 (diff)
Fixed queries to include the title property
1 files changed, 5 insertions, 4 deletions
-rw-r--r--models/webpage.php9
diff --git a/models/webpage.php b/models/webpage.php
index 5dd44e0..742b977 100644
--- a/models/webpage.php
+++ b/models/webpage.php
@@ -10,12 +10,13 @@ class Webpage extends Table {
public $Visits;
public $RequesterUID;
public $FaviconPath;
+ public $Title;
- static function create(string $Path, string $URL, int $RequesterUID, string $FaviconPath) : int {
+ static function create(string $Path, string $URL, int $RequesterUID, ?string $FaviconPath, ?string $Title) : int {
return Table::_create(
'Webpages',
- '(Path, URL, Date, Visits, RequesterUID, FaviconPath)',
- "(\"$Path\", \"$URL\", (NOW() + INTERVAL 2 HOUR), 0, \"$RequesterUID\", \"$FaviconPath\")"
+ '(Path, URL, Date, Visits, RequesterUID, FaviconPath, Title)',
+ "(\"$Path\", \"$URL\", (NOW() + INTERVAL 2 HOUR), 0, \"$RequesterUID\", \"$FaviconPath\", \"$Title\")"
);
}
@@ -35,7 +36,7 @@ class Webpage extends Table {
'Webpages',
'Database\Webpage',
"GROUP BY URL ORDER BY Visits DESC, Date DESC LIMIT $count",
- 'WID,Path,URL,Date,MAX(Visits) as Visits,RequesterUID'
+ 'WID,Path,URL,Date,MAX(Visits) as Visits,RequesterUID,FaviconPath,Title'
);
}