? bookmarks_4.patch
? bookmarks_5.patch
Index: bookmarks.info
===================================================================
RCS file: bookmarks.info
diff -N bookmarks.info
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ bookmarks.info 7 Nov 2007 21:24:34 -0000
@@ -0,0 +1,3 @@
+name = "Bookmarks"
+description = "Bookmarks any URL on your site"
+version = "5.x-1.x-dev"
\ No newline at end of file
Index: bookmarks.install
===================================================================
RCS file: bookmarks.install
diff -N bookmarks.install
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ bookmarks.install 7 Nov 2007 21:24:34 -0000
@@ -0,0 +1,26 @@
+uid/add/quick", array('title' => t('Bookmark the current page.')), 'title='. urlencode(drupal_get_title())),
- l(t('manage'), "bookmarks/$user->uid")
+ $links['bookmarks_quick_link'] = array(
+ 'title' => t("quick link"),
+ 'href' => "bookmarks/$user->uid/add/quick",
+ 'attributes' => array('title' => t('Bookmark the current page.')), 'title='. urlencode(drupal_get_title())
);
+
+ $links['bookmarks_manage'] = array (
+ 'title' => t("manage"),
+ 'href' => "bookmarks/$user->uid"
+ );
+
$output .= '
'. theme("links", $links) .'
';
return array(
@@ -125,7 +132,7 @@
global $user;
$query = 'url=' . urlencode($url). '&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 +148,7 @@
function bookmarks_page() {
global $user;
- $edit = $_POST['edit'];
+ $edit = $_POST;
$op = $_POST['op'];
switch (($op ? $op : arg(2))) {
@@ -154,12 +161,12 @@
elseif (arg(3) == 'weblink') {
$edit = bookmarks_load_weblink(arg(4));
}
- $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':
@@ -173,7 +180,7 @@
drupal_goto("bookmarks/$user->uid");
}
else {
- $output .= bookmarks_form($edit);
+ $output = drupal_get_form('bookmarks_form', $edit);
}
break;
@@ -232,7 +239,7 @@
'#type' => 'submit',
'#value' => t('Save'),
);
- return drupal_get_form('bookmarks_form', $form);
+ return $form;
}
function bookmarks_load($url) {