--- click2bookmark.module.org.20070423	2007-04-23 21:57:04.000000000 +0800
+++ click2bookmark2.module	2007-05-07 00:00:40.578125000 +0800
@@ -88,13 +88,18 @@
     return false;
   }
    
-  $result = db_query('INSERT INTO {click2bookmark} (uid, path, title) VALUES (%d, \'%s\', \'%s\')', $user->uid, $node->path, $node->title);
-  if ($result) { 
-    drupal_set_message(t('Bookmark saved!')); 
-  } else {
-    drupal_set_message(t('Error while saving bookmark...')); 
-  };  
-  
+  $result = db_query('SELECT path FROM {click2bookmark} WHERE path="%s" AND uid="%d"', $node->path, $user->uid);
+  if ($result && db_num_rows($result) > 0) {
+    drupal_set_message(t('This page is already bookmarked by you !'));
+  }
+  else {
+    $result = db_query('INSERT INTO {click2bookmark} (uid, path, title) VALUES (%d, \'%s\', \'%s\')', $user->uid, $node->path, $node->title);
+    if ($result) { 
+      drupal_set_message(t('Bookmark saved!')); 
+    } else {
+      drupal_set_message(t('Error while saving bookmark...')); 
+    };  
+  }
   drupal_goto($node->path);
 }
 
