| 302 | | /* function update_user_comment_albums($comment, $post_key) |
| 303 | | { |
| 304 | | global $conf; |
| 305 | | |
| 306 | | $comment_action = 'validate'; |
| 307 | | |
| 308 | | if ( !verify_ephemeral_key($post_key, $comment['image_id']) ) |
| 309 | | { |
| 310 | | $comment_action='reject'; |
| 311 | | } |
| 312 | | |
| 313 | | // perform more spam check |
| 314 | | $comment_action = |
| 315 | | trigger_event('user_comment_check', |
| 316 | | $comment_action, |
| 317 | | array_merge($comment, |
| 318 | | array('author' => $GLOBALS['user']['username']) |
| 319 | | ) |
| 320 | | ); |
| 321 | | |
| 322 | | if ( $comment_action!='reject' ) |
| 323 | | { |
| 324 | | $user_where_clause = ''; |
| 325 | | if (!is_admin()) |
| 326 | | { |
| 327 | | $user_where_clause = ' AND author_id = \''. |
| 328 | | $GLOBALS['user']['id'].'\''; |
| 329 | | } |
| 330 | | $query = ' |
| 331 | | UPDATE '.COA_TABLE.' |
| 332 | | SET content = \''.$comment['content'].'\', |
| 333 | | validation_date = now() |
| 334 | | WHERE id = '.$comment['comment_id']. |
| 335 | | $user_where_clause.' |
| 336 | | ;'; |
| 337 | | $result = pwg_query($query); |
| 338 | | if ($result) { |
| 339 | | email_admin('edit', array('author' => $GLOBALS['user']['username'], |
| 340 | | 'content' => stripslashes($comment['content'])) ); |
| 341 | | } |
| 342 | | } |
| 343 | | }*/ |
| 344 | | |