mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-09 02:06:32 +02:00
- 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
This commit is contained in:
@@ -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'];
|
||||
}
|
||||
|
@@ -242,6 +242,7 @@ class acp_main
|
||||
}
|
||||
|
||||
add_log('admin', 'LOG_RESYNC_POSTCOUNTS');
|
||||
|
||||
break;
|
||||
|
||||
case 'date':
|
||||
|
@@ -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),
|
||||
|
@@ -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
|
||||
|
@@ -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))
|
||||
);
|
||||
|
@@ -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');
|
||||
|
||||
|
@@ -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
|
||||
{
|
||||
|
@@ -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),
|
||||
);
|
||||
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user