aboutsummaryrefslogtreecommitdiff
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-rw-r--r--models/webpage.php9
1 files changed, 5 insertions, 4 deletions
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'
);
}