Ignore:
Timestamp:
Jun 23, 2009, 11:18:16 PM (15 years ago)
Author:
nikrou
Message:

Feature 1026 step 2 :
add author_id column so that guest cannot modify old users comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_user.inc.php

    r3445 r3450  
    12031203 * @return bool
    12041204 */
    1205 function can_manage_comment($action, $comment_author)
     1205function can_manage_comment($action, $comment_author_id)
    12061206{
    12071207  if (!in_array($action, array('delete','edit'))) {
     
    12091209  }
    12101210  return (is_admin() ||
    1211           (($GLOBALS['user']['username'] == $comment_author)
     1211          (($GLOBALS['user']['id'] == $comment_author_id)
     1212           && !is_a_guest()
    12121213           && $GLOBALS['conf'][sprintf('user_can_%s_comment', $action)]));
    12131214}
Note: See TracChangeset for help on using the changeset viewer.