diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-11-12 09:14:30 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-11-12 09:14:30 +0000 |
commit | 7dd24bec5c65462a095fd5a011e75113aab3714c (patch) | |
tree | e0939056cc189fc85873c2ab4c06d5392555742c | |
parent | c2fcb6d5198f0bbec54787744eac0ed24ef9db96 (diff) | |
download | brdo-7dd24bec5c65462a095fd5a011e75113aab3714c.tar.gz brdo-7dd24bec5c65462a095fd5a011e75113aab3714c.tar.bz2 |
- SQL query maintenance: '%d' -> %d.
-rw-r--r-- | includes/locale.inc | 4 | ||||
-rw-r--r-- | modules/contact.module | 8 | ||||
-rw-r--r-- | modules/contact/contact.module | 8 | ||||
-rw-r--r-- | modules/poll.module | 2 | ||||
-rw-r--r-- | modules/poll/poll.module | 2 | ||||
-rw-r--r-- | modules/user.module | 4 | ||||
-rw-r--r-- | modules/user/user.module | 4 |
7 files changed, 16 insertions, 16 deletions
diff --git a/includes/locale.inc b/includes/locale.inc index 8bd5269f0..9c2a17aa0 100644 --- a/includes/locale.inc +++ b/includes/locale.inc @@ -173,10 +173,10 @@ function _locale_import_po($file, $lang, $mode) { // Get the plural formula if ($hdr["Plural-Forms"] && $p = _locale_import_parse_plural_forms($hdr["Plural-Forms"], $file->filename)) { list($nplurals, $plural) = $p; - db_query("UPDATE {locales_meta} SET plurals = '%d', formula = '%s' WHERE locale = '%s'", $nplurals, $plural, $lang); + db_query("UPDATE {locales_meta} SET plurals = %d, formula = '%s' WHERE locale = '%s'", $nplurals, $plural, $lang); } else { - db_query("UPDATE {locales_meta} SET plurals = '%d', formula = '%s' WHERE locale = '%s'", 0, '', $lang); + db_query("UPDATE {locales_meta} SET plurals = %d, formula = '%s' WHERE locale = '%s'", 0, '', $lang); } } else { 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. |