summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-11-12 09:14:30 +0000
committerDries Buytaert <dries@buytaert.net>2005-11-12 09:14:30 +0000
commit7dd24bec5c65462a095fd5a011e75113aab3714c (patch)
treee0939056cc189fc85873c2ab4c06d5392555742c /modules
parentc2fcb6d5198f0bbec54787744eac0ed24ef9db96 (diff)
downloadbrdo-7dd24bec5c65462a095fd5a011e75113aab3714c.tar.gz
brdo-7dd24bec5c65462a095fd5a011e75113aab3714c.tar.bz2
- SQL query maintenance: '%d' -> %d.
Diffstat (limited to 'modules')
-rw-r--r--modules/contact.module8
-rw-r--r--modules/contact/contact.module8
-rw-r--r--modules/poll.module2
-rw-r--r--modules/poll/poll.module2
-rw-r--r--modules/user.module4
-rw-r--r--modules/user/user.module4
6 files changed, 14 insertions, 14 deletions
diff --git a/modules/contact.module b/modules/contact.module
index 597cd0f3c..2f745a7c1 100644
--- a/modules/contact.module
+++ b/modules/contact.module
@@ -187,13 +187,13 @@ function contact_admin_edit($cid = NULL) {
}
if (!form_get_errors()) {
- db_query("DELETE FROM {contact} WHERE cid = '%d'", $cid);
+ db_query("DELETE FROM {contact} WHERE cid = %d", $cid);
db_query("INSERT INTO {contact} (category, recipients, reply) VALUES ('%s', '%s', '%s')", $edit['category'], $edit['recipients'], $edit['reply']);
drupal_goto('admin/contact');
}
}
else {
- $category = db_fetch_object(db_query("SELECT * FROM {contact} WHERE cid = '%d'", $cid));
+ $category = db_fetch_object(db_query("SELECT * FROM {contact} WHERE cid = %d", $cid));
$edit['cid'] = $category->cid;
$edit['category'] = $category->category;
$edit['recipients'] = $category->recipients;
@@ -209,7 +209,7 @@ function contact_admin_edit($cid = NULL) {
}
function contact_admin_delete($cid) {
- $info = db_fetch_object(db_query("SELECT cid, category FROM {contact} WHERE cid = '%d'",$cid));
+ $info = db_fetch_object(db_query("SELECT cid, category FROM {contact} WHERE cid = %d",$cid));
if ($_POST['op'] != t('Delete')) {
return confirm_form('contact_admin_delete', array(),
t('Are you sure you want to delete %category?', array('%category' => theme('placeholder', $info->category))),
@@ -219,7 +219,7 @@ function contact_admin_delete($cid) {
t('Cancel'));
}
else {
- db_query("DELETE FROM {contact} WHERE cid = '%d'", $cid);
+ db_query("DELETE FROM {contact} WHERE cid = %d", $cid);
drupal_goto('admin/contact');
}
}
diff --git a/modules/contact/contact.module b/modules/contact/contact.module
index 597cd0f3c..2f745a7c1 100644
--- a/modules/contact/contact.module
+++ b/modules/contact/contact.module
@@ -187,13 +187,13 @@ function contact_admin_edit($cid = NULL) {
}
if (!form_get_errors()) {
- db_query("DELETE FROM {contact} WHERE cid = '%d'", $cid);
+ db_query("DELETE FROM {contact} WHERE cid = %d", $cid);
db_query("INSERT INTO {contact} (category, recipients, reply) VALUES ('%s', '%s', '%s')", $edit['category'], $edit['recipients'], $edit['reply']);
drupal_goto('admin/contact');
}
}
else {
- $category = db_fetch_object(db_query("SELECT * FROM {contact} WHERE cid = '%d'", $cid));
+ $category = db_fetch_object(db_query("SELECT * FROM {contact} WHERE cid = %d", $cid));
$edit['cid'] = $category->cid;
$edit['category'] = $category->category;
$edit['recipients'] = $category->recipients;
@@ -209,7 +209,7 @@ function contact_admin_edit($cid = NULL) {
}
function contact_admin_delete($cid) {
- $info = db_fetch_object(db_query("SELECT cid, category FROM {contact} WHERE cid = '%d'",$cid));
+ $info = db_fetch_object(db_query("SELECT cid, category FROM {contact} WHERE cid = %d",$cid));
if ($_POST['op'] != t('Delete')) {
return confirm_form('contact_admin_delete', array(),
t('Are you sure you want to delete %category?', array('%category' => theme('placeholder', $info->category))),
@@ -219,7 +219,7 @@ function contact_admin_delete($cid) {
t('Cancel'));
}
else {
- db_query("DELETE FROM {contact} WHERE cid = '%d'", $cid);
+ db_query("DELETE FROM {contact} WHERE cid = %d", $cid);
drupal_goto('admin/contact');
}
}
diff --git a/modules/poll.module b/modules/poll.module
index 8ee7c3b3a..9ca9a4787 100644
--- a/modules/poll.module
+++ b/modules/poll.module
@@ -97,7 +97,7 @@ function poll_execute(&$node) {
$node->choice = array_values($node->choice);
$node->teaser = poll_teaser($node);
}
-
+
/**
* Implementation of hook_validate().
*/
diff --git a/modules/poll/poll.module b/modules/poll/poll.module
index 8ee7c3b3a..9ca9a4787 100644
--- a/modules/poll/poll.module
+++ b/modules/poll/poll.module
@@ -97,7 +97,7 @@ function poll_execute(&$node) {
$node->choice = array_values($node->choice);
$node->teaser = poll_teaser($node);
}
-
+
/**
* Implementation of hook_validate().
*/
diff --git a/modules/user.module b/modules/user.module
index 3319974ed..76d29ef02 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -851,7 +851,7 @@ function user_login($edit = array(), $msg = '') {
watchdog('user', t('Session opened for %name.', array('%name' => theme('placeholder', $user->name))));
// Update the user table timestamp noting user has logged in.
- db_query("UPDATE {users} SET login = '%d' WHERE uid = '%s'", time(), $user->uid);
+ db_query("UPDATE {users} SET login = %d WHERE uid = '%s'", time(), $user->uid);
user_module_invoke('login', $edit, $user);
@@ -1029,7 +1029,7 @@ function user_pass_reset($uid, $timestamp, $hashed_pass) {
watchdog('user', t('One time login URL used for %name with timestamp %timestamp.', array('%name' => "<em>$account->name</em>", '%timestamp' => $timestamp)));
// Update the user table noting user has logged in.
// And this also makes this hashed password a one-time-only login.
- db_query("UPDATE {users} SET login = '%d' WHERE uid = %d", time(), $account->uid);
+ db_query("UPDATE {users} SET login = %d WHERE uid = %d", time(), $account->uid);
// Now we can set the new user.
$user = $account;
// And proceed with normal login, going to user page.
diff --git a/modules/user/user.module b/modules/user/user.module
index 3319974ed..76d29ef02 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -851,7 +851,7 @@ function user_login($edit = array(), $msg = '') {
watchdog('user', t('Session opened for %name.', array('%name' => theme('placeholder', $user->name))));
// Update the user table timestamp noting user has logged in.
- db_query("UPDATE {users} SET login = '%d' WHERE uid = '%s'", time(), $user->uid);
+ db_query("UPDATE {users} SET login = %d WHERE uid = '%s'", time(), $user->uid);
user_module_invoke('login', $edit, $user);
@@ -1029,7 +1029,7 @@ function user_pass_reset($uid, $timestamp, $hashed_pass) {
watchdog('user', t('One time login URL used for %name with timestamp %timestamp.', array('%name' => "<em>$account->name</em>", '%timestamp' => $timestamp)));
// Update the user table noting user has logged in.
// And this also makes this hashed password a one-time-only login.
- db_query("UPDATE {users} SET login = '%d' WHERE uid = %d", time(), $account->uid);
+ db_query("UPDATE {users} SET login = %d WHERE uid = %d", time(), $account->uid);
// Now we can set the new user.
$user = $account;
// And proceed with normal login, going to user page.