Changeset 4140 for branches/2.0/comments.php
- Timestamp:
- Oct 28, 2009, 9:39:00 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/comments.php
r3519 r4140 60 60 ); 61 61 62 $page['since'] = isset($_GET['since']) ? $_GET['since'] : 4; 62 if (!empty($_GET['since']) && is_numeric($_GET['since'])) 63 { 64 $page['since'] = $_GET['since']; 65 } 66 else 67 { 68 $page['since'] = 4; 69 } 63 70 64 71 // on which field sorting … … 102 109 103 110 // search a particular author 104 if ( isset($_GET['author']) and!empty($_GET['author']))111 if (!empty($_GET['author'])) 105 112 { 106 113 $page['where_clauses'][] = 'com.author = \''.$_GET['author'].'\''; … … 108 115 109 116 // search a substring among comments content 110 if ( isset($_GET['keyword']) and!empty($_GET['keyword']))117 if (!empty($_GET['keyword'])) 111 118 { 112 119 $page['where_clauses'][] = … … 181 188 array( 182 189 'F_ACTION'=>PHPWG_ROOT_PATH.'comments.php', 183 'F_KEYWORD'=> @htmlspecialchars(stripslashes($_GET['keyword'])),184 'F_AUTHOR'=> @htmlspecialchars(stripslashes($_GET['author'])),190 'F_KEYWORD'=> @htmlspecialchars($_GET['keyword'], ENT_QUOTES, 'utf-8'), 191 'F_AUTHOR'=> @htmlspecialchars($_GET['author'], ENT_QUOTES, 'utf-8'), 185 192 ) 186 193 ); … … 253 260 SELECT COUNT(DISTINCT(id)) 254 261 FROM '.IMAGE_CATEGORY_TABLE.' AS ic 255 INNER JOIN '.COMMENTS_TABLE.' AS com 262 INNER JOIN '.COMMENTS_TABLE.' AS com 256 263 ON ic.image_id = com.image_id 264 LEFT JOIN '.USERS_TABLE.' As u 265 ON u.'.$conf['user_fields']['id'].' = com.author_id 257 266 WHERE '.implode(' 258 267 AND ', $page['where_clauses']).' … … 291 300 INNER JOIN '.COMMENTS_TABLE.' AS com 292 301 ON ic.image_id = com.image_id 302 LEFT JOIN '.USERS_TABLE.' As u 303 ON u.'.$conf['user_fields']['id'].' = com.author_id 293 304 WHERE '.implode(' 294 305 AND ', $page['where_clauses']).'
Note: See TracChangeset
for help on using the changeset viewer.