aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2001-05-29 19:43:21 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2001-05-29 19:43:21 +0000
commit6f3d969459df36c41df9ea723983c2d296cd18c5 (patch)
tree678f6dbf4b975f834fb238ae22f028b5b932ab3f /phpBB
parenta474e1481d88562bec729a64760540a0a456629b (diff)
downloadforums-6f3d969459df36c41df9ea723983c2d296cd18c5.tar
forums-6f3d969459df36c41df9ea723983c2d296cd18c5.tar.gz
forums-6f3d969459df36c41df9ea723983c2d296cd18c5.tar.bz2
forums-6f3d969459df36c41df9ea723983c2d296cd18c5.tar.xz
forums-6f3d969459df36c41df9ea723983c2d296cd18c5.zip
Added the jump to post made to posting.php
git-svn-id: file:///svn/phpbb/trunk@372 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/posting.php77
1 files changed, 71 insertions, 6 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index fff1bf7426..f4a92d9f7f 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -198,6 +198,11 @@ switch($mode)
$page_title = " ".$lang['Postnew'];
$section_title = $lang['Post_new_in'];
+ if($SQL_LAYER != "mysql")
+ {
+ $result = $db->sql_query("BEGIN");
+ }
+
if(isset($HTTP_POST_VARS['submit']) && !$error)
{
$topic_time = get_gmt_ts();
@@ -229,10 +234,19 @@ switch($mode)
$db->sql_query($sql);
}
+ if(SQL_LAYER != "mysql")
+ {
+ $result = $db->sql_query("COMMIT");
+ if(!$result)
+ {
+ error_die(SQL_ERROR, "Couldn't commit");
+ }
+ }
+
include('includes/page_header.'.$phpEx);
// If we get here the post has been inserted successfully.
- $msg = "$l_stored<br />$l_click <a href=\"".append_sid("viewtopic.$phpEx?".POST_TOPIC_URL."=$new_topic_id")."\">$l_here</a>
- $l_viewmsg<br />$l_click <a href=\"".append_sid("viewforum.$phpEx?".POST_FORUM_URL."=$forum_id")."\">$l_here</a> $l_returntopic";
+ $msg = "$l_stored<br /><br />$l_click <a href=\"".append_sid("viewtopic.$phpEx?".POST_POST_URL."=$new_post_id")."\">$l_here</a>
+ $l_viewmsg<br /><br />$l_click <a href=\"".append_sid("viewforum.$phpEx?".POST_FORUM_URL."=$forum_id")."\">$l_here</a> $l_returntopic";
$template->set_filenames(array(
"reg_header" => "error_body.tpl"
@@ -246,11 +260,19 @@ switch($mode)
}
else
{
+ if(SQL_LAYER != "mysql")
+ {
+ $result = $db->sql_query("ROLLBACK");
+ }
error_die(QUERY_ERROR);
}
}
else
{
+ if(SQL_LAYER != "mysql")
+ {
+ $result = $db->sql_query("ROLLBACK");
+ }
if(DEBUG)
{
$error = $db->sql_error();
@@ -264,6 +286,10 @@ switch($mode)
}
else
{
+ if(SQL_LAYER != "mysql")
+ {
+ $result = $db->sql_query("ROLLBACK");
+ }
if(DEBUG)
{
$error = $db->sql_error();
@@ -277,6 +303,10 @@ switch($mode)
}
else
{
+ if(SQL_LAYER != "mysql")
+ {
+ $result = $db->sql_query("ROLLBACK");
+ }
if(DEBUG)
{
$error = $db->sql_error();
@@ -290,6 +320,10 @@ switch($mode)
}
else
{
+ if(SQL_LAYER != "mysql")
+ {
+ $result = $db->sql_query("ROLLBACK");
+ }
if(DEBUG)
{
$error = $db->sql_error();
@@ -315,6 +349,11 @@ switch($mode)
if(isset($HTTP_POST_VARS['submit']) && !$error)
{
+ if($SQL_LAYER != "mysql")
+ {
+ $result = $db->sql_query("BEGIN");
+ }
+
$new_topic_id = $HTTP_POST_VARS[POST_TOPIC_URL];
$topic_time = get_gmt_ts();
@@ -340,9 +379,19 @@ switch($mode)
$db->sql_query($sql);
}
include('includes/page_header.'.$phpEx);
+ //
// If we get here the post has been inserted successfully.
- $msg = "$l_stored<br />$l_click <a href=\"".append_sid("viewtopic.$phpEx?".POST_TOPIC_URL."=$new_topic_id#$new_post_id")."\">$l_here</a>
- $l_viewmsg<br />$l_click <a href=\"".append_sid("viewforum.$phpEx?".POST_FORUM_URL."=$forum_id")."\">$l_here</a> $l_returntopic";
+ //
+ if(SQL_LAYER != "mysql")
+ {
+ $result = $db->sql_query("COMMIT");
+ if(!$result)
+ {
+ error_die(SQL_ERROR, "Couldn't commit");
+ }
+ }
+
+ $msg = "$l_stored<br /><br />$l_click <a href=\"".append_sid("viewtopic.$phpEx?".POST_POST_URL."=$new_post_id#$new_post_id")."\">$l_here</a>$l_viewmsg<br /><br />$l_click <a href=\"".append_sid("viewforum.$phpEx?".POST_FORUM_URL."=$forum_id")."\">$l_here</a> $l_returntopic";
$template->set_filenames(array(
"reg_header" => "error_body.tpl"
@@ -356,11 +405,19 @@ switch($mode)
}
else
{
+ if(SQL_LAYER != "mysql")
+ {
+ $result = $db->sql_query("ROLLBACK");
+ }
error_die(QUERY_ERROR);
}
}
else
{
+ if(SQL_LAYER != "mysql")
+ {
+ $result = $db->sql_query("ROLLBACK");
+ }
if(DEBUG)
{
$error = $db->sql_error();
@@ -374,6 +431,10 @@ switch($mode)
}
else
{
+ if(SQL_LAYER != "mysql")
+ {
+ $result = $db->sql_query("ROLLBACK");
+ }
if(DEBUG)
{
$error = $db->sql_error();
@@ -387,6 +448,10 @@ switch($mode)
}
else
{
+ if(SQL_LAYER != "mysql")
+ {
+ $result = $db->sql_query("ROLLBACK");
+ }
if(DEBUG)
{
$error = $db->sql_error();
@@ -426,8 +491,8 @@ switch($mode)
{
include('includes/page_header.'.$phpEx);
// If we get here the post has been inserted successfully.
- $msg = "$l_stored<br />$l_click <a href=\"".append_sid("viewtopic.$phpEx?".POST_TOPIC_URL."=$new_topic_id#$post_id")."\">$l_here</a>
- $l_viewmsg<br />$l_click <a href=\"".append_sid("viewforum.$phpEx?".POST_FORUM_URL."=$forum_id")."\">$l_here</a> $l_returntopic";
+ $msg = "$l_stored<br /><br />$l_click <a href=\"".append_sid("viewtopic.$phpEx?".POST_POST_URL."=$post_id#$post_id")."\">$l_here</a>
+ $l_viewmsg<br /><br />$l_click <a href=\"".append_sid("viewforum.$phpEx?".POST_FORUM_URL."=$forum_id")."\">$l_here</a> $l_returntopic";
$template->set_filenames(array(
"reg_header" => "error_body.tpl"