Changeset 17351 for trunk/include/functions_comment.inc.php
- Timestamp:
- Aug 3, 2012, 7:02:24 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_comment.inc.php
r15983 r17351 128 128 } 129 129 130 // website 131 if ( !empty($comm['website_url']) and !preg_match('/^https?/i', $comm['website_url']) ) 132 { 133 $comm['website_url'] = 'http://'.$comm['website_url']; 134 } 135 if ( !empty($comm['website_url']) and !url_check_format($comm['website_url']) ) 136 { 137 array_push($infos, l10n('Your website URL is invalid')); 138 $comment_action='reject'; 139 } 140 130 141 // anonymous id = ip address 131 142 $ip_components = explode('.', $comm['ip']); … … 169 180 $query = ' 170 181 INSERT INTO '.COMMENTS_TABLE.' 171 (author, author_id, anonymous_id, content, date, validated, validation_date, image_id )182 (author, author_id, anonymous_id, content, date, validated, validation_date, image_id, website_url) 172 183 VALUES ( 173 184 \''.$comm['author'].'\', … … 178 189 \''.($comment_action=='validate' ? 'true':'false').'\', 179 190 '.($comment_action=='validate' ? 'NOW()':'NULL').', 180 '.$comm['image_id'].' 191 '.$comm['image_id'].', 192 '.(!empty($comm['website_url']) ? '\''.$comm['website_url'].'\'' : 'NULL').' 181 193 ) 182 194 ';
Note: See TracChangeset
for help on using the changeset viewer.