aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-07-20 21:45:24 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-07-20 21:45:24 +0000
commit73ac6b142375eaff4679a205a6bae537e4d019ac (patch)
tree0257aa7d9985d75d5d1cd79d1bd87332e55f303c /phpBB/includes
parent3f3db8cdaa8a8066ee0f727fe44699a179aca04e (diff)
downloadforums-73ac6b142375eaff4679a205a6bae537e4d019ac.tar
forums-73ac6b142375eaff4679a205a6bae537e4d019ac.tar.gz
forums-73ac6b142375eaff4679a205a6bae537e4d019ac.tar.bz2
forums-73ac6b142375eaff4679a205a6bae537e4d019ac.tar.xz
forums-73ac6b142375eaff4679a205a6bae537e4d019ac.zip
- some bugfixes
- set ip_check to A.B.C. by default - display postings in other encodings by default and present link to force the encoding as usual. git-svn-id: file:///svn/phpbb/trunk@6198 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-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
9 files changed, 24 insertions, 16 deletions
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);