From 453f43169c0141496009c4174dc3710cf2bc337f Mon Sep 17 00:00:00 2001 From: quitte Date: Thu, 24 Aug 2023 19:46:21 +0200 Subject: [PATCH] padlist: filter pads by tag --- pkgs/padlist/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/padlist/index.php b/pkgs/padlist/index.php index a975d91..60bf364 100644 --- a/pkgs/padlist/index.php +++ b/pkgs/padlist/index.php @@ -14,7 +14,7 @@ try { die(); } -$query = 'SELECT "Notes".title, "Notes"."updatedAt", "Notes"."shortid", "Users".profile FROM "Notes" JOIN "Users" ON "Notes"."ownerId" = "Users".id WHERE permission = \'freely\' OR permission = \'editable\' OR permission = \'limited\' ORDER BY "Notes"."updatedAt" DESC'; +$query = 'SELECT "Notes".title, "Notes"."updatedAt", "Notes"."shortid", "Users".profile FROM "Notes" JOIN "Users" ON "Notes"."ownerId" = "Users".id WHERE (permission = \'freely\' OR permission = \'editable\' OR permission = \'limited\') AND strpos(content, \'tags: listed\')>0 ORDER BY "Notes"."updatedAt" DESC'; try { $stmt = $dbh->query($query); $rows = $stmt->fetchAll(PDO::FETCH_ASSOC); @@ -76,4 +76,4 @@ function formatDateString($stringDate) - \ No newline at end of file +