aboutsummaryrefslogtreecommitdiff
path: root/models/webpage.php
diff options
context:
space:
mode:
authorGeorgi Nikolov <ggeorgi60@gmail.com>2025-01-25 12:04:13 +0200
committerGeorgi Nikolov <ggeorgi60@gmail.com>2025-01-25 12:04:13 +0200
commit04b77a264f8d7fbc9069ad96fa1a448f1f3ecb12 (patch)
tree274ac22ff284c03b6b733bdf557d0644ef114108 /models/webpage.php
parent61d6cd57804dc059e2718cae19a97dc40bc83756 (diff)
downloadnowayforward_human-04b77a264f8d7fbc9069ad96fa1a448f1f3ecb12.tar
nowayforward_human-04b77a264f8d7fbc9069ad96fa1a448f1f3ecb12.tar.gz
nowayforward_human-04b77a264f8d7fbc9069ad96fa1a448f1f3ecb12.zip
Added caching of the pages
When a page is downloaded if the resources already exist in the system they will not be downloaded again
Diffstat (limited to 'models/webpage.php')
-rw-r--r--models/webpage.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/models/webpage.php b/models/webpage.php
index 46c8407..1a2f4a6 100644
--- a/models/webpage.php
+++ b/models/webpage.php
@@ -42,6 +42,15 @@ class Webpage extends Table {
);
}
+ static function getArchivePathsByPattern(string $URLPattern) : array {
+ return Table::_get_all(
+ 'Webpages',
+ 'Database\Webpage',
+ "WHERE URL LIKE \"$URLPattern\" ORDER BY Date DESC",
+ "Path, WID"
+ );
+ }
+
function incrementVisits() {
Table::_update(
'Webpages',