Index: bookmarks.info
===================================================================
RCS file: bookmarks.info
diff -N bookmarks.info
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ bookmarks.info	1 May 2007 19:12:22 -0000
@@ -0,0 +1,4 @@
+; $Id$
+name = Bookmarks
+description = Allows users to bookmark any page on the site.
+version = "$Name$"
Index: bookmarks.install
===================================================================
RCS file: bookmarks.install
diff -N bookmarks.install
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ bookmarks.install	1 May 2007 19:12:22 -0000
@@ -0,0 +1,43 @@
+<?php
+// $Id$
+
+/**
+ * @file bookmarks.install
+ *
+ * Install and update hooks for taxonomy_dss module
+ */
+
+/**
+ * Implementation of hook_install()
+ */
+function bookmarks_install() {
+  switch ($GLOBALS['db_type']) {
+    case 'mysql':
+    case 'mysqli':
+      db_query("CREATE TABLE {bookmarks} (
+        uid INT UNSIGNED NOT NULL,
+        url VARCHAR(128) NOT NULL,
+        title VARCHAR(128) NOT NULL,
+        INDEX uid (uid)
+      ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
+
+      break;
+
+    case 'pgsql':
+      db_query("CREATE TABLE {bookmarks} (
+        uid INTEGER NOT NULL,
+        url VARCHAR(255) NOT NULL,
+        title VARCHAR(255) NOT NULL
+      );");
+
+      db_query("CREATE INDEX {bookmarks}_uid_index ON bookmarks (uid);");
+      break;
+  }
+}
+
+/**
+ * Implementation of hook_uninstall()
+ */
+function bookmarks_uninstall() {
+  db_query('DROP TABLE {bookmarks}');
+}
Index: bookmarks.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/bookmarks/bookmarks.module,v
retrieving revision 1.43
diff -U3 -r1.43 bookmarks.module
--- bookmarks.module	5 Aug 2006 14:13:55 -0000	1.43
+++ bookmarks.module	1 May 2007 21:39:52 -0000
@@ -28,9 +28,6 @@
  */
 function bookmarks_help($section) {
   switch ($section) {
-    case 'admin/modules#description':
-      return t("Enables users to bookmark any page on the site.");
-
     case 'user/bookmarks':
       return t('A bookmark is a link to an address (URL) on the internet.');
       break;
@@ -92,19 +89,27 @@
     $result = db_query('SELECT url, title FROM {bookmarks} WHERE uid = %d ORDER BY title', $user->uid);
     $bookmarks = array();
     while ($data = db_fetch_object($result)) {
-      $bookmarks[] = '<div class="bookmark-icon">'. theme('bookmarks_delete', $data->url) .'</div>'. _bookmarks_get_link($data->url, $data->title);
+      $bookmarks[] = '<span class="bookmark-icon">'. theme('bookmarks_delete', $data->url) .'</span> '. _bookmarks_get_link($data->url, $data->title);
     }

     // Print bookmarks list as an item list
     $output = (count($bookmarks) ? theme('item_list', $bookmarks) : t('You have no bookmarks.'));
     $links = array(
-      l(t('quick link'), "bookmarks/$user->uid/add/quick", array('title' => t('Bookmark the current page.')), 'title='. urlencode(drupal_get_title())),
-      l(t('manage'), "bookmarks/$user->uid")
+      'bookmarks_quick' => array(
+        'title'      => t('Quick link'),
+        'href'       => "bookmarks/$user->uid/add/quick",
+        'attributes' => array('title' => t('Bookmark the current page.')),
+        'query'      => 'title='. urlencode(drupal_get_title()),
+      ),
+      'bookmarks_manage' => array(
+        'title'      => t('Manage'),
+        'href'       => "bookmarks/$user->uid",
+      ),
     );
     $output .= '<div class="links">'. theme("links", $links) .'</div>';

     return array(
-      'subject' => t('%username\'s bookmarks', array('%username' => $user->name)),
+      'subject' => t('@username\'s bookmarks', array('@username' => $user->name)),
       'content' => $output
     );
   }
@@ -125,7 +130,7 @@
   global $user;

   $query = 'url=' . urlencode($url). '&amp;block=1';
-  return l(theme('image', 'modules/bookmarks/trash.gif', t('delete')), "bookmarks/$user->uid/delete", array("title" => t("Delete this bookmark from your list.")), $query, NULL, FALSE, TRUE);
+  return l(theme('image', drupal_get_path('module', 'bookmarks') .'/trash.gif', t('Delete')), "bookmarks/$user->uid/delete", array("title" => t("Delete this bookmark from your list.")), $query, NULL, FALSE, TRUE);
 }
 /**  @} End of addtogroup themeable **/

@@ -141,7 +146,7 @@
 function bookmarks_page() {
   global $user;

-  $edit = $_POST['edit'];
+  $edit = $_POST;
   $op   = $_POST['op'];

   switch (($op ? $op : arg(2))) {
@@ -151,12 +156,12 @@
       if (arg(3) == 'quick') {
         $edit = bookmarks_load_quicklink();
       }
-      $output = bookmarks_form($edit);
+      $output = drupal_get_form('bookmarks_form', $edit);
       break;

     case 'edit':
       $title = t('Edit bookmark');
-      $output = ($url = urldecode($_GET['url'])) ? bookmarks_form(bookmarks_load($url)) : drupal_set_message(t('Bookmark cannot be edited, because it is not in your list.'), 'error');
+      $output = ($url = urldecode($_GET['url'])) ? drupal_get_form('bookmarks_form', bookmarks_load($url)) : drupal_set_message(t('Bookmark cannot be edited, because it is not in your list.'), 'error');
       break;

     case 'delete':
@@ -170,7 +175,7 @@
         drupal_goto("bookmarks/$user->uid");
       }
       else {
-        $output .= bookmarks_form($edit);
+        $output .= drupal_get_form('bookmarks_form', $edit);
       }
       break;

@@ -217,7 +222,7 @@
     '#default_value' => $edit['url'],
     '#size' => 60,
     '#maxlength' => 128,
-    '#description' => t('Enter the address of the page you want to bookmark. This can be an internal or external reference.'),
+    '#description' => t('Enter the address of the page you want to add to your bookmarks. This can be an internal or external URL.'),
     '#attributes' => null,
     '#required' => true,
   );
@@ -229,7 +234,7 @@
     '#type' => 'submit',
     '#value' => t('Save'),
   );
-  return drupal_get_form('bookmarks_form', $form);
+  return $form;
 }

 function bookmarks_load($url) {
@@ -280,16 +285,21 @@
   global $user;

   $header = array(
-    array('data' => t('title'), 'field' => 'title', 'sort' => 'asc'),
-    array('data' => t('link'), 'field' => 'url'),
-    array('data' => t('operations'), 'colspan' => 2)
+    array('data' => t('Title'), 'field' => 'title', 'sort' => 'asc'),
+    array('data' => t('Link'), 'field' => 'url'),
+    array('data' => t('Operations'), 'colspan' => 2)
   );
   $sql = 'SELECT url, title FROM {bookmarks} WHERE uid = '. db_escape_string($user->uid). tablesort_sql($header);
   $result = pager_query($sql, 50);

   while ($data = db_fetch_object($result)) {
     $title = (strlen($data->url) > 50) ? substr($data->url, 0, 47). '...' : $data->url;
-    $rows[] = array($data->title, _bookmarks_get_link($data->url, $title), '&nbsp;'.l(t('edit'), "bookmarks/$user->uid/edit", null, 'url=' . urlencode($data->url)).' '. l(t('delete'), "bookmarks/$user->uid/delete", null, 'url=' . urlencode($data->url)));
+    $rows[] = array(
+      $data->title,
+      _bookmarks_get_link($data->url, $title),
+      array('data' => l(t('Edit'), "bookmarks/$user->uid/edit", null, 'url=' . urlencode($data->url))),
+      array('data' => l(t('Delete'), "bookmarks/$user->uid/delete", null, 'url=' . urlencode($data->url))),
+      );
   }

   $pager = theme('pager', null, 50, 0);
@@ -350,5 +360,3 @@
 function _bookmarks_get_link($url, $title) {
   return (preg_match("!^[a-zA-Z]+://!", $url)) ? "<a href=\"$url\">$title</a>" : l($title, $url);
 }
-
-?>
Index: bookmarks.mysql
===================================================================
RCS file: bookmarks.mysql
diff -N bookmarks.mysql
--- bookmarks.mysql	3 Aug 2006 03:12:06 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,7 +0,0 @@
-CREATE TABLE bookmarks (
-  uid INT UNSIGNED NOT NULL,
-  url VARCHAR(128) NOT NULL,
-  title VARCHAR(128) NOT NULL
-) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;
-
-ALTER TABLE bookmarks ADD INDEX (uid);
Index: bookmarks.pgsql
===================================================================
RCS file: bookmarks.pgsql
diff -N bookmarks.pgsql
--- bookmarks.pgsql	2 Aug 2006 13:17:58 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,7 +0,0 @@
-CREATE TABLE bookmarks (
-  uid INTEGER NOT NULL,
-  url VARCHAR(255) NOT NULL,
-  title VARCHAR(255) NOT NULL
-);
-
-CREATE INDEX bookmarks_uid_index ON bookmarks (uid);
