From 4371b627d51ffc5af9498fa1877d8e519a5f2c6e Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 18 Feb 2001 15:14:56 +0000 Subject: - added fine-grained user permission system which allows us to give certain users access to specific administration sections only. Ex. a FAQ maintainer can only edit the FAQ, and members of an "editorial board" can only edit comments, diaries and stories, .. - code review => rewrote include/user.inc which is much easier now - fixed 4 small bugs --- includes/theme.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'includes/theme.inc') diff --git a/includes/theme.inc b/includes/theme.inc index 1bdff7b41..d5ea7dc87 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -1,6 +1,6 @@ theme && file_exists($themes[$user->theme][0])) { @@ -39,7 +39,7 @@ function theme_account($theme) { $content .= "
  • ". t("edit your content") ."
  • \n"; $content .= "

    \n"; - if (user_permission($user)) { + if (user_access($user)) { $content .= "

  • administer ". $site_name ."
  • \n"; $content .= "

    \n"; } @@ -95,10 +95,10 @@ function theme_morelink($theme, $story) { function theme_moderation_results($theme, $story) { global $user; - if ($user->id && $story->id && ($user->id == $story->author || user_get_history($user->history, "s$story->id"))) { + if ($user->id && $story->id && ($user->id == $story->author || user_get($user, "history", "s$story->id"))) { $result = db_query("SELECT * FROM users WHERE history LIKE '%s$story->id%'"); while ($account = db_fetch_object($result)) { - $output .= format_username($account->userid) ." voted `". user_get_history($account->history, "s$story->id") ."'.
    "; + $output .= format_username($account->userid) ." voted `". user_get($account, "history", "s$story->id") ."'.
    "; } $theme->box("Moderation results", ($output ? $output : "This story has not been moderated yet.")); -- cgit v1.2.3