From 2e941d3d38530fbc1979a6eb72b3b43adee64d14 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 24 Feb 2007 12:31:21 +0000 Subject: trying to fix some bugs... git-svn-id: file:///svn/phpbb/trunk@7054 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/acp/acp_bots.php | 4 ---- phpBB/includes/functions.php | 2 +- phpBB/includes/functions_posting.php | 2 +- phpBB/includes/mcp/mcp_topic.php | 2 +- phpBB/includes/session.php | 4 ++++ phpBB/language/en/acp/board.php | 4 ++-- phpBB/language/en/acp/common.php | 2 +- phpBB/language/en/acp/styles.php | 12 ++++++------ phpBB/language/en/help_bbcode.php | 4 ++-- phpBB/posting.php | 2 +- phpBB/styles/subSilver/template/template.cfg | 2 +- 11 files changed, 20 insertions(+), 20 deletions(-) (limited to 'phpBB') 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'); } } diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php index 38a057b740..dfb44b9e3c 100644 --- a/phpBB/language/en/acp/board.php +++ b/phpBB/language/en/acp/board.php @@ -139,8 +139,8 @@ $lang = array_merge($lang, array( 'EDIT_TIME_EXPLAIN' => 'Limits the time available to edit a new post. Setting the value to 0 disables this behaviour.', 'FLOOD_INTERVAL' => 'Flood interval', 'FLOOD_INTERVAL_EXPLAIN' => 'Number of seconds a user must wait between posting new messages. To enable users to ignore this alter their permissions.', - 'HOT_THRESHOLD' => 'Hot topic threshold', - 'HOT_THRESHOLD_EXPLAIN' => 'Posts per topic threshold required for the hot topic annotation. Set to 0 to disable hot topics.', + 'HOT_THRESHOLD' => 'Popular topic threshold', + 'HOT_THRESHOLD_EXPLAIN' => 'Posts per topic threshold required for the popular topic annotation. Set to 0 to disable popular topics.', 'MAX_POLL_OPTIONS' => 'Maximum number of poll options', 'MAX_POST_FONT_SIZE' => 'Maximum font size per post', 'MAX_POST_FONT_SIZE_EXPLAIN' => 'Maximum font size allowed in a post. Set to 0 for unlimited font size.', diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index 054101147e..15c98672fb 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -326,7 +326,7 @@ $lang = array_merge($lang, array( 'RESYNC_POSTCOUNTS_CONFIRM' => 'Are you sure you wish to resynchronise post counts?', 'RESYNC_POST_MARKING' => 'Resynchronise dotted topics', 'RESYNC_POST_MARKING_CONFIRM' => 'Are you sure you wish to resynchronise dotted topics?', - 'RESYNC_POST_MARKING_EXPLAIN' => 'First unmarks all topics and then correctly marks topics that have seen any activity during the past six months', + 'RESYNC_POST_MARKING_EXPLAIN' => 'First unmarks all topics and then correctly marks topics that have seen any activity during the past six months.', 'RESYNC_STATS' => 'Resynchronise statistics', 'RESYNC_STATS_CONFIRM' => 'Are you sure you wish to resynchronise statistics?', 'RESYNC_STATS_EXPLAIN' => 'Recalculates the total number of posts, topics, users and files.', diff --git a/phpBB/language/en/acp/styles.php b/phpBB/language/en/acp/styles.php index 8270614c2a..c5c9438edd 100644 --- a/phpBB/language/en/acp/styles.php +++ b/phpBB/language/en/acp/styles.php @@ -89,7 +89,7 @@ $lang = array_merge($lang, array( 'EDIT_DETAILS_STYLE' => 'Edit style', 'EDIT_DETAILS_STYLE_EXPLAIN' => 'Using the form below you can modify this existing style. You may alter the combination of template, theme and imageset which define the style itself. You may also make the style the default one.', 'EDIT_DETAILS_TEMPLATE' => 'Edit template details', - 'EDIT_DETAILS_TEMPLATE_EXPLAIN' => 'Here you can edit certain templates details such as its name. You may also have the option to switch storage of the stylesheet from the filesystem to the database and vice versa. This option depends on your PHP configuration and whether your template set can be written to by the webserver.', + 'EDIT_DETAILS_TEMPLATE_EXPLAIN' => 'Here you can edit certain template details such as its name. You may also have the option to switch storage of the stylesheet from the filesystem to the database and vice versa. This option depends on your PHP configuration and whether your template set can be written to by the webserver.', 'EDIT_DETAILS_THEME' => 'Edit theme details', 'EDIT_DETAILS_THEME_EXPLAIN' => 'Here you can edit certain theme details such as its name. You may also have the option to switch storage of the stylesheet from the filesystem to the database and vice versa. This option depends on your PHP configuration and whether your stylesheet can be written to by the webserver.', 'EDIT_IMAGESET' => 'Edit imageset', @@ -170,15 +170,15 @@ $lang = array_merge($lang, array( 'IMG_TOPIC_READ' => 'Topic', 'IMG_TOPIC_READ_MINE' => 'Topic posted to', - 'IMG_TOPIC_READ_HOT' => 'Topic hot', - 'IMG_TOPIC_READ_HOT_MINE' => 'Topic hot posted to', + 'IMG_TOPIC_READ_HOT' => 'Topic popular', + 'IMG_TOPIC_READ_HOT_MINE' => 'Topic popular posted to', 'IMG_TOPIC_READ_LOCKED' => 'Topic locked', 'IMG_TOPIC_READ_LOCKED_MINE' => 'Topic locked posted to', 'IMG_TOPIC_UNREAD' => 'Topic new posts', 'IMG_TOPIC_UNREAD_MINE' => 'Topic posted to new', - 'IMG_TOPIC_UNREAD_HOT' => 'Topic hot new posts', - 'IMG_TOPIC_UNREAD_HOT_MINE' => 'Topic hot posted to new', + 'IMG_TOPIC_UNREAD_HOT' => 'Topic popular new posts', + 'IMG_TOPIC_UNREAD_HOT_MINE' => 'Topic popular posted to new', 'IMG_TOPIC_UNREAD_LOCKED' => 'Topic locked new', 'IMG_TOPIC_UNREAD_LOCKED_MINE' => 'Topic locked posted to new', @@ -374,7 +374,7 @@ $lang = array_merge($lang, array( 'TEMPLATE_ERR_NAME_EXIST' => 'A template set with that name already exists.', 'TEMPLATE_ERR_NAME_LONG' => 'The template name can be no longer than 30 characters.', 'TEMPLATE_ERR_NOT_TEMPLATE' => 'The archive you specified does not contain a valid template set.', - 'TEMPLATE_ERR_STYLE_NAME' => 'You must supply a name for this templates.', + 'TEMPLATE_ERR_STYLE_NAME' => 'You must supply a name for this template.', 'TEMPLATE_EXPORT' => 'Export templates', 'TEMPLATE_EXPORT_EXPLAIN' => 'Here you can export a template set in the form of an archive. This archive will contain all the files necessary to install the templates on another board. You may select whether to download the file directly or to place it in your store folder for download later or via FTP.', 'TEMPLATE_EXPORTED' => 'Templates exported successfully and stored in %s.', diff --git a/phpBB/language/en/help_bbcode.php b/phpBB/language/en/help_bbcode.php index 63ac19cf28..5f58388c10 100644 --- a/phpBB/language/en/help_bbcode.php +++ b/phpBB/language/en/help_bbcode.php @@ -80,7 +80,7 @@ $help = array( ), array( 0 => 'Linking to another site', - 1 => 'phpBB BBCode supports a number of ways of creating URIs, Uniform Resource Indicators better known as URLs.As with all the BBCode tags you can wrap URLs around any of the other tags such as [img][/img] (see next entry), [b][/b], etc. As with the formatting tags it is up to you to ensure the correct open and close order is following, for example:

[url=http://www.google.com/][img]http://www.google.com/intl/en_ALL/images/logo.gif[/url][/img]

is not correct which may lead to your post being deleted so take care.' + 1 => 'phpBB BBCode supports a number of ways of creating URIs, Uniform Resource Indicators better known as URLs.As with all the BBCode tags you can wrap URLs around any of the other tags such as [img][/img] (see next entry), [b][/b], etc. As with the formatting tags it is up to you to ensure the correct open and close order is following, for example:

[url=http://www.google.com/][img]http://www.google.com/intl/en_ALL/images/logo.gif[/url][/img]

is not correct which may lead to your post being deleted so take care.' ), array( 0 => '--', @@ -88,7 +88,7 @@ $help = array( ), array( 0 => 'Adding an image to a post', - 1 => 'phpBB BBCode incorporates a tag for including images in your posts. Two very important things to remember when using this tag are; many users do not appreciate lots of images being shown in posts and secondly the image you display must already be available on the internet (it cannot exist only on your computer for example, unless you run a webserver!). To display an image you must surround the URL pointing to the image with [img][/img] tags. For example:

[img]http://www.google.com/intl/en_ALL/images/logo.gif[/img]

As noted in the URL section above you can wrap an image in a [url][/url] tag if you wish, eg.

[url=http://www.google.com/][img]http://www.google.com/intl/en_ALL/images/logo.gif[/img][/url]

would generate:

' + 1 => 'phpBB BBCode incorporates a tag for including images in your posts. Two very important things to remember when using this tag are; many users do not appreciate lots of images being shown in posts and secondly the image you display must already be available on the internet (it cannot exist only on your computer for example, unless you run a webserver!). To display an image you must surround the URL pointing to the image with [img][/img] tags. For example:

[img]http://www.google.com/intl/en_ALL/images/logo.gif[/img]

As noted in the URL section above you can wrap an image in a [url][/url] tag if you wish, eg.

[url=http://www.google.com/][img]http://www.google.com/intl/en_ALL/images/logo.gif[/img][/url]

would generate:

' ), array( 0 => 'Adding attachments into a post', diff --git a/phpBB/posting.php b/phpBB/posting.php index 2bb1329d16..247b88c63c 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -707,7 +707,7 @@ if ($submit || $preview || $refresh) { include($phpbb_root_path . 'includes/functions_user.' . $phpEx); - if (($result = validate_username($post_data['username'])) !== false) + if (($result = validate_username($post_data['username'], $post_data['post_username'])) !== false) { $user->add_lang('ucp'); $error[] = $user->lang[$result . '_USERNAME']; diff --git a/phpBB/styles/subSilver/template/template.cfg b/phpBB/styles/subSilver/template/template.cfg index 180324275e..26a12a64bd 100644 --- a/phpBB/styles/subSilver/template/template.cfg +++ b/phpBB/styles/subSilver/template/template.cfg @@ -1,5 +1,5 @@ # -# phpBB Templaet Configuration File +# phpBB Template Configuration File # # @package phpBB3 # @copyright (c) 2005 phpBB Group -- cgit v1.2.1