aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-02-24 12:31:21 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-02-24 12:31:21 +0000
commit2e941d3d38530fbc1979a6eb72b3b43adee64d14 (patch)
tree3b7bca4bd34724d151089d60a3874766b088c18c /phpBB/includes
parent74ad87df5c696b62e73bc1b5b7c5fceea75932d7 (diff)
downloadforums-2e941d3d38530fbc1979a6eb72b3b43adee64d14.tar
forums-2e941d3d38530fbc1979a6eb72b3b43adee64d14.tar.gz
forums-2e941d3d38530fbc1979a6eb72b3b43adee64d14.tar.bz2
forums-2e941d3d38530fbc1979a6eb72b3b43adee64d14.tar.xz
forums-2e941d3d38530fbc1979a6eb72b3b43adee64d14.zip
trying to fix some bugs...
git-svn-id: file:///svn/phpbb/trunk@7054 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_bots.php4
-rw-r--r--phpBB/includes/functions.php2
-rw-r--r--phpBB/includes/functions_posting.php2
-rw-r--r--phpBB/includes/mcp/mcp_topic.php2
-rw-r--r--phpBB/includes/session.php4
5 files changed, 7 insertions, 7 deletions
diff --git a/phpBB/includes/acp/acp_bots.php b/phpBB/includes/acp/acp_bots.php
index 43984c5a5c..0498aed848 100644
--- a/phpBB/includes/acp/acp_bots.php
+++ b/phpBB/includes/acp/acp_bots.php
@@ -165,8 +165,6 @@ class acp_bots
if (!sizeof($error))
{
- $db->sql_transaction('begin');
-
// New bot? Create a new user and group entry
if ($action == 'add')
{
@@ -252,8 +250,6 @@ class acp_bots
$log = 'UPDATED';
}
- $db->sql_transaction('commit');
-
$cache->destroy('bots');
add_log('admin', 'LOG_BOT_' . $log, $bot_row['bot_name']);
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 3cc0d23063..e360ffb3a0 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -3700,7 +3700,7 @@ function page_header($page_title = '', $display_online_list = true)
'S_TIMEZONE' => ($user->data['user_dst'] || ($user->data['user_id'] == ANONYMOUS && $config['board_dst'])) ? sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], $user->lang['tz']['dst']) : sprintf($user->lang['ALL_TIMES'], $user->lang['tz'][$tz], ''),
'S_DISPLAY_ONLINE_LIST' => ($l_online_time) ? 1 : 0,
'S_DISPLAY_SEARCH' => (!$config['load_search']) ? 0 : (isset($auth) ? ($auth->acl_get('u_search') && $auth->acl_getf_global('f_search')) : 1),
- 'S_DISPLAY_PM' => ($config['allow_privmsg'] && $user->data['is_registered']) ? 1 : 0,
+ 'S_DISPLAY_PM' => ($config['allow_privmsg'] && $user->data['is_registered'] && ($auth->acl_get('u_readpm') || $auth->acl_get('u_sendpm'))) ? true : false,
'S_DISPLAY_MEMBERLIST' => (isset($auth)) ? $auth->acl_get('u_viewprofile') : 0,
'S_NEW_PM' => ($s_privmsg_new) ? 1 : 0,
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 11ec1b8b1e..e03641e5aa 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1816,7 +1816,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
$db->sql_transaction('commit');
- if ($post_mode == 'post' || $post_mode == 'reply' || $post_mode == 'edit_last_post')
+ if ($post_mode == 'post' || $post_mode == 'reply' || $post_mode == 'edit_last_post' || $post_mode == 'edit_topic')
{
if ($topic_type != POST_GLOBAL)
{
diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php
index 716b7a1529..d230687ed4 100644
--- a/phpBB/includes/mcp/mcp_topic.php
+++ b/phpBB/includes/mcp/mcp_topic.php
@@ -402,7 +402,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
$to_topic_id = $db->sql_nextid();
move_posts($post_id_list, $to_topic_id);
- $topic_info = get_post_data(array($topic_id));
+ $topic_info = get_topic_data(array($topic_id));
$topic_info = $topic_info[$topic_id];
add_log('mod', $to_forum_id, $to_topic_id, 'LOG_SPLIT_DESTINATION', $subject);
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 6033691637..0a9084eb6d 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -592,6 +592,7 @@ class session
if ((int) $row['sessions'] > (int) $config['active_sessions'])
{
+ header('HTTP/1.1 503 Service Unavailable');
trigger_error('BOARD_UNAVAILABLE');
}
}
@@ -1384,6 +1385,8 @@ class user extends session
// Is board disabled and user not an admin or moderator?
if ($config['board_disable'] && !defined('IN_LOGIN') && !$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_'))
{
+ header('HTTP/1.1 503 Service Unavailable');
+
$message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE';
trigger_error($message);
}
@@ -1393,6 +1396,7 @@ class user extends session
{
if ($this->load > floatval($config['limit_load']) && !defined('IN_LOGIN') && !$auth->acl_gets('a_', 'm_') && !$auth->acl_getf_global('m_'))
{
+ header('HTTP/1.1 503 Service Unavailable');
trigger_error('BOARD_UNAVAILABLE');
}
}