Changeset 4139 for trunk/comments.php
- Timestamp:
- Oct 28, 2009, 9:34:29 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/comments.php
r3600 r4139 61 61 ); 62 62 63 $page['since'] = isset($_GET['since']) ? $_GET['since'] : 4; 63 if (!empty($_GET['since']) && is_numeric($_GET['since'])) 64 { 65 $page['since'] = $_GET['since']; 66 } 67 else 68 { 69 $page['since'] = 4; 70 } 64 71 65 72 // on which field sorting … … 103 110 104 111 // search a particular author 105 if ( isset($_GET['author']) and!empty($_GET['author']))112 if (!empty($_GET['author'])) 106 113 { 107 114 $page['where_clauses'][] = … … 111 118 112 119 // search a substring among comments content 113 if ( isset($_GET['keyword']) and!empty($_GET['keyword']))120 if (!empty($_GET['keyword'])) 114 121 { 115 122 $page['where_clauses'][] = … … 198 205 array( 199 206 'F_ACTION'=>PHPWG_ROOT_PATH.'comments.php', 200 'F_KEYWORD'=> @htmlspecialchars(stripslashes($_GET['keyword'])),201 'F_AUTHOR'=> @htmlspecialchars(stripslashes($_GET['author'])),207 'F_KEYWORD'=> @htmlspecialchars($_GET['keyword'], ENT_QUOTES, 'utf-8'), 208 'F_AUTHOR'=> @htmlspecialchars($_GET['author'], ENT_QUOTES, 'utf-8'), 202 209 ) 203 210 ); … … 270 277 SELECT COUNT(DISTINCT(com.id)) 271 278 FROM '.IMAGE_CATEGORY_TABLE.' AS ic 272 INNER JOIN '.COMMENTS_TABLE.' AS com 279 INNER JOIN '.COMMENTS_TABLE.' AS com 273 280 ON ic.image_id = com.image_id 281 LEFT JOIN '.USERS_TABLE.' As u 282 ON u.'.$conf['user_fields']['id'].' = com.author_id 274 283 WHERE '.implode(' 275 284 AND ', $page['where_clauses']).' … … 309 318 INNER JOIN '.COMMENTS_TABLE.' AS com 310 319 ON ic.image_id = com.image_id 320 LEFT JOIN '.USERS_TABLE.' As u 321 ON u.'.$conf['user_fields']['id'].' = com.author_id 311 322 WHERE '.implode(' 312 323 AND ', $page['where_clauses']).'
Note: See TracChangeset
for help on using the changeset viewer.