[geeklog-cvs] geeklog: E_ALL fix
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sun Feb 7 11:04:07 EST 2010
changeset 7713:2d8045d0f615
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/2d8045d0f615
user: Dirk Haun <dirk at haun-online.de>
date: Sun Feb 07 16:00:19 2010 +0100
description:
E_ALL fix
diffstat:
public_html/comment.php | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
diffs (46 lines):
diff -r c5484e960d88 -r 2d8045d0f615 public_html/comment.php
--- a/public_html/comment.php Sun Feb 07 13:39:50 2010 +0100
+++ b/public_html/comment.php Sun Feb 07 16:00:19 2010 +0100
@@ -433,18 +433,24 @@
default: // New Comment
$abort = false;
- $sid = COM_applyFilter ($_REQUEST['sid']);
- $type = COM_applyFilter ($_REQUEST['type']);
+ $sid = '';
+ if (isset($_REQUEST['sid'])) {
+ $sid = COM_applyFilter($_REQUEST['sid']);
+ }
+ $type = 'article';
+ if (isset($_REQUEST['type'])) {
+ $type = COM_applyFilter($_REQUEST['type']);
+ }
$title = '';
- if (isset ($_REQUEST['title'])) {
- $title = strip_tags ($_REQUEST['title']);
+ if (isset($_REQUEST['title'])) {
+ $title = strip_tags($_REQUEST['title']);
}
$postmode = $_CONF['postmode'];
- if (isset ($_REQUEST['postmode'])) {
- $postmode = COM_applyFilter ($_REQUEST['postmode']);
+ if (isset($_REQUEST['postmode'])) {
+ $postmode = COM_applyFilter($_REQUEST['postmode']);
}
- if ($type == 'article') {
+ if (($type == 'article') && !empty($sid)) {
$dbTitle = DB_getItem($_TABLES['stories'], 'title',
"(sid = '$sid') AND (draft_flag = 0) AND (date <= NOW()) AND (commentcode = 0)"
. COM_getPermSQL('AND') . COM_getTopicSQL('AND'));
@@ -455,8 +461,8 @@
}
}
if (!$abort) {
- if (!empty ($sid) && !empty ($type)) {
- if (empty ($title)) {
+ if (!empty($sid) && !empty($type)) {
+ if (empty($title)) {
if ($type == 'article') {
$title = $dbTitle;
}
More information about the geeklog-cvs
mailing list