mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
some fixes to be committed.
git-svn-id: file:///svn/phpbb/trunk@6975 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
56a93bdfdd
commit
7216ffe8be
9 changed files with 54 additions and 32 deletions
|
@ -193,11 +193,11 @@
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt style="width: 60%"><input type="radio" class="radio" name="conflict[{files.FILENAME}]" value="1" checked="checked" /> {L_MERGE_NO_MERGE_NEW_OPTION}</dt>
|
<dt style="width: 60%"><input type="radio" class="radio" name="conflict[{files.FILENAME}]" value="1" checked="checked" /> {L_MERGE_NO_MERGE_NEW_OPTION}</dt>
|
||||||
<dd style="margin-left: 60%;">[<a href="{files.U_VIEW_NO_MERGE_NEW}" onclick="popup('{files.U_VIEW_NO_MERGE_NEW}', 700, 500); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
|
<dd style="margin-left: 60%;"><!-- IF not files.S_BINARY -->[<a href="{files.U_VIEW_NO_MERGE_NEW}" onclick="popup('{files.U_VIEW_NO_MERGE_NEW}', 700, 500); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE --> <!-- ENDIF --></dd>
|
||||||
</dl>
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt style="width: 60%"><input type="radio" class="radio" name="conflict[{files.FILENAME}]" value="2" /> {L_MERGE_NO_MERGE_MOD_OPTION}</dt>
|
<dt style="width: 60%"><input type="radio" class="radio" name="conflict[{files.FILENAME}]" value="2" /> {L_MERGE_NO_MERGE_MOD_OPTION}</dt>
|
||||||
<dd style="margin-left: 60%;">[<a href="{files.U_VIEW_NO_MERGE_MOD}" onclick="popup('{files.U_VIEW_NO_MERGE_MOD}', 700, 500); return false;">{L_SHOW_DIFF_FINAL}</a>]</dd>
|
<dd style="margin-left: 60%;"><!-- IF not files.S_BINARY -->[<a href="{files.U_VIEW_NO_MERGE_MOD}" onclick="popup('{files.U_VIEW_NO_MERGE_MOD}', 700, 500); return false;">{L_SHOW_DIFF_FINAL}</a>]<!-- ELSE --> <!-- ENDIF --></dd>
|
||||||
</dl>
|
</dl>
|
||||||
<!-- IF not files.S_BINARY -->
|
<!-- IF not files.S_BINARY -->
|
||||||
<dl>
|
<dl>
|
||||||
|
|
|
@ -219,6 +219,11 @@ class acp_prune
|
||||||
$active = ($active) ? explode('-', $active) : array();
|
$active = ($active) ? explode('-', $active) : array();
|
||||||
$joined = ($joined) ? explode('-', $joined) : array();
|
$joined = ($joined) ? explode('-', $joined) : array();
|
||||||
|
|
||||||
|
if ((sizeof($active) && sizeof($active) != 3) || (sizeof($joined) && sizeof($joined) != 3))
|
||||||
|
{
|
||||||
|
trigger_error($user->lang['WRONG_ACTIVE_JOINED_DATE'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||||
|
}
|
||||||
|
|
||||||
$count = request_var('count', 0);
|
$count = request_var('count', 0);
|
||||||
|
|
||||||
$key_match = array('lt' => '<', 'gt' => '>', 'eq' => '=');
|
$key_match = array('lt' => '<', 'gt' => '>', 'eq' => '=');
|
||||||
|
@ -257,7 +262,8 @@ class acp_prune
|
||||||
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
{
|
{
|
||||||
if (!in_array($row['user_id'], $bot_ids))
|
// Do not prune bots and the user currently pruning.
|
||||||
|
if ($row['user_id'] != $user->data['user_id'] && !in_array($row['user_id'], $bot_ids))
|
||||||
{
|
{
|
||||||
$user_ids[] = $row['user_id'];
|
$user_ids[] = $row['user_id'];
|
||||||
$usernames[$row['user_id']] = $row['username'];
|
$usernames[$row['user_id']] = $row['username'];
|
||||||
|
|
|
@ -34,10 +34,10 @@ function still_on_time()
|
||||||
// If zero, then set to something higher to not let the user catch the ten seconds barrier.
|
// If zero, then set to something higher to not let the user catch the ten seconds barrier.
|
||||||
if ($max_execution_time === 0)
|
if ($max_execution_time === 0)
|
||||||
{
|
{
|
||||||
$max_execution_time = 65;
|
$max_execution_time = 250;
|
||||||
}
|
}
|
||||||
|
|
||||||
$max_execution_time = min(max(10, ($max_execution_time - 15)), 50);
|
$max_execution_time = min(max(10, ($max_execution_time - 15)), 250);
|
||||||
|
|
||||||
// For debugging purposes
|
// For debugging purposes
|
||||||
// $max_execution_time = 10;
|
// $max_execution_time = 10;
|
||||||
|
@ -439,7 +439,8 @@ function import_avatar_gallery($gallery_name = '', $subdirs_as_galleries = false
|
||||||
|
|
||||||
if (is_dir($src_path))
|
if (is_dir($src_path))
|
||||||
{
|
{
|
||||||
copy_dir($convert->convertor['avatar_gallery_path'], path($config['avatar_gallery_path']) . $gallery_name, !$subdirs_as_galleries, false, true, $relative_path);
|
// Do not die on failure... safe mode restrictions may be in effect.
|
||||||
|
copy_dir($convert->convertor['avatar_gallery_path'], path($config['avatar_gallery_path']) . $gallery_name, !$subdirs_as_galleries, false, false, $relative_path);
|
||||||
|
|
||||||
// only doing 1 level deep. (ibf 1.x)
|
// only doing 1 level deep. (ibf 1.x)
|
||||||
// notes: ibf has 2 tiers: directly in the avatar directory for base gallery (handled in the above statement), plus subdirs(handled below).
|
// notes: ibf has 2 tiers: directly in the avatar directory for base gallery (handled in the above statement), plus subdirs(handled below).
|
||||||
|
@ -483,7 +484,9 @@ function import_avatar_gallery($gallery_name = '', $subdirs_as_galleries = false
|
||||||
for ($i = 0; $i < sizeof($dirlist); ++$i)
|
for ($i = 0; $i < sizeof($dirlist); ++$i)
|
||||||
{
|
{
|
||||||
$dir = $dirlist[$i];
|
$dir = $dirlist[$i];
|
||||||
copy_dir(path($convert->convertor['avatar_gallery_path'], $relative_path) . $dir, path($config['avatar_gallery_path']) . $dir, true, false, true, $relative_path);
|
|
||||||
|
// Do not die on failure... safe mode restrictions may be in effect.
|
||||||
|
copy_dir(path($convert->convertor['avatar_gallery_path'], $relative_path) . $dir, path($config['avatar_gallery_path']) . $dir, true, false, false, $relative_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1927,22 +1930,6 @@ function fix_empty_primary_groups()
|
||||||
|
|
||||||
$db->sql_query('UPDATE ' . USERS_TABLE . ' SET group_id = ' . get_group_id('guests') . ' WHERE user_id = ' . ANONYMOUS);
|
$db->sql_query('UPDATE ' . USERS_TABLE . ' SET group_id = ' . get_group_id('guests') . ' WHERE user_id = ' . ANONYMOUS);
|
||||||
|
|
||||||
$sql = 'SELECT ban_userid as user_id FROM ' . BANLIST_TABLE . ' WHERE ban_userid > 0';
|
|
||||||
$result = $db->sql_query($sql);
|
|
||||||
|
|
||||||
$user_ids = array();
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
|
||||||
{
|
|
||||||
$user_ids[] = $row['user_id'];
|
|
||||||
}
|
|
||||||
$db->sql_freeresult($result);
|
|
||||||
|
|
||||||
if (sizeof($user_ids))
|
|
||||||
{
|
|
||||||
$db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_type = ' . USER_IGNORE . '
|
|
||||||
WHERE user_id IN (' . implode(',', $user_ids) . ')');
|
|
||||||
}
|
|
||||||
|
|
||||||
$sql = 'SELECT user_id FROM ' . USER_GROUP_TABLE . ' WHERE group_id = ' . get_group_id('administrators');
|
$sql = 'SELECT user_id FROM ' . USER_GROUP_TABLE . ' WHERE group_id = ' . get_group_id('administrators');
|
||||||
$result = $db->sql_query($sql);
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
|
|
@ -561,7 +561,20 @@ class fileupload
|
||||||
{
|
{
|
||||||
$_FILES[$form_name]['name'] = basename($source_file);
|
$_FILES[$form_name]['name'] = basename($source_file);
|
||||||
$_FILES[$form_name]['size'] = 0;
|
$_FILES[$form_name]['size'] = 0;
|
||||||
$_FILES[$form_name]['type'] = '';
|
$mimetype = '';
|
||||||
|
|
||||||
|
if (function_exists('mime_content_type'))
|
||||||
|
{
|
||||||
|
$mimetype = mime_content_type($filename);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Some browsers choke on a mimetype of application/octet-stream
|
||||||
|
if (!$mimetype || $mimetype == 'application/octet-stream')
|
||||||
|
{
|
||||||
|
$mimetype = 'application/octetstream';
|
||||||
|
}
|
||||||
|
|
||||||
|
$_FILES[$form_name]['type'] = $mimetype;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -1845,8 +1845,11 @@ class install_convert extends module
|
||||||
|
|
||||||
if ($convert->options['refresh'])
|
if ($convert->options['refresh'])
|
||||||
{
|
{
|
||||||
$template->assign_var('S_REFRESH', true);
|
// Because we should not rely on correct settings, we simply use the relative path here directly.
|
||||||
meta_refresh(5, $url);
|
$template->assign_vars(array(
|
||||||
|
'S_REFRESH' => true,
|
||||||
|
'META' => '<meta http-equiv="refresh" content="5;url=' . $url . '" />')
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,8 @@ $lang = array_merge($lang, array(
|
||||||
|
|
||||||
'USER_DEACTIVATE_SUCCESS' => 'The selected users have been deactivated successfully.',
|
'USER_DEACTIVATE_SUCCESS' => 'The selected users have been deactivated successfully.',
|
||||||
'USER_DELETE_SUCCESS' => 'The selected users have been deleted successfully.',
|
'USER_DELETE_SUCCESS' => 'The selected users have been deleted successfully.',
|
||||||
|
|
||||||
|
'WRONG_ACTIVE_JOINED_DATE' => 'The date entered is wrong, it is expected in <kbd>YYYY-MM-DD</kbd> format.',
|
||||||
));
|
));
|
||||||
|
|
||||||
// Forum Pruning
|
// Forum Pruning
|
||||||
|
|
|
@ -346,6 +346,7 @@ $lang = array_merge($lang, array(
|
||||||
'NO_ONLINE_USERS' => 'No registered users',
|
'NO_ONLINE_USERS' => 'No registered users',
|
||||||
'NO_POSTS' => 'No posts',
|
'NO_POSTS' => 'No posts',
|
||||||
'NO_POSTS_TIME_FRAME' => 'No posts exist inside this topic for the selected time frame.',
|
'NO_POSTS_TIME_FRAME' => 'No posts exist inside this topic for the selected time frame.',
|
||||||
|
'NO_SUBJECT' => 'No subject specified',
|
||||||
'NO_SUCH_SEARCH_MODULE' => 'The specified search backend doesn’t exist',
|
'NO_SUCH_SEARCH_MODULE' => 'The specified search backend doesn’t exist',
|
||||||
'NO_SUPPORTED_AUTH_METHODS' => 'No supported authentication methods',
|
'NO_SUPPORTED_AUTH_METHODS' => 'No supported authentication methods',
|
||||||
'NO_TOPIC' => 'The requested topic does not exist.',
|
'NO_TOPIC' => 'The requested topic does not exist.',
|
||||||
|
|
|
@ -74,14 +74,21 @@ switch ($mode)
|
||||||
|
|
||||||
$user_ary = $auth->acl_get_list(false, array('a_', 'm_'), false);
|
$user_ary = $auth->acl_get_list(false, array('a_', 'm_'), false);
|
||||||
|
|
||||||
$admin_id_ary = $mod_id_ary = $forum_id_ary = array();
|
$admin_id_ary = $global_mod_id_ary = $mod_id_ary = $forum_id_ary = array();
|
||||||
foreach ($user_ary as $forum_id => $forum_ary)
|
foreach ($user_ary as $forum_id => $forum_ary)
|
||||||
{
|
{
|
||||||
foreach ($forum_ary as $auth_option => $id_ary)
|
foreach ($forum_ary as $auth_option => $id_ary)
|
||||||
{
|
{
|
||||||
if (!$forum_id && $auth_option == 'a_')
|
if (!$forum_id)
|
||||||
|
{
|
||||||
|
if ($auth_option == 'a_')
|
||||||
{
|
{
|
||||||
$admin_id_ary = array_merge($admin_id_ary, $id_ary);
|
$admin_id_ary = array_merge($admin_id_ary, $id_ary);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$global_mod_id_ary = array_merge($global_mod_id_ary, $id_ary);
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -100,6 +107,9 @@ switch ($mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
$admin_id_ary = array_unique($admin_id_ary);
|
$admin_id_ary = array_unique($admin_id_ary);
|
||||||
|
$global_mod_id_ary = array_unique($global_mod_id_ary);
|
||||||
|
|
||||||
|
$mod_id_ary = array_merge($mod_id_ary, $global_mod_id_ary);
|
||||||
$mod_id_ary = array_unique($mod_id_ary);
|
$mod_id_ary = array_unique($mod_id_ary);
|
||||||
|
|
||||||
// Admin group id...
|
// Admin group id...
|
||||||
|
@ -158,7 +168,7 @@ switch ($mode)
|
||||||
// Remove from admin_id_ary, because the user may be a mod instead
|
// Remove from admin_id_ary, because the user may be a mod instead
|
||||||
unset($admin_id_ary[array_search($row['user_id'], $admin_id_ary)]);
|
unset($admin_id_ary[array_search($row['user_id'], $admin_id_ary)]);
|
||||||
|
|
||||||
if (!in_array($row['user_id'], $mod_id_ary))
|
if (!in_array($row['user_id'], $mod_id_ary) && !in_array($row['user_id'], $global_mod_id_ary))
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -171,7 +181,7 @@ switch ($mode)
|
||||||
$s_forum_select = '';
|
$s_forum_select = '';
|
||||||
$undisclosed_forum = false;
|
$undisclosed_forum = false;
|
||||||
|
|
||||||
if (isset($forum_id_ary[$row['user_id']]))
|
if (isset($forum_id_ary[$row['user_id']]) && !in_array($row['user_id'], $global_mod_id_ary))
|
||||||
{
|
{
|
||||||
if ($which_row == 'mod' && sizeof(array_diff(array_keys($forums), $forum_id_ary[$row['user_id']])))
|
if ($which_row == 'mod' && sizeof(array_diff(array_keys($forums), $forum_id_ary[$row['user_id']])))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue