Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37835085
en ru br
Репозитории ALT

Группа :: Сети/Почта
Пакет: public-inbox

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: 0001-Do-not-show-loose-matches.patch
Скачать


From 880e648235867829e8d60ec51343d10daab0380b Mon Sep 17 00:00:00 2001
From: Alexey Gladkov <legion@altlinux.org>
Date: Mon, 16 Nov 2020 18:23:24 +0300
Subject: [PATCH] Do not show loose matches
Signed-off-by: Alexey Gladkov <legion@altlinux.org>
---
 lib/PublicInbox/Over.pm | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/PublicInbox/Over.pm b/lib/PublicInbox/Over.pm
index f34e7fc1..61e7cb6d 100644
--- a/lib/PublicInbox/Over.pm
+++ b/lib/PublicInbox/Over.pm
@@ -172,8 +172,6 @@ ORDER BY $sort_col ASC
 	# HTML view always wants an array and never uses $prev,
 	# but the mbox stream never wants an array and always has $prev
 	die '$prev not supported with wantarray' if $prev;
-	my $nr = $dbh->selectrow_array(<<"", undef, $tid, $sid, $num);
-SELECT COUNT(num) FROM over WHERE $cond_all
 
 	# giant thread, prioritize strict (tid) matches and throw
 	# in the loose (sid) matches at the end
@@ -181,6 +179,9 @@ SELECT COUNT(num) FROM over WHERE $cond_all
 SELECT $cols FROM over WHERE tid = ? AND num > ?
 ORDER BY $sort_col ASC
 
+	return (scalar(@$msgs), $msgs);
+	my $nr = 0;
+
 	# do we have room for loose matches? get the most recent ones, first:
 	my $lim = DEFAULT_LIMIT - scalar(@$msgs);
 	if ($lim > 0) {
-- 
2.25.4
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin