diff --git a/preferences/nntp.php b/preferences/nntp.php
index b68c22b66d..eaba114dfd 100755
--- a/preferences/nntp.php
+++ b/preferences/nntp.php
@@ -51,6 +51,8 @@
if (! $start) $start = 0;
+ if (! $query_result) $query_result = 0;
+
$orderby = "";
if ($order)
{
@@ -68,6 +70,27 @@
}
}
+ if ($search || $next) {
+ if ($search) {
+ $query_result = 0;
+ } else
+ $query_result++;
+ $phpgw->db->query("SELECT name FROM newsgroups WHERE active='Y'$orderby");
+ $j = 0;
+ $i = 0;
+ while($phpgw->db->next_record())
+ {
+ if (stristr($phpgw->db->f("name"),$query)) {
+ if($i==$query_result) {
+ $start = $j;
+ break;
+ } else
+ $i++;
+ }
+ $j++;
+ }
+ }
+
$phpgw->db->query("SELECT con, name FROM newsgroups WHERE active='Y'$orderby LIMIT "
.$phpgw->nextmatchs->sql_limit($start));
@@ -85,7 +108,12 @@
. "\n"
. "\n"
. "\n"
- . "\n";
+ . "\n"
+ . "\n";
+
+ $t->set_var("search_value",$query);
+ $t->set_var("search",lang_common("search"));
+ $t->set_var("next",lang_nntp("next"));
$t->set_var("nml",$phpgw->nextmatchs->left( $urlname,
$start,