From: Banana Date: Thu, 16 Jun 2011 07:01:30 +0000 (+0200) Subject: manage empty bookmarks X-Git-Tag: 2.1-alpha-2019-0-29~115 X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=19fac9a26490bb833e6cd1bd179bb6b7fb0160d8;p=insipid.git manage empty bookmarks --- diff --git a/insipid.cgi b/insipid.cgi index 4b1cc79..6713da7 100755 --- a/insipid.cgi +++ b/insipid.cgi @@ -53,9 +53,6 @@ if($@) { print STDERR "Creating database\n"; - #print STDERR Dumper(\%INC); - #delete $INC{'Insipid/Database.pm'}; - # This means that a database connection was established but the # tables were not found. undef($@); diff --git a/lib/Insipid/Main.pm b/lib/Insipid/Main.pm index 2d85217..507a67c 100755 --- a/lib/Insipid/Main.pm +++ b/lib/Insipid/Main.pm @@ -856,7 +856,17 @@ sub show_bookmarks { # Join the tag tables only when necessary - if (url_param('tag') =~ / /) { + if(url_param('tag') eq "empty") { + + # allow this action only for logged in users + check_access(); + + $sql = $sql." left join $tbl_bookmark_tags on + ($tbl_bookmarks.id = + $tbl_bookmark_tags.bookmark_id) + WHERE $tbl_bookmark_tags.bookmark_id IS NULL"; + } + elsif (url_param('tag') =~ / /) { my @tags = split(/ /, url_param('tag')); my $icount = 1; diff --git a/lib/Insipid/Tags.pm b/lib/Insipid/Tags.pm index fae6374..0a5148d 100755 --- a/lib/Insipid/Tags.pm +++ b/lib/Insipid/Tags.pm @@ -139,8 +139,11 @@ sub tag_operations { print ''; print ''; print ''; - print ''; + print ''; print ''; + + print '

Show bookmarks without a tag

'; + print '

Show me the bookmarks

'; } # Display the tag list. Takes one parameter for the mode - 0 is for the