equal
deleted
inserted
replaced
1 <?php |
1 <?php |
2 |
2 |
3 /* |
3 /* |
4 * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between |
4 * Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between |
5 * Version 1.1.6 (Caoineag beta 1) |
5 * Copyright (C) 2006-2009 Dan Fuhry |
6 * Copyright (C) 2006-2008 Dan Fuhry |
|
7 * |
6 * |
8 * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License |
7 * This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License |
9 * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
8 * as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. |
10 * |
9 * |
11 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
10 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
155 '; |
154 '; |
156 $row['comment_data'] = $wrapper; |
155 $row['comment_data'] = $wrapper; |
157 } |
156 } |
158 |
157 |
159 // Format date |
158 // Format date |
160 $row['time'] = enano_date('F d, Y h:i a', $row['time']); |
159 $row['time'] = enano_date(ED_DATE | ED_TIME, $row['time']); |
161 |
160 |
162 // Format signature |
161 // Format signature |
163 $row['signature'] = ( !empty($row['signature']) ) ? RenderMan::render($row['signature']) : ''; |
162 $row['signature'] = ( !empty($row['signature']) ) ? RenderMan::render($row['signature']) : ''; |
164 |
163 |
165 // Do we have the IP? |
164 // Do we have the IP? |
317 $text = RenderMan::render($text); |
316 $text = RenderMan::render($text); |
318 $appr = ( getConfig('approve_comments', '0') == '1' ) ? COMMENT_UNAPPROVED : COMMENT_APPROVED; |
317 $appr = ( getConfig('approve_comments', '0') == '1' ) ? COMMENT_UNAPPROVED : COMMENT_APPROVED; |
319 if ( $appr === COMMENT_APPROVED && $spam_policy === 'moderate' && !$spamcheck ) |
318 if ( $appr === COMMENT_APPROVED && $spam_policy === 'moderate' && !$spamcheck ) |
320 $appr = COMMENT_SPAM; |
319 $appr = COMMENT_SPAM; |
321 $time = time(); |
320 $time = time(); |
322 $date = enano_date('F d, Y h:i a', $time); |
321 $date = enano_date(ED_DATE | ED_TIME, $time); |
323 $ip = $_SERVER['REMOTE_ADDR']; |
322 $ip = $_SERVER['REMOTE_ADDR']; |
324 if ( !is_valid_ip($ip) ) |
323 if ( !is_valid_ip($ip) ) |
325 die('Hacking attempt'); |
324 die('Hacking attempt'); |
326 |
325 |
327 // Send it to the database |
326 // Send it to the database |