aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/adm/style/acp_users.html4
-rw-r--r--phpBB/includes/acp/acp_forums.php15
-rw-r--r--phpBB/includes/acp/acp_main.php1
-rw-r--r--phpBB/includes/acp/acp_users.php3
-rw-r--r--phpBB/includes/functions_admin.php9
-rw-r--r--phpBB/includes/functions_display.php4
-rw-r--r--phpBB/includes/functions_posting.php2
-rw-r--r--phpBB/includes/mcp/mcp_main.php2
-rw-r--r--phpBB/includes/ucp/ucp_prefs.php2
-rw-r--r--phpBB/includes/ucp/ucp_register.php2
-rw-r--r--phpBB/install/schemas/schema_data.sql2
-rw-r--r--phpBB/language/en/acp/common.php2
-rw-r--r--phpBB/language/en/common.php3
-rw-r--r--phpBB/language/en/viewtopic.php2
-rw-r--r--phpBB/memberlist.php10
-rw-r--r--phpBB/styles/subSilver/template/posting_attach_body.html2
-rw-r--r--phpBB/styles/subSilver/template/viewtopic_body.html9
-rw-r--r--phpBB/styles/subSilver/template/viewtopic_print.html4
-rw-r--r--phpBB/viewtopic.php20
19 files changed, 56 insertions, 42 deletions
diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html
index 5ce4e6e00b..43fb940c39 100644
--- a/phpBB/adm/style/acp_users.html
+++ b/phpBB/adm/style/acp_users.html
@@ -102,6 +102,10 @@
<dd><strong>{USER_LASTACTIVE}</strong></dd>
</dl>
<dl>
+ <dt><label>{L_POSTS}:</label></dt>
+ <dd><strong>{USER_POSTS}</strong></dd>
+ </dl>
+ <dl>
<dt><label for="user_founder">{L_FOUNDER}:</label><br /><span>{L_FOUNDER_EXPLAIN}</span></dt>
<dd><input type="radio" class="radio" name="user_founder" value="1"<!-- IF S_USER_FOUNDER --> id="user_founder" checked="checked"<!-- ENDIF --><!-- IF not S_FOUNDER --> disabled="disabled"<!-- ENDIF --> />&nbsp;{L_YES}&nbsp; <input type="radio" class="radio" name="user_founder" value="0"<!-- IF not S_USER_FOUNDER --> id="user_founder" checked="checked"<!-- ENDIF --><!-- IF not S_FOUNDER --> disabled="disabled"<!-- ENDIF --> />&nbsp;{L_NO}&nbsp;</dd>
</dl>
diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php
index ee87f8f5c6..21f633f4f6 100644
--- a/phpBB/includes/acp/acp_forums.php
+++ b/phpBB/includes/acp/acp_forums.php
@@ -342,7 +342,20 @@ class acp_forums
$forum_data = $row;
}
- $parents_list = make_forum_select($forum_data['parent_id'], $forum_id, false, false, false);
+ // Make sure there is no forum displayed for parents_list having the current forum id as a parent...
+ $sql = 'SELECT forum_id
+ FROM ' . FORUMS_TABLE . '
+ WHERE parent_id = ' . $forum_id;
+ $result = $db->sql_query($sql);
+
+ $exclude_forums = array($forum_id);
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $exclude_forums[] = $row['forum_id'];
+ }
+ $db->sql_freeresult($result);
+
+ $parents_list = make_forum_select($forum_data['parent_id'], $exclude_forums, false, false, false);
$forum_data['forum_password_confirm'] = $forum_data['forum_password'];
}
diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php
index 8cde981346..5588f0dae9 100644
--- a/phpBB/includes/acp/acp_main.php
+++ b/phpBB/includes/acp/acp_main.php
@@ -242,6 +242,7 @@ class acp_main
}
add_log('admin', 'LOG_RESYNC_POSTCOUNTS');
+
break;
case 'date':
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php
index 5c75c895ac..66e8a1ec70 100644
--- a/phpBB/includes/acp/acp_users.php
+++ b/phpBB/includes/acp/acp_users.php
@@ -809,6 +809,7 @@ class acp_users
'USER_LASTACTIVE' => ($user_row['user_lastvisit']) ? $user->format_date($user_row['user_lastvisit']) : ' - ',
'USER_EMAIL' => $user_row['user_email'],
'USER_WARNINGS' => $user_row['user_warnings'],
+ 'USER_POSTS' => $user_row['user_posts'],
)
);
@@ -1159,7 +1160,7 @@ class acp_users
$var_ary = array(
'dateformat' => array('string', false, 3, 30),
- 'lang' => array('match', false, '#^[a-z_]{2,}$#i'),
+ 'lang' => array('match', false, '#^[a-z_\-]{2,}$#i'),
'tz' => array('num', false, -14, 14),
'topic_sk' => array('string', false, 1, 1),
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 725bd52940..11e2623167 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -10,16 +10,10 @@
/**
* Recalculate Binary Tree
-*/
function recalc_btree($sql_id, $sql_table, $module_class = '')
{
global $db;
- /* Init table, id's, etc...
- $sql_id = 'module_id'; // 'forum_id'
- $sql_table = MODULES_TABLE; // FORUMS_TABLE
- */
-
if (!$sql_id || !$sql_table)
{
return;
@@ -103,6 +97,7 @@ function recalc_btree($sql_id, $sql_table, $module_class = '')
}
$db->sql_freeresult($f_result);
}
+*/
/**
* Simple version of jumpbox, just lists authed forums
@@ -498,7 +493,7 @@ function delete_topics($where_type, $where_ids, $auto_sync = true)
}
$return = array(
- 'posts' => delete_posts($where_type, $where_ids, false, false)
+ 'posts' => delete_posts($where_type, $where_ids, false, true)
);
$sql = 'SELECT topic_id, forum_id
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index 14dfbfeb0d..720b7eb8b6 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -1134,10 +1134,10 @@ function display_user_activity(&$userdata)
$template->assign_vars(array(
'ACTIVE_FORUM' => $active_f_name,
'ACTIVE_FORUM_POSTS' => ($active_f_count == 1) ? sprintf($user->lang['USER_POST'], 1) : sprintf($user->lang['USER_POSTS'], $active_f_count),
- 'ACTIVE_FORUM_PCT' => sprintf($user->lang['POST_PCT'], $active_f_pct),
+ 'ACTIVE_FORUM_PCT' => sprintf($user->lang['POST_PCT_ACTIVE'], $active_f_pct),
'ACTIVE_TOPIC' => censor_text($active_t_name),
'ACTIVE_TOPIC_POSTS' => ($active_t_count == 1) ? sprintf($user->lang['USER_POST'], 1) : sprintf($user->lang['USER_POSTS'], $active_t_count),
- 'ACTIVE_TOPIC_PCT' => sprintf($user->lang['POST_PCT'], $active_t_pct),
+ 'ACTIVE_TOPIC_PCT' => sprintf($user->lang['POST_PCT_ACTIVE'], $active_t_pct),
'U_ACTIVE_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $active_f_id),
'U_ACTIVE_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $active_t_id))
);
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 8f706905c8..d2ee32969b 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1175,7 +1175,6 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
{
case 'delete_topic':
delete_topics('topic_id', array($topic_id), false);
- set_config('num_topics', $config['num_topics'] - 1, true);
if ($data['topic_type'] != POST_GLOBAL)
{
@@ -1269,7 +1268,6 @@ function delete_post($forum_id, $topic_id, $post_id, &$data)
}
$sql_data[USERS_TABLE] = ($auth->acl_get('f_postcount', $forum_id)) ? 'user_posts = user_posts - 1' : '';
- set_config('num_posts', $config['num_posts'] - 1, true);
$db->sql_transaction('begin');
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
index 00237781eb..9125ae55b1 100644
--- a/phpBB/includes/mcp/mcp_main.php
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -583,7 +583,7 @@ function mcp_delete_topic($topic_ids)
add_log('mod', $forum_id, 0, 'LOG_TOPIC_DELETED', $row['topic_title']);
}
- $return = delete_topics('topic_id', $topic_ids, true);
+ $return = delete_topics('topic_id', $topic_ids);
}
else
{
diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php
index 527c48efa7..ff8df44148 100644
--- a/phpBB/includes/ucp/ucp_prefs.php
+++ b/phpBB/includes/ucp/ucp_prefs.php
@@ -61,7 +61,7 @@ class ucp_prefs
$var_ary = array(
'dateformat' => array('string', false, 3, 30),
- 'lang' => array('match', false, '#^[a-z_]{2,}$#i'),
+ 'lang' => array('match', false, '#^[a-z_\-]{2,}$#i'),
'tz' => array('num', false, -14, 14),
);
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 693a785c8f..4379658959 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -125,7 +125,7 @@ class ucp_register
'email_confirm' => array('string', false, 6, 60),
'confirm_code' => array('string', !$config['enable_confirm'], 5, 8),
'tz' => array('num', false, -14, 14),
- 'lang' => array('match', false, '#^[a-z_]{2,}$#i'),
+ 'lang' => array('match', false, '#^[a-z_\-]{2,}$#i'),
);
$error = validate_data($data, $var_ary);
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index 25a595f663..b973a14f6f 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -97,7 +97,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_link_width', '
INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_max_height', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_max_width', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('img_min_thumb_filesize', '12000');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('ip_check', '4');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('ip_check', '3');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_enable', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_host', '');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('jab_password', '');
diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php
index 2b74ccbe4f..dcefddae89 100644
--- a/phpBB/language/en/acp/common.php
+++ b/phpBB/language/en/acp/common.php
@@ -245,7 +245,7 @@ $lang = array_merge($lang, array(
'PARSE_BBCODE' => 'Parse BBCode',
'PARSE_SMILIES' => 'Parse Smilies',
'PARSE_URLS' => 'Parse Links',
- 'PROCEED_TO_ACP' => 'Click %sHere%s to proceed to the ACP',
+ 'PROCEED_TO_ACP' => '%sProceed to the ACP%s',
'REMIND' => 'Remind',
'REORDER' => 'Reorder',
'RESYNC' => 'Sync',
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index fdbffa7a1e..87691b38fc 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -352,11 +352,12 @@ $lang = array_merge($lang, array(
'POSTED' => 'Posted',
'POSTS' => 'Posts',
'POSTS_UNAPPROVED' => 'At least one post in this topic has not been approved',
- 'POST_BY_FOE' => 'This post was made by <strong>%1$s</strong> who is currently on your ignore list. To display this post click %2$sHERE%3$s.',
+ 'POST_BY_FOE' => 'This post was made by <strong>%1$s</strong> who is currently on your ignore list. %2$sDisplay this post%3$s.',
'POST_DAY' => '%.2f posts per day',
'POST_DETAILS' => 'Post details',
'POST_NEW_TOPIC' => 'Post new topic',
'POST_PCT' => '%.2f%% of all posts',
+ 'POST_PCT_ACTIVE' => '%.2f%% of your posts',
'POST_REPORTED' => 'Click to view report',
'POST_SUBJECT' => 'Post subject',
'POST_TIME' => 'Post time',
diff --git a/phpBB/language/en/viewtopic.php b/phpBB/language/en/viewtopic.php
index 782b3a7292..0c50afb689 100644
--- a/phpBB/language/en/viewtopic.php
+++ b/phpBB/language/en/viewtopic.php
@@ -73,7 +73,7 @@ $lang = array_merge($lang, array(
'POLL_RUN_TILL' => 'Poll runs till %s',
'POLL_VOTED_OPTION' => 'You voted for this option',
- 'POST_ENCODING' => 'This post by <strong>%1$s</strong> was made in a character set different to yours. To view this post in its proper encoding click %2$sHERE%3$s.',
+ 'POST_ENCODING' => 'This post by <strong>%1$s</strong> was made in a character set different to yours. %2$sView this post in its proper encoding%3$s.',
'PRINT_TOPIC' => 'Print view',
'QUICK_MOD' => 'Quick-mod tools',
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php
index 829997019c..d1ae94c779 100644
--- a/phpBB/memberlist.php
+++ b/phpBB/memberlist.php
@@ -648,10 +648,12 @@ switch ($mode)
'email_lang' => $email_lang,
'email' => $email,
'name' => $name,
- 'username' => $row['username'],
+ 'username' => ($user_id) ? $row['username'] : '',
'to_name' => $name,
- 'user_jabber' => $row['user_jabber'],
- 'user_notify_type' => $row['user_notify_type'],
+ 'user_jabber' => ($user_id) ? $row['user_jabber'] : '',
+ 'user_notify_type' => ($user_id) ? $row['user_notify_type'] : NOTIFY_EMAIL,
+ 'topic_title' => (!$user_id) ? $row['topic_title'] : '',
+ 'forum_id' => (!$user_id) ? $row['forum_id'] : 0,
);
// Ok, now the same email if CC specified, but without exposing the users email address
@@ -665,6 +667,8 @@ switch ($mode)
'to_name' => $name,
'user_jabber' => $user->data['user_jabber'],
'user_notify_type' => ($user_id) ? $user->data['user_notify_type'] : NOTIFY_EMAIL,
+ 'topic_title' => (!$user_id) ? $row['topic_title'] : '',
+ 'forum_id' => (!$user_id) ? $row['forum_id'] : 0,
);
}
diff --git a/phpBB/styles/subSilver/template/posting_attach_body.html b/phpBB/styles/subSilver/template/posting_attach_body.html
index f1fda47748..2a9c7b21c2 100644
--- a/phpBB/styles/subSilver/template/posting_attach_body.html
+++ b/phpBB/styles/subSilver/template/posting_attach_body.html
@@ -63,7 +63,7 @@
<td class="row2">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
- <td><textarea class="post" name="comment_list[{attach_row.ASSOC_INDEX}]" rows="3" cols="35" wrap="virtual" size=40>{attach_row.FILE_COMMENT}</textarea>&nbsp;</td>
+ <td><textarea class="post" name="comment_list[{attach_row.ASSOC_INDEX}]" rows="3" cols="35" wrap="virtual" size="40">{attach_row.FILE_COMMENT}</textarea>&nbsp;</td>
<td valign="top">
<table border="0" cellspacing="4" cellpadding="0">
<tr>
diff --git a/phpBB/styles/subSilver/template/viewtopic_body.html b/phpBB/styles/subSilver/template/viewtopic_body.html
index 325ebba88a..ea674bddb9 100644
--- a/phpBB/styles/subSilver/template/viewtopic_body.html
+++ b/phpBB/styles/subSilver/template/viewtopic_body.html
@@ -132,6 +132,13 @@
<!-- IF postrow.S_IGNORE_POST -->
<td class="gensmall" colspan="2" height="25" align="center">{postrow.L_IGNORE_POST}</td>
<!-- ELSE -->
+
+ <!-- IF postrow.FORCE_ENCODING -->
+ <td class="gensmall" colspan="2" height="25" align="center">{postrow.FORCE_ENCODING}</td>
+ </tr>
+ <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
+ <!-- ENDIF -->
+
<td align="center" valign="middle"><!-- IF postrow.S_FIRST_UNREAD --><a name="unread"></a><!-- ENDIF --><a name="p{postrow.POST_ID}"></a><b class="postauthor">{postrow.POSTER_NAME}</b></td>
<td width="100%" height="25">
<table width="100%" cellspacing="0">
@@ -144,7 +151,7 @@
</table>
</td>
</tr>
-
+
<!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
<td valign="top">
diff --git a/phpBB/styles/subSilver/template/viewtopic_print.html b/phpBB/styles/subSilver/template/viewtopic_print.html
index c286fcf660..69a51f42c8 100644
--- a/phpBB/styles/subSilver/template/viewtopic_print.html
+++ b/phpBB/styles/subSilver/template/viewtopic_print.html
@@ -60,13 +60,13 @@ hr.sep {
<table width="85%" cellspacing="3" cellpadding="0" border="0" align="center">
<tr>
- <td colspan="2" align="center"><span class="Forum">{SITENAME}</span><br /><span class="gensmall">{U_FORUM}</a></span></td>
+ <td colspan="2" align="center"><span class="Forum">{SITENAME}</span><br /><span class="gensmall"><a href="{U_FORUM}">{U_FORUM}</a></span></td>
</tr>
<tr>
<td colspan="2"><br /></td>
</tr>
<tr>
- <td><span class="topic">{TOPIC_TITLE}</span><br /><span class="gensmall">{U_TOPIC}</a></span></td>
+ <td><span class="topic">{TOPIC_TITLE}</span><br /><span class="gensmall"><a href="{U_TOPIC}">{U_TOPIC}</a></span></td>
<td align="right" valign="bottom"><span class="gensmall">{PAGE_NUMBER}</span></td>
</tr>
</table>
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 19a73a83f3..e7c493f112 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -1204,7 +1204,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
// Two situations can prevent a post being display:
// i) The poster is on the users ignore list
// ii) The post was made in a codepage different from the users
- if (isset($row['foe']) && $row['foe'])
+ if (!empty($row['foe']))
{
$template->assign_block_vars('postrow', array(
'S_IGNORE_POST' => true,
@@ -1213,21 +1213,9 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
continue;
}
- else if ($row['post_encoding'] != $user->lang['ENCODING'])
+ else if ($row['post_encoding'] != $user->lang['ENCODING'] && $view == 'encoding' && $post_id == $row['post_id'])
{
- if ($view == 'encoding' && $post_id == $row['post_id'])
- {
- $force_encoding = $row['post_encoding'];
- }
- else
- {
- $template->assign_block_vars('postrow', array(
- 'S_IGNORE_POST' => true,
- 'L_IGNORE_POST' => sprintf($user->lang['POST_ENCODING'], $row['poster'], '<a href="' . $viewtopic_url . "&amp;p={$row['post_id']}&amp;view=encoding#p{$row['post_id']}" . '">', '</a>'))
- );
-
- continue;
- }
+ $force_encoding = $row['post_encoding'];
}
// End signature parsing, only if needed
@@ -1383,6 +1371,8 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
'ONLINE_IMG' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? '' : (($user_cache[$poster_id]['online']) ? $user->img('btn_online', 'ONLINE') : $user->img('btn_offline', 'OFFLINE')),
'S_ONLINE' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? false : (($user_cache[$poster_id]['online']) ? true : false),
+ 'FORCE_ENCODING' => ($row['post_encoding'] != $user->lang['ENCODING']) ? sprintf($user->lang['POST_ENCODING'], $row['poster'], '<a href="' . $viewtopic_url . "&amp;p={$row['post_id']}&amp;view=encoding#p{$row['post_id']}" . '">', '</a>') : '',
+
'U_EDIT' => (($user->data['user_id'] == $poster_id && $auth->acl_get('f_edit', $forum_id) && ($row['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time'])) || $auth->acl_get('m_edit', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&amp;f=$forum_id&amp;p={$row['post_id']}") : '',
'U_QUOTE' => ($auth->acl_get('f_reply', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=quote&amp;f=$forum_id&amp;p={$row['post_id']}") : '',
'U_INFO' => ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&amp;mode=post_details&amp;f=$forum_id&amp;p=" . $row['post_id'], true, $user->session_id) : '',