Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Paging Bar string - Why?

Quote Reply
Paging Bar string - Why?
Why is this validated string necessary on the next/prev paging bar output?

/search?query=loans;isValidated=Yes;nh=2/

Wouldn't the results be only from validated links by default anyway - so why the string?

Oh, and I don’t think there is anyway to not have that - must be built in Unsure

--------------------------------
Privacy Software

Last edited by:

BLOOD: Mar 16, 2006, 10:28 AM
Quote Reply
Re: [BLOOD] Paging Bar string - Why? In reply to
It isn't necessary, but was a result of how the paging generates its urls. I just committed the following change so that it doesn't add that into the url:
Code:
--- User/Search.pm 14 Jan 2006 00:55:18 -0000 1.44
+++ User/Search.pm 16 Mar 2006 21:00:25 -0000
@@ -42,10 +42,6 @@
}
}

-# Make sure we only search on validated links.
- $IN->param('isValidated', 'Yes');
- $IN->param('ExpiryDate', '>=' . time) if $CFG->{payment}->{enabled};
-
# If query is set we know we are searching.
return search() if defined $args->{query} and $args->{query} =~ /\S/;

@@ -98,6 +95,10 @@
$args->{sb} and ($args->{sb} =~ /^[\w\s,]+$/ or ($args->{sb} = ''));
delete $args->{ma};

+# Make sure we only search on validated links.
+ $args->{isValidated} = 'Yes';
+ $args->{ExpiryDate} = '>=' . time if $CFG->{payment}->{enabled};
+
my $query = $args->{query} || '';
my $term = $IN->escape($query);

Adrian