Changeset 3600
- Timestamp:
- Jul 16, 2009, 7:20:34 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/comments.php
r3520 r3600 88 88 $page['items_number'] = $_GET['items_number']; 89 89 } 90 if ( !is_numeric($page['items_number']) and $page['items_number']!='all' ) 90 if ( !is_numeric($page['items_number']) and $page['items_number']!='all' ) 91 91 { 92 92 $page['items_number'] = 10; … … 272 272 INNER JOIN '.COMMENTS_TABLE.' AS com 273 273 ON ic.image_id = com.image_id 274 LEFT JOIN '.USERS_TABLE.' As u275 ON u.'.$conf['user_fields']['id'].' = com.author_id276 274 WHERE '.implode(' 277 275 AND ', $page['where_clauses']).' … … 305 303 , com.author 306 304 , com.author_id 307 , '.$conf['user_fields']['username'].' AS username308 305 , com.date 309 306 , com.content … … 312 309 INNER JOIN '.COMMENTS_TABLE.' AS com 313 310 ON ic.image_id = com.image_id 314 LEFT JOIN '.USERS_TABLE.' AS u315 ON u.'.$conf['user_fields']['id'].' = com.author_id316 311 WHERE '.implode(' 317 312 AND ', $page['where_clauses']).' … … 379 374 ); 380 375 381 if (!empty($comment['author']))382 {383 $author = $comment['author'];384 if ($author == 'guest')385 {386 $author = l10n('guest');387 }388 }389 else390 {391 $author = $comment['username'];392 }393 394 376 $tpl_comment = 395 377 array( … … 397 379 'TN_SRC' => $thumbnail_src, 398 380 'ALT' => $name, 399 'AUTHOR' => trigger_event('render_comment_author', $ author),381 'AUTHOR' => trigger_event('render_comment_author', $comment['author']), 400 382 'DATE'=>format_date($comment['date'], true), 401 383 'CONTENT'=>trigger_event('render_comment_content',$comment['content']), -
trunk/include/functions_comment.inc.php
r3489 r3600 111 111 else 112 112 { 113 $comm['author'] = '';113 $comm['author'] = addslashes($user['username']); 114 114 $comm['author_id'] = $user['id']; 115 115 } … … 172 172 173 173 if (($comment_action=='validate' and $conf['email_admin_on_comment']) or 174 ($comment_action!='validate' 175 and $conf['email_admin_on_comment_validation'])) 174 ($comment_action!='validate' and $conf['email_admin_on_comment_validation'])) 176 175 { 177 176 include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php'); … … 179 178 $del_url = get_absolute_root_url().'comments.php?delete='.$comm['id']; 180 179 181 if (empty($comm['author']))182 {183 $author_name = $user['username'];184 }185 else186 {187 $author_name = stripslashes($comm['author']);188 }189 180 $keyargs_content = array 190 181 ( 191 get_l10n_args('Author: %s', $author_name),182 get_l10n_args('Author: %s', stripslashes($comm['author']) ), 192 183 get_l10n_args('Comment: %s', stripslashes($comm['content']) ), 193 184 get_l10n_args('', ''), … … 206 197 pwg_mail_notification_admins 207 198 ( 208 get_l10n_args('Comment by %s', $author_name),199 get_l10n_args('Comment by %s', stripslashes($comm['author']) ), 209 200 $keyargs_content 210 201 ); -
trunk/template/yoga/comment_list.tpl
r3487 r3600 11 11 </div> 12 12 {/if} 13 <div class="description" style="height:{if ($comment.IN_EDIT==1)}200{/if}px">13 <div class="description" style="height:{if isset($comment.IN_EDIT)}200{/if}px"> 14 14 {if isset($comment.U_DELETE) or isset($comment.U_VALIDATE) or isset($comment.U_EDIT) } 15 15 <ul class="actions" style="float:right"> … … 21 21 </li> 22 22 {/if} 23 {if isset($comment.U_EDIT) and ($comment.IN_EDIT!=1)}23 {if isset($comment.U_EDIT) and !isset($comment.IN_EDIT)} 24 24 <li> 25 25 <a class="editComment" href="{$comment.U_EDIT}#edit_comment" title="{'edit this comment'|@translate}"> … … 38 38 {/if} 39 39 <span class="author">{$comment.AUTHOR}</span> - <span class="date">{$comment.DATE}</span> 40 {if ($comment.IN_EDIT==1)}40 {if isset($comment.IN_EDIT)} 41 41 <a name="edit_comment"></a> 42 42 <form method="post" action="{$comment.U_EDIT}" class="filter" id="editComment">
Note: See TracChangeset
for help on using the changeset viewer.