Changeset 15571 for branches


Ignore:
Timestamp:
Jun 5, 2012, 9:55:23 PM (12 years ago)
Author:
mistic100
Message:

merge r15570 from trunk
bug:2645 author field is kept when comment not validated

Location:
branches/2.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.3/include/picture_comment.inc.php

    r11839 r15571  
    234234  {
    235235    $key = get_ephemeral_key(3, $page['image_id']);
    236     $content = '';
     236    $content = $author = '';
    237237    if ('reject'===@$comment_action)
    238238    {
    239239      $content = htmlspecialchars( stripslashes($comm['content']) );
     240      $author = htmlspecialchars( stripslashes($comm['author']) );
    240241    }
    241242    $template->assign('comment_add',
     
    244245          'KEY' => $key,
    245246          'CONTENT' => $content,
    246           'SHOW_AUTHOR' => !is_classic_user()
     247          'SHOW_AUTHOR' => !is_classic_user(),
     248          'AUTHOR' => $author ,
    247249        ));
    248250  }
  • branches/2.3/themes/default/template/picture.tpl

    r12480 r15571  
    307307                <legend>{'Add a comment'|@translate}</legend>
    308308                {if $comment_add.SHOW_AUTHOR}
    309                 <label>{'Author'|@translate}<input type="text" name="author"></label>
     309                <label>{'Author'|@translate}<input type="text" name="author" value="{$comment_add.AUTHOR}"></label>
    310310                {/if}
    311311                <label>{'Comment'|@translate}<textarea name="content" id="contentid" rows="5" cols="80">{$comment_add.CONTENT}</textarea></label>
Note: See TracChangeset for help on using the changeset viewer.