Skip to content
Snippets Groups Projects
Commit 42cd39db authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- fixed permission bug in rating.module
parent 7bd45884
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -93,16 +93,16 @@ function rating_list($limit) { ...@@ -93,16 +93,16 @@ function rating_list($limit) {
function rating_page() { function rating_page() {
global $user, $theme; global $user, $theme;
if (user_access($user, "access user ratings")) { $theme->header();
$theme->header();
if (user_access("access user ratings")) {
$theme->box(t("Top 100 users"), rating_list(100)); $theme->box(t("Top 100 users"), rating_list(100));
$theme->footer();
} }
else { else {
$theme->header();
$theme->box(t("Access denied"), message_access()); $theme->box(t("Access denied"), message_access());
$theme->footer();
} }
$theme->footer();
} }
function rating_block() { function rating_block() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment