diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-05-21 16:54:19 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-05-21 16:54:19 +0000 |
commit | 530b7e94c5e10eb1b9aa2ea488825265b685651e (patch) | |
tree | e679fd1af844e3b80d36923bde481873aee0e56d /phpBB/includes/functions_posting.php | |
parent | 2ddac1037550a12e6a49dd7d78f7884ce584eedc (diff) | |
download | forums-530b7e94c5e10eb1b9aa2ea488825265b685651e.tar forums-530b7e94c5e10eb1b9aa2ea488825265b685651e.tar.gz forums-530b7e94c5e10eb1b9aa2ea488825265b685651e.tar.bz2 forums-530b7e94c5e10eb1b9aa2ea488825265b685651e.tar.xz forums-530b7e94c5e10eb1b9aa2ea488825265b685651e.zip |
- fixing a few smaller bugs/glitches
- init user session in cron.php (else it can produce errors if functions expect the user object being set)
- fix sql escaping for mssql/mssql_odbc
git-svn-id: file:///svn/phpbb/trunk@5957 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r-- | phpBB/includes/functions_posting.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 2210be1ab9..5d8f1dcb90 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -688,13 +688,13 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0) // If forum_id == 0 AND topic_id == 0 then this is a PM draft if (!$topic_id && !$forum_id) { - $sql_and = 'AND d.forum_id = 0 AND d.topic_id = 0'; + $sql_and = ' AND d.forum_id = 0 AND d.topic_id = 0'; } else { $sql_and = ''; - $sql_and .= ($forum_id) ? 'AND d.forum_id = ' . $forum_id : ''; - $sql_and .= ($topic_id) ? 'AND d.topic_id = ' . $topic_id : ''; + $sql_and .= ($forum_id) ? ' AND d.forum_id = ' . $forum_id : ''; + $sql_and .= ($topic_id) ? ' AND d.topic_id = ' . $topic_id : ''; } $sql = 'SELECT d.*, f.forum_id, f.forum_name @@ -1580,7 +1580,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u { if (trim($poll['poll_options'][$i])) { - if (!$cur_poll_options[$i]) + if (empty($cur_poll_options[$i])) { $sql_insert_ary[] = array( 'poll_option_id' => (int) $i, |