summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/system.module11
-rw-r--r--modules/system/system.module11
-rw-r--r--modules/user.module4
-rw-r--r--modules/user/user.module4
4 files changed, 14 insertions, 16 deletions
diff --git a/modules/system.module b/modules/system.module
index 8be2b1749..874bffbfd 100644
--- a/modules/system.module
+++ b/modules/system.module
@@ -829,10 +829,9 @@ function system_modules() {
}
- /**
- * Handle status checkboxes, including overriding the generated checkboxes for required modules.
- */
- $form['status'] = array(type => 'checkboxes', default_value => $status, options => $options, tree => TRUE);
+ // Handle status checkboxes, including overriding the generated
+ // checkboxes for required modules.
+ $form['status'] = array(type => 'checkboxes', default_value => $status, options => $options, tree => TRUE);
$required = array('block', 'filter', 'system', 'user', 'watchdog');
foreach ($required as $require) {
$form['status'][$require] = array(type => 'hidden', value => 1, suffix => t('required'));
@@ -879,11 +878,11 @@ function theme_system_modules($form) {
function system_modules_execute($form_id, $edit) {
- db_query("update {system} set status = 0, throttle = 0 where type = 'module'");
+ db_query("UPDATE {system} SET status = 0, throttle = 0 WHERE type = 'module'");
foreach ($edit['status'] as $key => $choice) {
if ($choice) {
- db_query("update {system} set status = 1 where type = 'module' and name = '%s'", $key);
+ db_query("UPDATE {system} SET status = 1 WHERE type = 'module' AND name = '%s'", $key);
}
}
diff --git a/modules/system/system.module b/modules/system/system.module
index 8be2b1749..874bffbfd 100644
--- a/modules/system/system.module
+++ b/modules/system/system.module
@@ -829,10 +829,9 @@ function system_modules() {
}
- /**
- * Handle status checkboxes, including overriding the generated checkboxes for required modules.
- */
- $form['status'] = array(type => 'checkboxes', default_value => $status, options => $options, tree => TRUE);
+ // Handle status checkboxes, including overriding the generated
+ // checkboxes for required modules.
+ $form['status'] = array(type => 'checkboxes', default_value => $status, options => $options, tree => TRUE);
$required = array('block', 'filter', 'system', 'user', 'watchdog');
foreach ($required as $require) {
$form['status'][$require] = array(type => 'hidden', value => 1, suffix => t('required'));
@@ -879,11 +878,11 @@ function theme_system_modules($form) {
function system_modules_execute($form_id, $edit) {
- db_query("update {system} set status = 0, throttle = 0 where type = 'module'");
+ db_query("UPDATE {system} SET status = 0, throttle = 0 WHERE type = 'module'");
foreach ($edit['status'] as $key => $choice) {
if ($choice) {
- db_query("update {system} set status = 1 where type = 'module' and name = '%s'", $key);
+ db_query("UPDATE {system} SET status = 1 WHERE type = 'module' AND name = '%s'", $key);
}
}
diff --git a/modules/user.module b/modules/user.module
index 82ec33280..f71713e23 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -517,8 +517,8 @@ function user_block($op = 'list', $delta = 0, $edit = array()) {
case 0:
// For usability's sake, avoid showing two login forms on one page.
if (!$user->uid && !(arg(0) == 'user' && !is_numeric(arg(1)))) {
- $form['name'] = array(type => 'textfield', title => t('Username'), maxlength => 64, size => 15, required => TRUE);
- $form['pass'] = array(type => 'password', title => t('Password'), maxlength => 64, size => 15, required => TRUE);
+ $form['name'] = array(type => 'textfield', title => t('Username'), maxlength => 64, size => 15);
+ $form['pass'] = array(type => 'password', title => t('Password'), maxlength => 64, size => 15);
$form['submit'] = array(type => 'submit', value => t('Log in'));
$output .= drupal_get_form('user_login_block', $form, 'user_login');
if (variable_get('user_register', 1)) {
diff --git a/modules/user/user.module b/modules/user/user.module
index 82ec33280..f71713e23 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -517,8 +517,8 @@ function user_block($op = 'list', $delta = 0, $edit = array()) {
case 0:
// For usability's sake, avoid showing two login forms on one page.
if (!$user->uid && !(arg(0) == 'user' && !is_numeric(arg(1)))) {
- $form['name'] = array(type => 'textfield', title => t('Username'), maxlength => 64, size => 15, required => TRUE);
- $form['pass'] = array(type => 'password', title => t('Password'), maxlength => 64, size => 15, required => TRUE);
+ $form['name'] = array(type => 'textfield', title => t('Username'), maxlength => 64, size => 15);
+ $form['pass'] = array(type => 'password', title => t('Password'), maxlength => 64, size => 15);
$form['submit'] = array(type => 'submit', value => t('Log in'));
$output .= drupal_get_form('user_login_block', $form, 'user_login');
if (variable_get('user_register', 1)) {