aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/posting.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-10-11 13:48:30 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-10-11 13:48:30 +0000
commit99d968dd2eccb1157b2252b55d770ea903f8eb96 (patch)
treebc9e4bb401ea413dcbeaa9679f7076584d5b0885 /phpBB/posting.php
parent97c72d7075408cae67fb03215a93371c85e593cd (diff)
downloadforums-99d968dd2eccb1157b2252b55d770ea903f8eb96.tar
forums-99d968dd2eccb1157b2252b55d770ea903f8eb96.tar.gz
forums-99d968dd2eccb1157b2252b55d770ea903f8eb96.tar.bz2
forums-99d968dd2eccb1157b2252b55d770ea903f8eb96.tar.xz
forums-99d968dd2eccb1157b2252b55d770ea903f8eb96.zip
some fixes
git-svn-id: file:///svn/phpbb/trunk@6478 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r--phpBB/posting.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index f6941369a7..aae7f4d5a1 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -131,6 +131,11 @@ $result = $db->sql_query($sql);
$post_data = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
+if (!$post_data)
+{
+ trigger_error(($mode == 'post' || $mode == 'bump' || $mode == 'reply') ? 'NO_TOPIC' : 'NO_POST');
+}
+
if ($mode == 'popup')
{
upload_popup($post_data['forum_style']);
@@ -683,7 +688,7 @@ if ($submit || $preview || $refresh)
}
// Validate username
- if (($post_data['username'] && !$user->data['is_registered']) || ($mode == 'edit' && $post_data['username'] && $post_data['post_username'] != $post_data['username']))
+ if (($post_data['username'] && !$user->data['is_registered']) || ($mode == 'edit' && $post_data['username'] && $post_data['post_username'] && $post_data['post_username'] != $post_data['username']))
{
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);