mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-11 11:13:59 +02:00
added class for disabled options in ACP
E_USER_ERROR now using language keys if available [related to #10445] UCP/MCP title tags [#10441] Check $start parameter in viewforum [#10435] Check for postable forum for moving user posts within users ACP [#10433] Show error if admin tries to put forums beneath linked forums [related to #10433] Correctly catch attachments while moving posts [#10431] language change in install.html [#10425] Updated AUTHORS file git-svn-id: file:///svn/phpbb/trunk@7456 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -345,7 +345,7 @@ class acp_forums
|
||||
|
||||
$start = request_var('start', $row2['min_topic_id']);
|
||||
|
||||
$batch_size = 3000;
|
||||
$batch_size = 2000;
|
||||
$end = $start + $batch_size;
|
||||
|
||||
// Sync all topics in batch mode...
|
||||
@@ -370,8 +370,8 @@ class acp_forums
|
||||
meta_refresh(0, $url);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'U_PROGRESS_BAR' => $this->u_action . "&action=progress_bar&start=$start&total={$row['forum_topics_real']}",
|
||||
'UA_PROGRESS_BAR' => str_replace('&', '&', $this->u_action) . "&action=progress_bar&start=$start&total={$row['forum_topics_real']}",
|
||||
'U_PROGRESS_BAR' => $this->u_action . "&action=progress_bar&start=$topics_done&total={$row['forum_topics_real']}",
|
||||
'UA_PROGRESS_BAR' => str_replace('&', '&', $this->u_action) . "&action=progress_bar&start=$topics_done&total={$row['forum_topics_real']}",
|
||||
'S_CONTINUE_SYNC' => true,
|
||||
'L_PROGRESS_EXPLAIN' => sprintf($user->lang['SYNC_IN_PROGRESS_EXPLAIN'], $topics_done, $row['forum_topics_real']))
|
||||
);
|
||||
@@ -933,7 +933,7 @@ class acp_forums
|
||||
|
||||
if ($forum_data_sql['parent_id'])
|
||||
{
|
||||
$sql = 'SELECT left_id, right_id
|
||||
$sql = 'SELECT left_id, right_id, forum_type
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE forum_id = ' . $forum_data_sql['parent_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
@@ -945,6 +945,12 @@ class acp_forums
|
||||
trigger_error($user->lang['PARENT_NOT_EXIST'] . adm_back_link($this->u_action . '&' . $this->parent_id), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if ($row['forum_type'] == FORUM_LINK)
|
||||
{
|
||||
$errors[] = $user->lang['PARENT_IS_LINK_FORUM'];
|
||||
return $errors;
|
||||
}
|
||||
|
||||
$sql = 'UPDATE ' . FORUMS_TABLE . '
|
||||
SET left_id = left_id + 2, right_id = right_id + 2
|
||||
WHERE left_id > ' . $row['right_id'];
|
||||
@@ -1185,7 +1191,21 @@ class acp_forums
|
||||
*/
|
||||
function move_forum($from_id, $to_id)
|
||||
{
|
||||
global $db;
|
||||
global $db, $user;
|
||||
|
||||
$to_data = $moved_ids = $errors = array();
|
||||
|
||||
// Check if we want to move to a parent with link type
|
||||
if ($to_id > 0)
|
||||
{
|
||||
$to_data = $this->get_forum_info($to_id);
|
||||
|
||||
if ($to_data['forum_type'] == FORUM_LINK)
|
||||
{
|
||||
$errors[] = $user->lang['PARENT_IS_LINK_FORUM'];
|
||||
return $errors;
|
||||
}
|
||||
}
|
||||
|
||||
$moved_forums = get_forum_branch($from_id, 'children', 'descending');
|
||||
$from_data = $moved_forums[0];
|
||||
@@ -1212,8 +1232,6 @@ class acp_forums
|
||||
|
||||
if ($to_id > 0)
|
||||
{
|
||||
$to_data = $this->get_forum_info($to_id);
|
||||
|
||||
// Resync new parents
|
||||
$sql = 'UPDATE ' . FORUMS_TABLE . "
|
||||
SET right_id = right_id + $diff, forum_parents = ''
|
||||
@@ -1256,6 +1274,8 @@ class acp_forums
|
||||
SET left_id = left_id $diff, right_id = right_id $diff, forum_parents = ''
|
||||
WHERE " . $db->sql_in_set('forum_id', $moved_ids);
|
||||
$db->sql_query($sql);
|
||||
|
||||
return $errors;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user