]> 91.132.146.200 Git - insipid.git/commitdiff
bookmarks by domain search and some stats information
authorBanana <banana@starscream.de>
Thu, 16 Feb 2012 08:47:48 +0000 (09:47 +0100)
committerBanana <banana@starscream.de>
Thu, 16 Feb 2012 08:47:48 +0000 (09:47 +0100)
ChangeLog
lib/Insipid/Main.pm
lib/Insipid/Stats.pm

index 9351daac4dd34943fffacc987d0f0a3fb27ffec0..b10131e50f224110aa97eeab323b743a54a5ae7e 100755 (executable)
--- 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
index 583f349fa61d1465c5a5c49a1d8eaab9548fd1a7..a8c34d5c0d4652cbcd2001ae2710401c5939d203 100755 (executable)
@@ -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);
 
index 0da2bcccad682f035fb8fc0e763f8ccd05585e3b..58d173ae6fb410af930a11aa7cc22e0c2a3c7866 100644 (file)
@@ -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 "<table cellpadding='2' cellspacing='0'>";
                        print "<tr><th>Domain</th><th>Count</th></tr>";
                        #for(sort keys %domains) {
                        foreach (reverse sort { $domains{$a} <=> $domains{$b} } keys %domains ) {
-                               print "<tr><td>$_</td><td>$domains{$_}</td></tr>";
+
+                               print "<tr><td><a href='$site_url/insipid.cgi?bydomain=".uri_escape($_)."'>$_</a></td><td>$domains{$_}</td></tr>";
                        }
                        print "</table>";
                }