X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=update.php;h=8f268cd35ac20cbebe0d9ed45980ce3f0670d630;hb=3a0292303e453f38204279b5d1c978a4b9c367e9;hp=22dded6752bbae794a46777410fe07922689bf95;hpb=a77a47332cd70059486e5888bc5987ce516dcf5b;p=tt-rss.git
diff --git a/update.php b/update.php
index 22dded67..8f268cd3 100755
--- a/update.php
+++ b/update.php
@@ -39,7 +39,6 @@
"debug-feed:",
"force-refetch",
"force-rehash",
- "decrypt-feeds",
"help");
foreach (PluginHost::getInstance()->get_commands() as $command => $data) {
@@ -60,7 +59,6 @@
Tiny Tiny RSS data update script.
-
@@ -93,7 +91,6 @@
print " --debug-feed N - perform debug update of feed N\n";
print " --force-refetch - debug update: force refetch feed data\n";
print " --force-rehash - debug update: force rehash articles\n";
- print " --decrypt-feeds - decrypt feed passwords\n";
print " --help - show this help\n";
print "Plugin options:\n";
@@ -161,7 +158,7 @@
if (isset($options["force-update"])) {
_debug("marking all feeds as needing update...");
- $pdo->query( "UPDATE ttrss_feeds SET
+ $pdo->query( "UPDATE ttrss_feeds SET
last_update_started = '1970-01-01', last_updated = '1970-01-01'");
}
@@ -357,22 +354,21 @@
$limit = 500;
$processed = 0;
- $sth = $pdo->prepare("SELECT id, title, content FROM ttrss_entries WHERE
+ $sth = $pdo->prepare("SELECT id, title, content FROM ttrss_entries WHERE
tsvector_combined IS NULL ORDER BY id LIMIT ?");
$sth->execute([$limit]);
- $usth = $pdo->prepare("UPDATE ttrss_entries
+ $usth = $pdo->prepare("UPDATE ttrss_entries
SET tsvector_combined = to_tsvector('english', ?) WHERE id = ?");
while (true) {
while ($line = $sth->fetch()) {
- $tsvector_combined = mb_substr($line['title'] . ' ' . strip_tags(str_replace('<', ' <', $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";
@@ -419,39 +415,6 @@
exit($rc);
}
- if (isset($options["decrypt-feeds"])) {
-
- if (!function_exists("mcrypt_decrypt")) {
- _debug("mcrypt functions not available.");
- return;
- }
-
- $res = $pdo->query("SELECT id, auth_pass FROM ttrss_feeds WHERE auth_pass_encrypted = true");
-
- require_once "crypt.php";
-
- $total = 0;
-
- $pdo->beginTransaction();
-
- $usth = $pdo->prepare("UPDATE ttrss_feeds SET auth_pass_encrypted = false, auth_pass = ?
- WHERE id = ?");
-
- while ($line = $res->fetch()) {
- _debug("processing feed id " . $line["id"]);
-
- $auth_pass = decrypt_string($line["auth_pass"]);
-
- $usth->execute([$auth_pass, $line['id']]);
-
- ++$total;
- }
-
- $pdo->commit();
-
- _debug("$total feeds processed.");
- }
-
PluginHost::getInstance()->run_commands($options);
if (file_exists(LOCK_DIRECTORY . "/$lock_filename"))