aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorjaviexin <javiexin@gmail.com>2015-07-09 20:02:39 +0200
committerjaviexin <javiexin@gmail.com>2015-07-09 20:02:39 +0200
commit054da801144c5e6f70a3c7fcd8244c38e2a1c619 (patch)
treedbbdb2dcb9cea44e67a5d0122946167786c557fe /phpBB/includes/functions_posting.php
parent558d604d83fd5ded2edc854a9944ad0d1188e2e5 (diff)
parentf576f42b4d3c607aee6b30154502adfed79301fb (diff)
downloadforums-054da801144c5e6f70a3c7fcd8244c38e2a1c619.tar
forums-054da801144c5e6f70a3c7fcd8244c38e2a1c619.tar.gz
forums-054da801144c5e6f70a3c7fcd8244c38e2a1c619.tar.bz2
forums-054da801144c5e6f70a3c7fcd8244c38e2a1c619.tar.xz
forums-054da801144c5e6f70a3c7fcd8244c38e2a1c619.zip
Merge pull request #1 from phpbb/3.1.x
Bring version up to date 20150708
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index a06d6f4c35..ca8baecff8 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1542,7 +1542,14 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
return false;
}
- $current_time = time();
+ if (!empty($data['post_time']))
+ {
+ $current_time = $data['post_time'];
+ }
+ else
+ {
+ $current_time = time();
+ }
if ($mode == 'post')
{
@@ -1738,6 +1745,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
'topic_type' => $topic_type,
'topic_time_limit' => ($topic_type == POST_STICKY || $topic_type == POST_ANNOUNCE) ? ($data['topic_time_limit'] * 86400) : 0,
'topic_attachment' => (!empty($data['attachment_data'])) ? 1 : 0,
+ 'topic_status' => (isset($data['topic_status'])) ? $data['topic_status'] : ITEM_UNLOCKED,
);
if (isset($poll['poll_options']) && !empty($poll['poll_options']))
@@ -2209,7 +2217,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
}
$error = false;
- $search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
+ $search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user, $phpbb_dispatcher);
if ($error)
{