Revert "Fix thread creation"

This reverts commit bc8e0a49b8.
remotes/angel/1.11.x
Angel Fernando Quiroz Campos 9 years ago
parent 5780662ab7
commit 7158ee4186
  1. 4
      main/forum/forumfunction.inc.php
  2. 7
      main/forum/newthread.php

@ -2937,8 +2937,8 @@ function show_add_post_form($current_forum, $forum_setting, $action = '', $id =
return false;
}
Security::clear_token();
store_thread($current_forum, $values);
return $values;
}
} else {
$token = Security::get_token();

@ -167,7 +167,7 @@ echo '</div>';
// Set forum attachment data into $_SESSION
getAttachedFiles($current_forum['forum_id'], 0, 0);
show_add_post_form(
$values = show_add_post_form(
$current_forum,
$forum_setting,
'newthread',
@ -175,6 +175,11 @@ show_add_post_form(
isset($_SESSION['formelements']) ? $_SESSION['formelements'] : null
);
if (!empty($values) && isset($values['SubmitPost'])) {
// Add new thread in table forum_thread.
store_thread($current_forum, $values);
}
if (isset($origin) && $origin == 'learnpath') {
Display::display_reduced_footer();
} else {

Loading…
Cancel
Save