From: Banana Date: Thu, 16 Feb 2012 08:47:48 +0000 (+0100) Subject: bookmarks by domain search and some stats information X-Git-Tag: 2.1-alpha-2019-0-29~96 X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=dd381431b2707eb3a44ea0de271b2d87036000f5;p=insipid.git bookmarks by domain search and some stats information --- diff --git a/ChangeLog b/ChangeLog index 9351daa..b10131e 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ version 1.1 - * duplicate / potential match url search * older and newer link at the top no working * bug with path to the jquery.js file + * some statistics version 1.0 () + jumpin.banana diff --git a/lib/Insipid/Main.pm b/lib/Insipid/Main.pm index 583f349..a8c34d5 100755 --- a/lib/Insipid/Main.pm +++ b/lib/Insipid/Main.pm @@ -921,9 +921,19 @@ sub show_bookmarks { } + # search by domain + if(defined(url_param('bydomain'))) { + my $sparm = url_param('bydomain'); + $sql = "$sql where ($tbl_bookmarks.url like ?)"; + $sparm =~ s/\%//; + $sparm = "\%$sparm\%"; + push(@parms, $sparm); + } + + # Search if ($query ne "") { - if ( (get_option("public_searches") eq "yes") + if ( (get_option("public_searches") eq "yes") || (logged_in() eq 1)) { my $sparm = $query; if (length($sparm) > 2) { @@ -946,6 +956,8 @@ sub show_bookmarks { $sql = "$sql offset $offset"; } + #print $sql; + $sth = $dbh->prepare($sql); $sth->execute(@parms); diff --git a/lib/Insipid/Stats.pm b/lib/Insipid/Stats.pm index 0da2bcc..58d173a 100644 --- a/lib/Insipid/Stats.pm +++ b/lib/Insipid/Stats.pm @@ -33,6 +33,7 @@ use Insipid::Util; require Exporter; use URI; +use URI::Escape; use Data::Dumper; @@ -75,13 +76,12 @@ sub findSimilarities { if(%domains) { - - print ""; print ""; #for(sort keys %domains) { foreach (reverse sort { $domains{$a} <=> $domains{$b} } keys %domains ) { - print ""; + + print ""; } print "
DomainCount
$_$domains{$_}
$_$domains{$_}
"; }