Ignore:
Timestamp:
Jun 23, 2009, 3:44:58 PM (15 years ago)
Author:
nikrou
Message:

Feature 1026 : Modify / delete comments for users

+ update config table content
+ minor modification of Sylvia theme
+ need refactoring

File:
1 edited

Legend:

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

    r3409 r3445  
    152152        );
    153153
     154      if (can_manage_comment('delete', $row['author']))
     155      {
     156        $tpl_comment['U_DELETE'] =
     157          add_url_params($url_self,
     158                         array(
     159                           'action'=>'delete_comment',
     160                           'comment_to_delete'=>$row['id']
     161                               )
     162                         );
     163      }
     164      if (can_manage_comment('edit', $row['author']))
     165      {
     166        $tpl_comment['U_EDIT'] =
     167          add_url_params($url_self,
     168                         array(
     169                           'action'=>'edit_comment',
     170                           'comment_to_edit'=>$row['id']
     171                               )
     172                         );
     173        if (isset($edit_comment) and ($row['id'] == $edit_comment))
     174        {
     175          $tpl_comment['IN_EDIT'] = true;
     176          $key = get_comment_post_key($page['image_id']);
     177          $tpl_comment['KEY'] = $key;
     178          $tpl_comment['CONTENT'] = $row['content'];
     179        }
     180      }
    154181      if (is_admin())
    155182      {
    156         $tpl_comment['U_DELETE'] =
    157             add_url_params(
    158                   $url_self,
    159                   array(
    160                     'action'=>'delete_comment',
    161                     'comment_to_delete'=>$row['id']
    162                   )
    163               );
    164183        if ($row['validated'] != 'true')
    165184        {
     
    177196
    178197  if (!is_a_guest()
    179       or (is_a_guest() and $conf['comments_forall']))
     198      or (is_a_guest() and $conf['comments_forall'])
     199      and (isset($edit_comment) and ($edit_comment != null)))
    180200  {
    181201    $key = get_comment_post_key($page['image_id']);
Note: See TracChangeset for help on using the changeset viewer.