diff options
-rw-r--r-- | reminder.module | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/reminder.module b/reminder.module index e241222..7d5b82f 100644 --- a/reminder.module +++ b/reminder.module @@ -346,16 +346,9 @@ function reminder_node_submit($node, $form, &$form_state) { } else { // Fetch existing options. - $query = db_select('reminder', 'r'); - $query - ->condition('r.nid', $node->nid) - ->fields('r', array('uid', 'url', 'admin_url')); - $result = $query->execute(); - - foreach ($result as $record) { - $reminder_url = $record->url; - $admin_url = $record->admin_url; - } + $reminder = reminder_get_reminder($node->nid); + $reminder_url = $reminder['url']; + $admin_url = $reminder['admin_url']; // Update basic data. node_save($node); |