diff options
author | Andrew Dolgov <[email protected]> | 2018-04-03 13:57:27 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2018-04-03 13:57:27 +0300 |
commit | 963c22646b3e1bd544bd957bf34175b996bd6e53 (patch) | |
tree | 3fcde89e6ead0b083330dc38c67c261939dd81e9 /update.php | |
parent | 4fa64e8446563a89f04badfdfecc8a57750c083d (diff) |
pass tsvector data as a named parameter on article update, remove escaping hacks
Diffstat (limited to 'update.php')
-rwxr-xr-x | update.php | 8 |
1 files changed, 3 insertions, 5 deletions
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"; |