aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-04-26 19:29:43 -0300
committerSilvio Rhatto <rhatto@riseup.net>2012-04-26 19:29:43 -0300
commit12cebe41230ef69caf245b6add23f939ca4be94c (patch)
treee1eff6152a46c2ae4eff0e3305cd3e301e65e1f1
parent8f71a84aa25c9d3944f10da3effdfe0476303fcd (diff)
downloadreminder-12cebe41230ef69caf245b6add23f939ca4be94c.tar.gz
reminder-12cebe41230ef69caf245b6add23f939ca4be94c.tar.bz2
Minor cleanup
-rw-r--r--reminder.module13
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);