summaryrefslogtreecommitdiff
path: root/modules/story.module
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 /modules/story.module
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 'modules/story.module')
-rw-r--r--modules/story.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/story.module b/modules/story.module
index 47671033e..535821ccd 100644
--- a/modules/story.module
+++ b/modules/story.module
@@ -20,7 +20,7 @@ function story_find($keys) {
$find = array();
$result = db_query("SELECT s.*, u.userid FROM stories s LEFT JOIN users u ON s.author = u.id WHERE s.status = 2 AND (s.subject LIKE '%". check_input($keys) ."%' OR s.abstract LIKE '%". check_input($keys) ."%' OR s.article LIKE '%". check_input($keys) ."%') ORDER BY s.timestamp DESC LIMIT 20");
while ($story = db_fetch_object($result)) {
- array_push($find, array("subject" => check_output($story->subject), "link" => (user_permission($user) ? "admin.php?mod=story&op=edit&id=$story->id" : "story.php?id=$story->id"), "user" => $story->userid, "date" => $story->timestamp));
+ array_push($find, array("subject" => check_output($story->subject), "link" => (user_access($user, "story") ? "admin.php?mod=story&op=edit&id=$story->id" : "story.php?id=$story->id"), "user" => $story->userid, "date" => $story->timestamp));
}
return $find;
}