From 12cebe41230ef69caf245b6add23f939ca4be94c Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 26 Apr 2012 19:29:43 -0300 Subject: Minor cleanup --- reminder.module | 13 +++---------- 1 file 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); -- cgit v1.2.3