summaryrefslogtreecommitdiff
path: root/includes/theme.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-02-18 15:14:56 +0000
committerDries Buytaert <dries@buytaert.net>2001-02-18 15:14:56 +0000
commit4371b627d51ffc5af9498fa1877d8e519a5f2c6e (patch)
treebc83240be6329005e30a5c21ff83163397ca0fd1 /includes/theme.inc
parentc93bcff8b85a24fe200fe27bd4c8f860f7d01b9c (diff)
downloadbrdo-4371b627d51ffc5af9498fa1877d8e519a5f2c6e.tar.gz
brdo-4371b627d51ffc5af9498fa1877d8e519a5f2c6e.tar.bz2
- 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
Diffstat (limited to 'includes/theme.inc')
-rw-r--r--includes/theme.inc8
1 files changed, 4 insertions, 4 deletions
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 @@
<?
-function theme_load() {
+function theme_init() {
global $user, $themes;
if ($user->theme && file_exists($themes[$user->theme][0])) {
@@ -39,7 +39,7 @@ function theme_account($theme) {
$content .= "<LI><A HREF=\"account.php?op=edit&topic=content\">". t("edit your content") ."</A></LI>\n";
$content .= "<P>\n";
- if (user_permission($user)) {
+ if (user_access($user)) {
$content .= "<LI><A HREF=\"admin.php\">administer ". $site_name ."</A></LI>\n";
$content .= "<P>\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") ."'.<BR>";
+ $output .= format_username($account->userid) ." voted `". user_get($account, "history", "s$story->id") ."'.<BR>";
}
$theme->box("Moderation results", ($output ? $output : "This story has not been moderated yet."));