From 963c22646b3e1bd544bd957bf34175b996bd6e53 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 3 Apr 2018 13:57:27 +0300 Subject: pass tsvector data as a named parameter on article update, remove escaping hacks --- update.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'update.php') diff --git a/update.php b/update.php index 99f4a59dc..553175c8c 100755 --- a/update.php +++ b/update.php @@ -366,13 +366,11 @@ while (true) { while ($line = $sth->fetch()) { - $tsvector_combined = mb_substr($line['title'] . ' ' . - preg_replace('/[<\?\:]/', ' ', strip_tags($line['content'])), - 0, 1000000); + $tsvector_combined = mb_substr(strip_tags($line["title"] . " " . $line["content"]), 0, 1000000); - $usth->execute([$tsvector_combined, $line['id']]); + $usth->execute([$tsvector_combined, $line['id']]); - $processed++; + $processed++; } print "Processed $processed articles...\n"; -- cgit v1.2.3