Changeset 8600


Ignore:
Timestamp:
Jan 10, 2011, 10:31:05 PM (13 years ago)
Author:
rvelices
Message:
  • fix undefined function when editing a user comment on picture page
File:
1 edited

Legend:

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

    r7495 r8600  
    188188      if (can_manage_comment('edit', $row['author_id']))
    189189      {
    190         $tpl_comment['U_EDIT'] = add_url_params(
     190        $tpl_comment['U_EDIT'] = add_url_params(
    191191          $url_self,
    192192          array(
     
    196196            )
    197197          );
    198         if (isset($edit_comment) and ($row['id'] == $edit_comment))
    199         {
    200           $tpl_comment['IN_EDIT'] = true;
    201           $key = get_comment_post_key(2, $page['image_id']);
    202           $tpl_comment['KEY'] = $key;
    203           $tpl_comment['CONTENT'] = $row['content'];
    204         }
     198          if (isset($edit_comment) and ($row['id'] == $edit_comment))
     199          {
     200            $tpl_comment['IN_EDIT'] = true;
     201            $key = get_ephemeral_key(2, $page['image_id']);
     202            $tpl_comment['KEY'] = $key;
     203            $tpl_comment['CONTENT'] = $row['content'];
     204          }
    205205      }
    206206      if (is_admin())
    207207      {
    208         if ($row['validated'] != 'true')
    209         {
    210           $tpl_comment['U_VALIDATE'] = add_url_params(
    211             $url_self,
    212             array(
    213               'action' => 'validate_comment',
    214               'comment_to_validate' => $row['id'],
    215               'pwg_token' => get_pwg_token(),
    216               )
    217             );
    218         }
     208        if ($row['validated'] != 'true')
     209        {
     210          $tpl_comment['U_VALIDATE'] = add_url_params(
     211                  $url_self,
     212                  array(
     213                    'action' => 'validate_comment',
     214                    'comment_to_validate' => $row['id'],
     215                    'pwg_token' => get_pwg_token(),
     216                    )
     217                  );
     218        }
    219219      }
    220220      $template->append('comments', $tpl_comment);
Note: See TracChangeset for help on using the changeset viewer.