mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
make_normal fixed (was making topics sticky)
quickmod's "delete topic" fixed git-svn-id: file:///svn/phpbb/trunk@3876 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
43e67f177d
commit
e28707b3c2
2 changed files with 17 additions and 14 deletions
|
@ -107,7 +107,7 @@ if (isset($_POST['cancel']))
|
|||
|
||||
$subject = (!empty($_REQUEST['subject'])) ? $_REQUEST['subject'] : '';
|
||||
|
||||
$post_modes = array('approve', 'disapprove', 'move', 'fork', 'delete_topics', 'lock', 'unlock', 'merge_posts', 'delete_posts', 'split_all', 'split_beyond', 'select_topic', 'resync');
|
||||
$post_modes = array('approve', 'disapprove', 'move', 'fork', 'delete_topic', 'lock', 'unlock', 'merge_posts', 'delete_posts', 'split_all', 'split_beyond', 'select_topic', 'resync');
|
||||
foreach ($post_modes as $post_mode)
|
||||
{
|
||||
if (isset($_POST[$post_mode]))
|
||||
|
@ -504,7 +504,7 @@ foreach ($tabs as $tab)
|
|||
// - make_* Change topic type
|
||||
// - resync Resyncs topics
|
||||
// - delete_posts Delete posts, displays confirmation if unconfirmed
|
||||
// - delete_topics Delete topics, displays confirmation
|
||||
// - delete_topic Delete topics, displays confirmation
|
||||
// - select_topic Forward the user to forum view to select a destination topic for the merge
|
||||
// - merge Topic view, only displays the Merge button
|
||||
// - split Topic view, only displays the split buttons
|
||||
|
@ -798,7 +798,7 @@ switch ($mode)
|
|||
break;
|
||||
|
||||
case 'make_normal':
|
||||
$set_sql = 'topic_type = ' . POST_STICKY;
|
||||
$set_sql = 'topic_type = ' . POST_NORMAL;
|
||||
break;
|
||||
}
|
||||
if ($topic_info['forum_id'] == 0 && $mode != 'make_global')
|
||||
|
@ -1206,7 +1206,7 @@ switch ($mode)
|
|||
));
|
||||
break;
|
||||
|
||||
case 'delete_topics':
|
||||
case 'delete_topic':
|
||||
if ($quickmod)
|
||||
{
|
||||
$redirect_page = "viewforum.$phpEx$SID&f=$forum_id&start=$start";
|
||||
|
@ -1240,7 +1240,7 @@ switch ($mode)
|
|||
}
|
||||
|
||||
// Not confirmed, show confirmation message
|
||||
$hidden_fields = '<input type="hidden" name="mode" value="delete_topics" />';
|
||||
$hidden_fields = '<input type="hidden" name="mode" value="delete_topic" />';
|
||||
foreach ($topic_id_list as $t_id)
|
||||
{
|
||||
$hidden_fields .= '<input type="hidden" name="topic_id_list[]" value="' . $t_id . '" />';
|
||||
|
@ -1253,7 +1253,7 @@ switch ($mode)
|
|||
'MESSAGE_TITLE' => $user->lang['CONFIRM'],
|
||||
'MESSAGE_TEXT' => (count($topic_id_list) == 1) ? $user->lang['CONFIRM_DELETE_TOPIC'] : $user->lang['CONFIRM_DELETE_TOPICS'],
|
||||
|
||||
'S_CONFIRM_ACTION' => "mcp.$phpEx$SID&mode=delete_topics" . (($quickmod) ? '&quickmod=1' : ''),
|
||||
'S_CONFIRM_ACTION' => "mcp.$phpEx$SID&mode=delete_topic" . (($quickmod) ? '&quickmod=1' : ''),
|
||||
'S_HIDDEN_FIELDS' => $hidden_fields
|
||||
));
|
||||
break;
|
||||
|
|
|
@ -321,7 +321,7 @@ gen_forum_rules('topic', $forum_id);
|
|||
// Quick mod tools
|
||||
$topic_mod = '';
|
||||
$topic_mod .= ($auth->acl_get('m_lock', $forum_id)) ? ((intval($topic_status) == ITEM_UNLOCKED) ? '<option value="lock">' . $user->lang['LOCK_TOPIC'] . '</option>' : '<option value="unlock">' . $user->lang['UNLOCK_TOPIC'] . '</option>') : '';
|
||||
$topic_mod .= ($auth->acl_get('m_delete', $forum_id)) ? '<option value="delete">' . $user->lang['DELETE_TOPIC'] . '</option>' : '';
|
||||
$topic_mod .= ($auth->acl_get('m_delete', $forum_id)) ? '<option value="delete_topic">' . $user->lang['DELETE_TOPIC'] . '</option>' : '';
|
||||
$topic_mod .= ($auth->acl_get('m_move', $forum_id)) ? '<option value="move">' . $user->lang['MOVE_TOPIC'] . '</option>' : '';
|
||||
$topic_mod .= ($auth->acl_get('m_split', $forum_id)) ? '<option value="split">' . $user->lang['SPLIT_TOPIC'] . '</option>' : '';
|
||||
$topic_mod .= ($auth->acl_get('m_merge', $forum_id)) ? '<option value="merge">' . $user->lang['MERGE_TOPIC'] . '</option>' : '';
|
||||
|
@ -541,8 +541,8 @@ do
|
|||
}
|
||||
|
||||
$rowset[] = array(
|
||||
'post_id' => $row['post_id'],
|
||||
'post_date' => $user->format_date($row['post_time']),
|
||||
'post_id' => $row['post_id'],
|
||||
'post_time' => $row['post_time'],
|
||||
'poster' => $poster,
|
||||
'user_id' => $row['user_id'],
|
||||
'topic_id' => $row['topic_id'],
|
||||
|
@ -572,10 +572,6 @@ do
|
|||
}
|
||||
}
|
||||
|
||||
// Define the global bbcode bitfield, will be used to load bbcodes
|
||||
$bbcode_bitfield |= $row['bbcode_bitfield'];
|
||||
$bbcode_bitfield |= $row['user_sig_bbcode_bitfield'];
|
||||
|
||||
// Cache various user specific data ... so we don't have to recompute
|
||||
// this each time the same user appears on this page
|
||||
if (!isset($user_cache[$poster_id]))
|
||||
|
@ -719,6 +715,13 @@ do
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Define the global bbcode bitfield, will be used to load bbcodes
|
||||
$bbcode_bitfield |= $row['bbcode_bitfield'];
|
||||
if ($row['enable_sig'])
|
||||
{
|
||||
$bbcode_bitfield |= $row['user_sig_bbcode_bitfield'];
|
||||
}
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
$db->sql_freeresult($result);
|
||||
|
@ -959,7 +962,7 @@ foreach ($rowset as $key => $row)
|
|||
'POSTER_POSTS' => $user_cache[$poster_id]['posts'],
|
||||
'POSTER_FROM' => $user_cache[$poster_id]['from'],
|
||||
'POSTER_AVATAR' => $user_cache[$poster_id]['avatar'],
|
||||
'POST_DATE' => $row['post_date'],
|
||||
'POST_DATE' => $user->format_date($row['post_time']),
|
||||
|
||||
'POST_SUBJECT' => $row['post_subject'],
|
||||
'MESSAGE' => $message,
|
||||
|
|
Loading…
Add table
Reference in a new issue