Fixed spelling error in ANNOUNCEMENT which in caused an incorrect check to occur

git-svn-id: file:///svn/phpbb/trunk@503 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2001-06-16 16:43:05 +00:00
parent dc2cd415d3
commit 3479343882
3 changed files with 21 additions and 21 deletions

View file

@ -41,11 +41,10 @@ define(UNLOCKED, 0);
define(LOCKED, 1); define(LOCKED, 1);
// Topic types // Topic types
define(NORMAL, 0); define(POST_NORMAL, 0);
define(STICKY, 1); define(POST_STICKY, 1);
define(ANNOUCE, 2); define(POST_ANNOUNCE, 2);
define(GLOB_ANNOUNCE, 3); define(POST_GLOBAL_ANNOUNCE, 3);
// Ban time types // Ban time types
define(SECONDS, 1); define(SECONDS, 1);

View file

@ -6,11 +6,7 @@
* copyright : (C) 2001 The phpBB Group * copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com * email : support@phpbb.com
* *
<<<<<<< posting.php
* $Id$ * $Id$
=======
* $Id$
>>>>>>> 1.35
* *
* *
***************************************************************************/ ***************************************************************************/
@ -53,28 +49,33 @@ $mode = (isset($HTTP_GET_VARS['mode'])) ? $HTTP_GET_VARS['mode'] : ( (isset($HTT
// Set initial conditions // Set initial conditions
// //
$is_first_post = (($HTTP_GET_VARS['is_first_post'] == 1) || ($HTTP_POST_VARS['is_first_post'] == 1)) ? TRUE : FALSE; $is_first_post = (($HTTP_GET_VARS['is_first_post'] == 1) || ($HTTP_POST_VARS['is_first_post'] == 1)) ? TRUE : FALSE;
$disable_html = (isset($HTTP_POST_VARS['disable_html'])) ? $HTTP_POST_VARS['disable_html'] : !$userdata['user_allowhtml']; $disable_html = (isset($HTTP_POST_VARS['disable_html'])) ? $HTTP_POST_VARS['disable_html'] : !$userdata['user_allowhtml'];
$disable_bbcode = (isset($HTTP_POST_VARS['disable_bbcode'])) ? $HTTP_POST_VARS['disable_bbcode'] : !$userdata['user_allowbbcode']; $disable_bbcode = (isset($HTTP_POST_VARS['disable_bbcode'])) ? $HTTP_POST_VARS['disable_bbcode'] : !$userdata['user_allowbbcode'];
$disable_smilies = (isset($HTTP_POST_VARS['disable_smile'])) ? $HTTP_POST_VARS['disable_smile'] : !$userdata['user_allowsmile']; $disable_smilies = (isset($HTTP_POST_VARS['disable_smile'])) ? $HTTP_POST_VARS['disable_smile'] : !$userdata['user_allowsmile'];
$attach_sig = (isset($HTTP_POST_VARS['attach_sig'])) ? $HTTP_POST_VARS['attach_sig'] : $userdata['user_attachsig']; $attach_sig = (isset($HTTP_POST_VARS['attach_sig'])) ? $HTTP_POST_VARS['attach_sig'] : $userdata['user_attachsig'];
$notify = (isset($HTTP_POST_VARS['notify'])) ? $HTTP_POST_VARS['notify'] : $userdata["always_notify"]; $notify = (isset($HTTP_POST_VARS['notify'])) ? $HTTP_POST_VARS['notify'] : $userdata["always_notify"];
$annouce = (isset($HTTP_POST_VARS['annouce'])) ? $HTTP_POST_VARS['annouce'] : "";
$unannouce = (isset($HTTP_POST_VARS['unannouce'])) ? $HTTP_POST_VARS['unannouce'] : ""; $annouce = (isset($HTTP_POST_VARS['annouce'])) ? TRUE : FALSE;
$sticky = (isset($HTTP_POST_VARS['sticky'])) ? $HTTP_POST_VARS['sticky'] : ""; $unannouce = (isset($HTTP_POST_VARS['unannouce'])) ? TRUE : FALSE;
$unstick = (isset($HTTP_POST_VARS['unstick'])) ? $HTTP_POST_VARS['unstick'] : ""; $sticky = (isset($HTTP_POST_VARS['sticky'])) ? TRUE : FALSE;
$unstick = (isset($HTTP_POST_VARS['unstick'])) ? TRUE : FALSE;
$preview = (isset($HTTP_POST_VARS['preview'])) ? TRUE : FALSE; $preview = (isset($HTTP_POST_VARS['preview'])) ? TRUE : FALSE;
if($annouce) if($annouce)
{ {
$topic_type = ANNOUCE; $topic_type = POST_ANNOUNCE;
} }
else if($sticky) else if($sticky)
{ {
$topic_type = STICKY; $topic_type = POST_STICKY;
} }
else else
{ {
$topic_type = NORMAL; $topic_type = POST_NORMAL;
} }
// //
@ -83,13 +84,13 @@ else
switch($mode) switch($mode)
{ {
case 'newtopic': case 'newtopic':
if($topic_type == ANNOUNCE) if($topic_type == POST_ANNOUNCE)
{ {
$auth_type = AUTH_ANNOUCE; $auth_type = AUTH_ANNOUNCE;
$is_auth_type = "auth_announce"; $is_auth_type = "auth_announce";
$error_string = $lang['can_post_announcements']; $error_string = $lang['can_post_announcements'];
} }
else if($topic_type == STICKY) else if($topic_type == POST_STICKY)
{ {
$auth_type = AUTH_STICKY; $auth_type = AUTH_STICKY;
$is_auth_type = "auth_sticky"; $is_auth_type = "auth_sticky";

View file

@ -193,12 +193,12 @@ $select_post_days .= "</select>";
// this forum // this forum
// //
$sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_time, p.post_username $sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_time, p.post_username
FROM ".TOPICS_TABLE." t, ".USERS_TABLE." u, ".POSTS_TABLE." p, ".USERS_TABLE." u2 FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . USERS_TABLE . " u2
WHERE t.forum_id = $forum_id WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_id AND t.topic_poster = u.user_id
AND p.post_id = t.topic_last_post_id AND p.post_id = t.topic_last_post_id
AND p.poster_id = u2.user_id AND p.poster_id = u2.user_id
AND t.topic_type <> ".GLOB_ANNOUNCE." AND t.topic_type <> " . POST_GLOBAL_ANNOUNCE . "
$limit_posts_time $limit_posts_time
ORDER BY t.topic_type DESC, p.post_time DESC ORDER BY t.topic_type DESC, p.post_time DESC
LIMIT $start, ".$board_config['topics_per_page']; LIMIT $start, ".$board_config['topics_per_page'];