+version 1.1
+ * duplicate / potential match url search
+ * older and newer link at the top no working
+
version 1.0 ()
+ jumpin.banana
* tag suggest was not working correctly.
This is not needed. Since we use the charset info
to determine utf, we need this information
* Insert SQL more save now
-
+
Tue Jul 14 21:38 EST 2009 Luke Reeve <luke@neuro-tech.net>
* Fix the option "proxy_host" not being saved correctly.
Tue Feb 21 12:30 EST 2006 Luke Reeves <luke@neuro-tech.net>
- * Fix up database connectivity for newer PostgreSQL
+ * Fix up database connectivity for newer PostgreSQL
libraries
* Incorporate patch from Paul Boin that allows importing
of regular del.icio.us backups (as opposed to only
* Fixed some of the cleanup process for snapshot deletion
* Added a "Fetch Related" function, so that the snapshot
tool can grab related objects
- * Work on the tag tools - delete and rename tags
+ * Work on the tag tools - delete and rename tags
Fri Nov 04 09:00 EST 2005 Luke Reeves <luke@neuro-tech.net>
* Database fix (thanks to Jutta Horstmann)
- * Remove export and import to server-side files, since the
+ * Remove export and import to server-side files, since the
standalone tools can easily accomplish that
Fri Sep 23 07:35 EST 2005 Luke Reeves <luke@neuro-tech.net>
systems.
Mon Sep 05 22:28 EST 2005 Luke Reeves <luke@neuro-tech.net>
-
+
* Major code cleanup (splitting the main CGI file into multiple,
more maintainable ones inside of the lib/Insipid directory)
* Bugfix for adding duplicate items not being flagged as such
as well as other bug fixes.
Sun Jul 17 15:19 EST 2005 Luke Reeves <luke@neuro-tech.net>
-
+
* Added the page cache feature, so a user can take snapshots of pages
that have been bookmarked.
do_import();
} else {
print <<IFORM;
- <p>This allows you to import either
- <a href="http://www.neuro-tech.net/insipid/">Insipid</a> or
+ <p>This allows you to import either
+ <a href="http://www.neuro-tech.net/insipid/">Insipid</a> or
<a href="http://del.icio.us/">del.icio.us</a> backups. For del.icio.us, you
must first use their API to export your bookmarks to an XML file. To do this,
- access the URL "http://username:password\@del.icio.us/api/posts/all?"
+ access the URL "http://username:password\@del.icio.us/api/posts/all?"
(using your username and password). You can then upload that XML file here.
</p>
<br />
print "URL or Title can not be empty";
exit;
}
-
+
if(!is_uri($url)) {
print "This is not a valid URL";
exit;
if (param('op') eq 'bookmarklets') {
print <<DESC;
-<p>This bookmarklet provides a fast way to add your browser's
-current page to this Insipid installation. Either drag the
-following link to your bookmarks toolbar or right-click on it
-and choose "Bookmark This Link..." to create a bookmarklet.
-Then when you're on a page you'd like to save, click on your
-new "Add to Insipid" button and you'll be brought to a page
-that allows you to fill out the tags for the bookmark and save
-it. Once you've clicked Save you'll be brought back to the
+<p>This bookmarklet provides a fast way to add your browser's
+current page to this Insipid installation. Either drag the
+following link to your bookmarks toolbar or right-click on it
+and choose "Bookmark This Link..." to create a bookmarklet.
+Then when you're on a page you'd like to save, click on your
+new "Add to Insipid" button and you'll be brought to a page
+that allows you to fill out the tags for the bookmark and save
+it. Once you've clicked Save you'll be brought back to the
page.</p>
DESC
my $ad = <<BLET;
# Save options if they were posted.
print "<br /><br />";
if (param('save')) {
- my $sql = "update $tbl_options set value=?
+ my $sql = "update $tbl_options set value=?
where (name = ?)";
my $sth = $dbh->prepare($sql);
print "</table></form>";
}
-sub show_footer {
+sub show_pageLinks {
my $older = 2;
+ my $newer = 2;
+ my $returnstr;
+ my $currentPage;
+
if (defined(url_param('page'))) {
- $older = url_param('page') + 1;
+ $currentPage = url_param('page');
+ $older = $currentPage + 1;
+ $newer = $currentPage - 1;
}
+ $returnstr = " | ";
+ if($older >= 2 && $currentPage > 1) {
+ $returnstr .= "<a href=\"?page=$newer\">« newer</a>";
+ }
if ($last_page eq 0) {
- if ($query ne "") {
- print " | <a href=\"?page=$older&q=";
- print $query;
- print "\">More Results</a>";
- } else {
- print " | <a href=\"?page=$older\">older</a>";
- }
+ $returnstr .= " <a href=\"?page=$older\">older »</a>";
}
+
+ print $returnstr;
}
sub do_import {
check_access();
# Check for cached version to delete.
- $sql = "select $tbl_pagecache.md5 from $tbl_pagecache
- inner join $tbl_bookmarks on
- ($tbl_pagecache.md5 = $tbl_bookmarks.md5)
+ $sql = "select $tbl_pagecache.md5 from $tbl_pagecache
+ inner join $tbl_bookmarks on
+ ($tbl_pagecache.md5 = $tbl_bookmarks.md5)
where ($tbl_bookmarks.id = ?)";
$sth = $dbh->prepare($sql);
$sth->execute($id);
# Join the tag tables only when necessary
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 =
+
+ $sql = $sql." left join $tbl_bookmark_tags on
+ ($tbl_bookmarks.id =
$tbl_bookmark_tags.bookmark_id)
WHERE $tbl_bookmark_tags.bookmark_id IS NULL";
}
foreach (@tags) {
push(@parms, $_);
- $sql = "$sql inner join $tbl_bookmark_tags
- as bt$icount on
- ($tbl_bookmarks.id =
+ $sql = "$sql inner join $tbl_bookmark_tags
+ as bt$icount on
+ ($tbl_bookmarks.id =
bt$icount.bookmark_id)
- inner join $tbl_tags as t$icount on
- (t$icount.id = bt$icount.tag_id
+ inner join $tbl_tags as t$icount on
+ (t$icount.id = bt$icount.tag_id
and t$icount.name = ?) ";
$icount++;
}
} else {
- $sql = "$sql
- left join $tbl_bookmark_tags on
- ($tbl_bookmarks.id =
- $tbl_bookmark_tags.bookmark_id)
- inner join $tbl_tags on
- ($tbl_tags.id = $tbl_bookmark_tags.tag_id)
+ $sql = "$sql
+ left join $tbl_bookmark_tags on
+ ($tbl_bookmarks.id =
+ $tbl_bookmark_tags.bookmark_id)
+ inner join $tbl_tags on
+ ($tbl_tags.id = $tbl_bookmark_tags.tag_id)
where ($tbl_tags.name = ?)";
push(@parms, url_param('tag'));
}
@parms = ();
@wheres = ();
- $sql = "select
- $tbl_bookmarks.id,
- $tbl_bookmarks.title,
- $tbl_bookmarks.description,
+ $sql = "select
+ $tbl_bookmarks.id,
+ $tbl_bookmarks.title,
+ $tbl_bookmarks.description,
$tbl_bookmarks.access_level,
$tbl_bookmarks.url,
$tbl_tags.name,
$tbl_bookmarks.date,
$tbl_pagecache.date as cache_date,
$tbl_bookmarks.md5
- from $tbl_bookmarks
- left join $tbl_bookmark_tags on
+ from $tbl_bookmarks
+ left join $tbl_bookmark_tags on
($tbl_bookmarks.id = $tbl_bookmark_tags.bookmark_id)
- left join $tbl_tags on
+ left join $tbl_tags on
($tbl_tags.id = $tbl_bookmark_tags.tag_id)
left join $tbl_pagecache on
($tbl_bookmarks.md5 = $tbl_pagecache.md5)";
}
print "<span class=\"bodyTitle\">$title</span>";
- show_footer();
+ show_pageLinks();
print '<br /><br />';
print "<table class=\"bookmarklist\">";
my ($url) = (@_);
# Lookup the URL id first.
- my $sql = "select $tbl_bookmarks.id from
+ my $sql = "select $tbl_bookmarks.id from
$tbl_bookmarks where ($tbl_bookmarks.md5 = ?)";
my $sth = $dbh->prepare($sql);
sub get_bookmark {
my ($id) = (@_);
- my $sql = "select
- $tbl_bookmarks.title,
- $tbl_bookmarks.description,
+ my $sql = "select
+ $tbl_bookmarks.title,
+ $tbl_bookmarks.description,
$tbl_bookmarks.url,
- $tbl_bookmarks.access_level
- from $tbl_bookmarks
+ $tbl_bookmarks.access_level
+ from $tbl_bookmarks
where ($tbl_bookmarks.id = ?)";
my $sth = $dbh->prepare($sql);
$sth->execute($id);
check_access();
- my $sql = "update $tbl_bookmarks
- set url = ?, md5 = ?, title = ?, description = ?,
+ my $sql = "update $tbl_bookmarks
+ set url = ?, md5 = ?, title = ?, description = ?,
access_level = ? where (id = ?)";
my $sth = $dbh->prepare($sql);
$sth->execute($url, md5_hex("$url"), $title, $description, $access_level,