phpBB

Code Changes

File: includes/mcp/mcp_main.php

  Unmodified   Added   Modified   Removed
Line 164Line 164
				* @var	string	action		Topic quick moderation action name
* @var bool quickmod Flag indicating whether MCP is in quick moderation mode
* @since 3.1.0-a4

				* @var	string	action		Topic quick moderation action name
* @var bool quickmod Flag indicating whether MCP is in quick moderation mode
* @since 3.1.0-a4

				* @change 3.1.0-RC4 Added variables: action, quickmod

				* @changed 3.1.0-RC4 Added variables: action, quickmod

				*/
$vars = array('action', 'quickmod');
extract($phpbb_dispatcher->trigger_event('core.modify_quickmod_actions', compact($vars)));

				*/
$vars = array('action', 'quickmod');
extract($phpbb_dispatcher->trigger_event('core.modify_quickmod_actions', compact($vars)));

Line 262Line 262
*/
function lock_unlock($action, $ids)
{

*/
function lock_unlock($action, $ids)
{

	global $auth, $user, $db, $phpEx, $phpbb_root_path, $request;

	global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_dispatcher;


if ($action == 'lock' || $action == 'unlock')
{


if ($action == 'lock' || $action == 'unlock')
{

Line 321Line 321
		{
add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_' . strtoupper($action), $row['topic_title']);
}

		{
add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_' . strtoupper($action), $row['topic_title']);
}

 

/**
* Perform additional actions after locking/unlocking posts/topics
*
* @event core.mcp_lock_unlock_after
* @var string action Variable containing the action we perform on the posts/topics ('lock', 'unlock', 'lock_post' or 'unlock_post')
* @var array ids Array containing the post/topic IDs that have been locked/unlocked
* @var array data Array containing posts/topics data
* @since 3.1.7-RC1
*/
$vars = array(
'action',
'ids',
'data',
);
extract($phpbb_dispatcher->trigger_event('core.mcp_lock_unlock_after', compact($vars)));


$success_msg = $l_prefix . ((sizeof($ids) == 1) ? '' : 'S') . '_' . (($action == 'lock' || $action == 'lock_post') ? 'LOCKED' : 'UNLOCKED') . '_SUCCESS';



$success_msg = $l_prefix . ((sizeof($ids) == 1) ? '' : 'S') . '_' . (($action == 'lock' || $action == 'lock_post') ? 'LOCKED' : 'UNLOCKED') . '_SUCCESS';


Line 447Line 463
*/
function mcp_move_topic($topic_ids)
{

*/
function mcp_move_topic($topic_ids)
{

	global $auth, $user, $db, $template, $phpbb_log, $request;

	global $auth, $user, $db, $template, $phpbb_log, $request, $phpbb_dispatcher;

	global $phpEx, $phpbb_root_path;

// Here we limit the operation to one forum only

	global $phpEx, $phpbb_root_path;

// Here we limit the operation to one forum only

Line 608Line 624
					'poll_max_options'		=>	(int) $row['poll_max_options'],
'poll_last_vote' => (int) $row['poll_last_vote']
);

					'poll_max_options'		=>	(int) $row['poll_max_options'],
'poll_last_vote' => (int) $row['poll_last_vote']
);

 

/**
* Perform actions before shadow topic is created.
*
* @event core.mcp_main_modify_shadow_sql
* @var array shadow SQL array to be used by $db->sql_build_array
* @var array row Topic data
* @since 3.1.11-RC1
* @changed 3.1.11-RC1 Added variable: row
*/
$vars = array(
'shadow',
'row',
);
extract($phpbb_dispatcher->trigger_event('core.mcp_main_modify_shadow_sql', compact($vars)));


$db->sql_query('INSERT INTO ' . TOPICS_TABLE . $db->sql_build_array('INSERT', $shadow));



$db->sql_query('INSERT INTO ' . TOPICS_TABLE . $db->sql_build_array('INSERT', $shadow));


Line 861Line 892
		}

$template->assign_vars(array(

		}

$template->assign_vars(array(

			'S_SHADOW_TOPICS'		=> $only_shadow,
'S_SOFTDELETED' => $only_softdeleted,
'S_TOPIC_MODE' => true,
'S_ALLOWED_DELETE' => $auth->acl_get('m_delete', $forum_id),
'S_ALLOWED_SOFTDELETE' => $auth->acl_get('m_softdelete', $forum_id),


			'S_SHADOW_TOPICS'					=> $only_shadow,
'S_SOFTDELETED' => $only_softdeleted,
'S_TOPIC_MODE' => true,
'S_ALLOWED_DELETE' => $auth->acl_get('m_delete', $forum_id),
'S_ALLOWED_SOFTDELETE' => $auth->acl_get('m_softdelete', $forum_id),
'DELETE_TOPIC_PERMANENTLY_EXPLAIN' => $user->lang('DELETE_TOPIC_PERMANENTLY', sizeof($topic_ids)),

		));

$l_confirm = (sizeof($topic_ids) == 1) ? 'DELETE_TOPIC' : 'DELETE_TOPICS';

		));

$l_confirm = (sizeof($topic_ids) == 1) ? 'DELETE_TOPIC' : 'DELETE_TOPICS';

Line 1100Line 1132
		}

$template->assign_vars(array(

		}

$template->assign_vars(array(

			'S_SOFTDELETED'			=> $only_softdeleted,
'S_ALLOWED_DELETE' => $auth->acl_get('m_delete', $forum_id),
'S_ALLOWED_SOFTDELETE' => $auth->acl_get('m_softdelete', $forum_id),


			'S_SOFTDELETED'						=> $only_softdeleted,
'S_ALLOWED_DELETE' => $auth->acl_get('m_delete', $forum_id),
'S_ALLOWED_SOFTDELETE' => $auth->acl_get('m_softdelete', $forum_id),
'DELETE_POST_PERMANENTLY_EXPLAIN' => $user->lang('DELETE_POST_PERMANENTLY', sizeof($post_ids)),

		));

$l_confirm = (sizeof($post_ids) == 1) ? 'DELETE_POST' : 'DELETE_POSTS';

		));

$l_confirm = (sizeof($post_ids) == 1) ? 'DELETE_POST' : 'DELETE_POSTS';

Line 1262Line 1295
				'poll_max_options'			=> (int) $topic_row['poll_max_options'],
'poll_vote_change' => (int) $topic_row['poll_vote_change'],
);

				'poll_max_options'			=> (int) $topic_row['poll_max_options'],
'poll_vote_change' => (int) $topic_row['poll_vote_change'],
);

 

/**
* Perform actions before forked topic is created.
*
* @event core.mcp_main_modify_fork_sql
* @var array sql_ary SQL array to be used by $db->sql_build_array
* @var array topic_row Topic data
* @since 3.1.11-RC1
* @changed 3.1.11-RC1 Added variable: topic_row
*/
$vars = array(
'sql_ary',
'topic_row',
);
extract($phpbb_dispatcher->trigger_event('core.mcp_main_modify_fork_sql', compact($vars)));


$db->sql_query('INSERT INTO ' . TOPICS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
$new_topic_id = $db->sql_nextid();


$db->sql_query('INSERT INTO ' . TOPICS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
$new_topic_id = $db->sql_nextid();