Index: modules/comment/comment.module =================================================================== RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v retrieving revision 1.616 diff -u -p -r1.616 comment.module --- modules/comment/comment.module 10 Jan 2008 15:03:53 -0000 1.616 +++ modules/comment/comment.module 24 Jan 2008 17:15:52 -0000 @@ -542,7 +542,7 @@ function comment_form_alter(&$form, $for COMMENT_ANONYMOUS_MUST_CONTACT => t('Anonymous posters must leave their contact information')), '#description' => t('This option is enabled when anonymous users have permission to post comments on the permissions page.', array('@url' => url('admin/user/permissions', array('fragment' => 'module-comment')))), ); - if (!user_access('post comments', user_load(array('uid' => 0)))) { + if (!user_access('post comments', drupal_anonymous_user())) { $form['comment']['comment_anonymous']['#disabled'] = TRUE; } $form['comment']['comment_subject_field'] = array( Index: modules/system/system.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/system/system.admin.inc,v retrieving revision 1.59 diff -u -p -r1.59 system.admin.inc --- modules/system/system.admin.inc 24 Jan 2008 10:59:29 -0000 1.59 +++ modules/system/system.admin.inc 24 Jan 2008 17:15:54 -0000 @@ -582,7 +582,7 @@ function _system_is_incompatible(&$incom } // The 'dependencies' key in .info files was a string in Drupal 5, but changed // to an array in Drupal 6. If it is not an array, the module is not - // compatible and we can skip the check below which requires an array. + // compatible and we can skip the check below which requires an array. if (!is_array($file->info['dependencies'])) { $file->info['dependencies'] = array(); $incompatible[$file->name] = TRUE; @@ -1694,7 +1694,7 @@ function system_status($check = FALSE) { include_once './includes/install.inc'; drupal_load_updates(); - // Check run-time requirements and status information + // Check run-time requirements and status information. $requirements = module_invoke_all('requirements', 'runtime'); usort($requirements, '_system_sort_requirements'); Index: modules/user/user.module =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.module,v retrieving revision 1.889 diff -u -p -r1.889 user.module --- modules/user/user.module 22 Jan 2008 07:51:56 -0000 1.889 +++ modules/user/user.module 24 Jan 2008 17:15:55 -0000 @@ -180,6 +180,12 @@ function user_load($array = array()) { } user_module_invoke('load', $array, $user); } + else if ($array['uid'] == 0) { + // MySQL import might have set the uid of the anonymous user to + // autoincrement value. Let's try fixing it. + db_query("UPDATE {users} SET uid = uid - uid WHERE name = '' AND pass = '' AND status = 0"); + $user = drupal_anonymous_user(); + } else { $user = FALSE; }