/[drupal]/contributions/modules/bookmarks2/bookmarks2.module
ViewVC logotype

Diff of /contributions/modules/bookmarks2/bookmarks2.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.8.4.6, Tue Aug 5 13:02:41 2008 UTC revision 1.8.4.7, Tue Aug 5 13:07:03 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: bookmarks2.module,v 1.8.4.5 2008/08/05 12:49:31 sanduhrs Exp $  // $Id: bookmarks2.module,v 1.8.4.6 2008/08/05 13:02:41 sanduhrs Exp $
3    
4  /**  /**
5   * Bookmarks2   * Bookmarks2
# Line 275  function bookmarks2_feed() { Line 275  function bookmarks2_feed() {
275  /**  /**
276   * Confirmation screen to make sure user really wants to delete their bookmark   * Confirmation screen to make sure user really wants to delete their bookmark
277   */   */
278  function bookmarks2_delete_confirm(&$form_state = null, $url = NULL, $uid = NULL) {  function bookmarks2_delete_confirm($url = NULL, $uid = NULL) {
279    if (!$url) {    if (!$url) {
280      $url = check_plain($_GET['url']);      $url = check_plain($_GET['url']);
281    }    }
# Line 293  function bookmarks2_delete_confirm(&$for Line 293  function bookmarks2_delete_confirm(&$for
293  function bookmarks2_delete_confirm_submit($form_id, $form_values) {  function bookmarks2_delete_confirm_submit($form_id, $form_values) {
294    global $user;    global $user;
295    
296    db_query("DELETE FROM {bookmarks2} WHERE uid = %d AND url = '%s'", $user->uid, $form_state['values']['url']);    db_query("DELETE FROM {bookmarks2} WHERE uid = %d AND url = '%s'", $user->uid, $form_values['url']);
297    drupal_set_message(t('Deleted bookmark.'));    drupal_set_message(t('Deleted bookmark.'));
298    
299    drupal_goto('bookmarks2');    drupal_goto('bookmarks2');
# Line 471  function bookmarks2_form($edit = null) { Line 471  function bookmarks2_form($edit = null) {
471  /**  /**
472   * Form validation   * Form validation
473   */   */
474  function bookmarks2_form_validate($form, &$form_state) {  function bookmarks2_form_validate($form, &$form_values) {
475    if ((isset($form_state['values']['pword']) && $form_state['values']['pword'] == '') && (!isset($form_state['values']['key']) || !$form_state['values']['key'])) {    if ((isset($form_values['pword']) && $form_values['pword'] == '') && (!isset($form_values['key']) || !$form_values['key'])) {
476      form_set_error('pword', t('You must supply your bookmark reminder key to encrypt the password for your login reminder.'));      form_set_error('pword', t('You must supply your bookmark reminder key to encrypt the password for your login reminder.'));
477    }    }
478    elseif ($form_state['values']['key'] && !_bookmarks2_check_key($form_state['values']['key'])) {    elseif ($form_values['key'] && !_bookmarks2_check_key($form_values['key'])) {
479      form_set_error('key', t('The reminder key you supplied does not match the one on record.'));      form_set_error('key', t('The reminder key you supplied does not match the one on record.'));
480    }    }
481  }  }

Legend:
Removed from v.1.8.4.6  
changed lines
  Added in v.1.8.4.7

  ViewVC Help
Powered by ViewVC 1.1.2