- Timestamp:
- Nov 11, 2011, 2:57:12 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Comments_on_Albums/include/functions_comment.inc.php
r12562 r12601 195 195 $user_where_clause = ' AND author_id = \''.$GLOBALS['user']['id'].'\''; 196 196 } 197 198 if (is_array($comment_id)) 199 $where_clause = 'id IN('.implode(',', $comment_id).')'; 200 else 201 $where_clause = 'id = '.$comment_id; 202 197 203 $query = ' 198 204 DELETE FROM '.COA_TABLE.' 199 WHERE id = '.$comment_id.205 WHERE '.$where_clause. 200 206 $user_where_clause.' 201 207 ;'; 202 208 $result = pwg_query($query); 203 if ($result) { 209 210 if ($result) 211 { 204 212 email_admin('delete', 205 213 array('author' => $GLOBALS['user']['username'], … … 366 374 } 367 375 376 /** 377 * Tries to validate a user comment in the database 378 * @param int or array of int comment_id 379 */ 368 380 function validate_user_comment_albums($comment_id) 369 381 { 382 if (is_array($comment_id)) 383 $where_clause = 'id IN('.implode(',', $comment_id).')'; 384 else 385 $where_clause = 'id = '.$comment_id; 386 370 387 $query = ' 371 388 UPDATE '.COA_TABLE.' 372 389 SET validated = \'true\' 373 390 , validation_date = NOW() 374 WHERE id = '.$comment_id.'391 WHERE '.$where_clause.' 375 392 ;'; 376 393 pwg_query($query);
Note: See TracChangeset
for help on using the changeset viewer.