Changeset 18995 for trunk/include
- Timestamp:
- Nov 11, 2012, 4:01:09 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_comment.inc.php
r18164 r18995 310 310 function update_user_comment($comment, $post_key) 311 311 { 312 global $conf ;312 global $conf, $page; 313 313 314 314 $comment_action = 'validate'; … … 336 336 ); 337 337 338 // website 339 if (!empty($comment['website_url'])) 340 { 341 if (!preg_match('/^https?/i', $comment['website_url'])) 342 { 343 $comment['website_url'] = 'http://'.$comment['website_url']; 344 } 345 if (!url_check_format($comment['website_url'])) 346 { 347 array_push($page['errors'], l10n('Your website URL is invalid')); 348 $comment_action='reject'; 349 } 350 } 351 338 352 if ( $comment_action!='reject' ) 339 353 { … … 348 362 UPDATE '.COMMENTS_TABLE.' 349 363 SET content = \''.$comment['content'].'\', 364 website_url = '.(!empty($comment['website_url']) ? '\''.$comment['website_url'].'\'' : 'NULL').', 350 365 validated = \''.($comment_action=='validate' ? 'true':'false').'\', 351 366 validation_date = '.($comment_action=='validate' ? 'NOW()':'NULL').'
Note: See TracChangeset
for help on using the changeset viewer.