diff --git a/drupal/sites/default/boinc/modules/boinccore/boinccore.module b/drupal/sites/default/boinc/modules/boinccore/boinccore.module index 4ca1a54e72..dfc76f4bc1 100644 --- a/drupal/sites/default/boinc/modules/boinccore/boinccore.module +++ b/drupal/sites/default/boinc/modules/boinccore/boinccore.module @@ -165,7 +165,7 @@ function boinccore_enable() { */ function boinccore_cron() { // Notify moderators if there is site content that requires moderator action - $items_in_queue = boincuser_moderation_queue_count(); + $items_in_queue = boincuser_moderation_queue_count('cron'); $last_notification = variable_get('boinccore_last_content_moderation_reminder', 0); if ($items_in_queue AND $last_notification < time() - 24*60*60) { global $base_url; diff --git a/drupal/sites/default/boinc/modules/boincuser/boincuser.module b/drupal/sites/default/boinc/modules/boincuser/boincuser.module index e6d564a97f..297f24c634 100644 --- a/drupal/sites/default/boinc/modules/boincuser/boincuser.module +++ b/drupal/sites/default/boinc/modules/boincuser/boincuser.module @@ -1351,8 +1351,17 @@ function boincuser_moderate_community_access() { /** * Get the count of items in the moderation queue */ -function boincuser_moderation_queue_count() { - if (user_access('edit any profile content')) { +function boincuser_moderation_queue_count($caller = 'user') { + $allowed = FALSE; + switch ($caller) { + case 'cron': + $allowed = TRUE; + break; + case 'user': + default: + $allowed = user_access('edit any profile content'); + } + if ($allowed) { return db_result(db_query(" SELECT COUNT(*) FROM {node}