diff options
| author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-07-15 15:45:09 +0000 |
|---|---|---|
| committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-07-15 15:45:09 +0000 |
| commit | e5211f3d205f08a485f0e5bb828667bbc7876678 (patch) | |
| tree | f4a837f54a96c97451b230ffcd6cc54aaa46ffb0 /phpBB/posting.php | |
| parent | 2878b8bad53b62ff2c9157d75f5f578ec4543435 (diff) | |
| download | forums-e5211f3d205f08a485f0e5bb828667bbc7876678.tar forums-e5211f3d205f08a485f0e5bb828667bbc7876678.tar.gz forums-e5211f3d205f08a485f0e5bb828667bbc7876678.tar.bz2 forums-e5211f3d205f08a485f0e5bb828667bbc7876678.tar.xz forums-e5211f3d205f08a485f0e5bb828667bbc7876678.zip | |
Added editing information, no time limit at present
git-svn-id: file:///svn/phpbb/trunk@673 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/posting.php')
| -rw-r--r-- | phpBB/posting.php | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index 10050144c9..525de75679 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -164,6 +164,7 @@ if( $mode != "newtopic" ) { $topic_id = $check_row['topic_id']; } + $is_first_post = FALSE; $is_last_post = FALSE; } @@ -357,7 +358,7 @@ if( ( isset($HTTP_POST_VARS['submit']) || $preview ) && $topic_status == TOPIC_U $message = prepare_message(stripslashes($HTTP_POST_VARS['message']), $html_on, $bbcode_on, $smile_on, $bbcode_uid); - if($attach_sig && !empty($userdata['user_sig'])) + if( $attach_sig ) { $message .= (eregi(" $", $message)) ? "[addsig]" : " [addsig]"; } @@ -776,8 +777,17 @@ else if( $mode == "editpost" && $topic_status == TOPIC_UNLOCKED ) } else { + if( !$is_last_post && $userdata['user_level'] != ADMIN ) + { + $edited_sql = ", post_edit_time = " . time() . ", post_edit_count = post_edit_count + 1 "; + } + else + { + $edited_sql = ""; + } + $sql = "UPDATE " . POSTS_TABLE . " - SET bbcode_uid = '$bbcode_uid' + SET bbcode_uid = '$bbcode_uid'" . $edited_sql . " WHERE post_id = $post_id"; if($db->sql_query($sql, BEGIN_TRANSACTION)) @@ -866,11 +876,16 @@ else if( $mode == "editpost" && $topic_status == TOPIC_UNLOCKED ) $subject = stripslashes(trim($postrow['post_subject'])); $message = stripslashes(trim($postrow['post_text'])); + if(eregi("\[addsig]$", $message)) { + $message = eregi_replace("\[addsig]$", "", $message); $attach_sig = TRUE; } - $message = eregi_replace("\[addsig]$", "", $message); + else + { + $attach_sig = FALSE; + } // Removes UID from BBCode entries $message = preg_replace("/\:[0-9a-z\:]*?\]/si", "]", $message); @@ -899,6 +914,7 @@ else if( $mode == "editpost" && $topic_status == TOPIC_UNLOCKED ) case POST_ANNOUNCE: $is_announce = TRUE; break; + case POST_STICKY: $is_sticky = TRUE; break; @@ -950,6 +966,7 @@ if($preview && !$error) case POST_ANNOUNCE: $is_announce = TRUE; break; + case POST_STICKY: $is_sticky = TRUE; break; @@ -961,7 +978,9 @@ if($preview && !$error) $preview_message = bbencode_second_pass($preview_message, $bbcode_uid); $preview_message = make_clickable($preview_message); - $template->set_filenames(array("preview" => "posting_preview.tpl")); + $template->set_filenames(array( + "preview" => "posting_preview.tpl") + ); $template->assign_vars(array( "TOPIC_TITLE" => $subject, "POST_SUBJECT" => $subject, |
