Changeset 3445 for trunk/include/functions_user.inc.php
- Timestamp:
- Jun 23, 2009, 3:44:58 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_user.inc.php
r3282 r3445 1196 1196 1197 1197 return ($user['adviser'] == 'true'); 1198 } 1199 1200 /* 1201 * Return if current user can edit/delete a comment 1202 * @param action edit/delete 1203 * @return bool 1204 */ 1205 function can_manage_comment($action, $comment_author) 1206 { 1207 if (!in_array($action, array('delete','edit'))) { 1208 return false; 1209 } 1210 return (is_admin() || 1211 (($GLOBALS['user']['username'] == $comment_author) 1212 && $GLOBALS['conf'][sprintf('user_can_%s_comment', $action)])); 1198 1213 } 1199 1214
Note: See TracChangeset
for help on using the changeset viewer.