aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2003-05-26 23:53:34 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2003-05-26 23:53:34 +0000
commite1484f522d28194c63d424bc621b93d3cf8865b9 (patch)
treea6c2e5b249ac9c688525f24737fc8e29d1c669e1 /phpBB/includes/functions_posting.php
parent4e71b1b96d21e78463a768004c1c8ed2e1d952d5 (diff)
downloadforums-e1484f522d28194c63d424bc621b93d3cf8865b9.tar
forums-e1484f522d28194c63d424bc621b93d3cf8865b9.tar.gz
forums-e1484f522d28194c63d424bc621b93d3cf8865b9.tar.bz2
forums-e1484f522d28194c63d424bc621b93d3cf8865b9.tar.xz
forums-e1484f522d28194c63d424bc621b93d3cf8865b9.zip
Majority are UCP related updates ... avatars should now work, aside from gallery, fixed a few other issues, updated schema/basic
git-svn-id: file:///svn/phpbb/trunk@4062 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php35
1 files changed, 24 insertions, 11 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index c5a45cffa3..b790d2831a 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -883,6 +883,10 @@ function phpbb_unlink($filename, $mode = 'file', $use_ftp = false)
}
+
+
+
+
//
// posting.php specific
//
@@ -968,8 +972,8 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_
$post_sql = array_merge($post_sql, array(
'post_checksum' => $post_data['message_md5'],
'post_text' => $message,
- 'post_encoding' => $user->lang['ENCODING']
- ));
+ 'post_encoding' => $user->lang['ENCODING'])
+ );
}
if ($mode == 'edit')
@@ -995,9 +999,9 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_
if ($poll['poll_start'] && $mode == 'edit')
{
- $sql = "SELECT * FROM " . POLL_OPTIONS_TABLE . "
- WHERE topic_id = " . $post_data['topic_id'] . "
- ORDER BY poll_option_id";
+ $sql = 'SELECT * FROM ' . POLL_OPTIONS_TABLE . '
+ WHERE topic_id = ' . $post_data['topic_id'] . '
+ ORDER BY poll_option_id';
$result = $db->sql_query($sql);
while ($cur_poll_options[] = $db->sql_fetchrow($result));
@@ -1010,15 +1014,16 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_
{
if (empty($cur_poll_options[$i]))
{
- $sql = "INSERT INTO " . POLL_OPTIONS_TABLE . " (poll_option_id, topic_id, poll_option_text)
- VALUES (" . $i . ", " . $post_data['topic_id'] . ", '" . $db->sql_escape($poll['poll_options'][$i]) . "')";
+ $sql = 'INSERT INTO ' . POLL_OPTIONS_TABLE . " (poll_option_id, topic_id, poll_option_text)
+ VALUES ($i, " . $post_data['topic_id'] . ", '" . $db->sql_escape($poll['poll_options'][$i]) . "')";
$db->sql_query($sql);
}
else if ($poll['poll_options'][$i] != $cur_poll_options[$i])
{
$sql = "UPDATE " . POLL_OPTIONS_TABLE . "
SET poll_option_text = '" . $db->sql_escape($poll['poll_options'][$i]) . "'
- WHERE poll_option_id = " . $cur_poll_options[$i]['poll_option_id'];
+ WHERE poll_option_id = " . $cur_poll_options[$i]['poll_option_id'] . "
+ AND topic_id = $topic_id";
$db->sql_query($sql);
}
}
@@ -1026,9 +1031,9 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_
if (sizeof($poll['poll_options']) < sizeof($cur_poll_options))
{
- $sql = "DELETE FROM " . POLL_OPTIONS_TABLE . "
- WHERE poll_option_id > " . sizeof($poll['poll_options']) . "
- AND topic_id = " . $post_data['topic_id'];
+ $sql = 'DELETE FROM ' . POLL_OPTIONS_TABLE . '
+ WHERE poll_option_id > ' . sizeof($poll['poll_options']) . '
+ AND topic_id = ' . $post_data['topic_id'];
$db->sql_query($sql);
}
}
@@ -1248,6 +1253,10 @@ function user_notification($mode, $subject, $forum_id, $topic_id, $post_id)
}
$db->sql_freeresult($result);
+
+
+
+ // TODO : Paul
// Now grab group settings ... users can belong to multiple groups so we grab
// the minimum setting for all options. ACL_NO overrides ACL_YES so act appropriatley
$sql = "SELECT ug.user_id, MIN(a.auth_setting) as min_setting
@@ -1272,6 +1281,10 @@ function user_notification($mode, $subject, $forum_id, $topic_id, $post_id)
$allowed_users = array_unique($allowed_users);
}
+
+
+
+
//
if ($topic_notification)
{