phpBB

Code Changes

File: includes/mcp/mcp_queue.php

  Unmodified   Added   Modified   Removed
Line 28Line 28
	var $p_master;
var $u_action;


	var $p_master;
var $u_action;


	public function mcp_queue(&$p_master)

	public function __construct($p_master)

	{

	{

		$this->p_master = &$p_master;

		$this->p_master = $p_master;

	}

public function main($id, $mode)

	}

public function main($id, $mode)

Line 370Line 370
				$topic_id = $request->variable('t', 0);
$forum_info = array();


				$topic_id = $request->variable('t', 0);
$forum_info = array();


				/* @var $pagination \phpbb\pagination */
$pagination = $phpbb_container->get('pagination');


				// If 'sort' is set, "Go" was pressed which is located behind the forums <select> box
// Then, unset the topic id so it does not override the forum id
$topic_id = $request->is_set_post('sort') ? 0 : $topic_id;


if ($topic_id)
{


if ($topic_id)
{

Line 501Line 502
								AND t.topic_id = p.topic_id
AND u.user_id = p.poster_id
ORDER BY ' . $sort_order_sql;

								AND t.topic_id = p.topic_id
AND u.user_id = p.poster_id
ORDER BY ' . $sort_order_sql;

 

/**
* Alter sql query to get information on all posts in queue
*
* @event core.mcp_queue_get_posts_for_posts_query_before
* @var string sql String with the query to be executed
* @var array forum_list List of forums that contain the posts
* @var int visibility_const Integer with one of the possible ITEM_* constant values
* @var int topic_id topic_id in the page request
* @var string limit_time_sql String with the SQL code to limit the time interval of the post (Note: May be empty string)
* @var string sort_order_sql String with the ORDER BY SQL code used in this query
* @since 3.2.3-RC2
*/
$vars = array(
'sql',
'forum_list',
'visibility_const',
'topic_id',
'limit_time_sql',
'sort_order_sql',
);
extract($phpbb_dispatcher->trigger_event('core.mcp_queue_get_posts_for_posts_query_before', compact($vars)));


						$result = $db->sql_query($sql);

$post_data = $rowset = array();

						$result = $db->sql_query($sql);

$post_data = $rowset = array();

Line 588Line 612
						$row['post_username'] = $row['username'] ?: $user->lang['GUEST'];
}


						$row['post_username'] = $row['username'] ?: $user->lang['GUEST'];
}


					$template->assign_block_vars('postrow', array(

					$post_row = array(

						'U_TOPIC'			=> append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id']),
'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;p=' . $row['post_id']) . (($mode == 'unapproved_posts') ? '#p' . $row['post_id'] : ''),

						'U_TOPIC'			=> append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;t=' . $row['topic_id']),
'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']),
'U_VIEWPOST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;p=' . $row['post_id']) . (($mode == 'unapproved_posts') ? '#p' . $row['post_id'] : ''),

Line 606Line 630
						'TOPIC_TITLE'	=> $row['topic_title'],
'POST_TIME' => $user->format_date($row['post_time']),
'S_HAS_ATTACHMENTS' => $auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment'],

						'TOPIC_TITLE'	=> $row['topic_title'],
'POST_TIME' => $user->format_date($row['post_time']),
'S_HAS_ATTACHMENTS' => $auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment'],

					));



















					);

/**
* Alter sql query to get information on all topics in the list of forums provided.
*
* @event core.mcp_queue_get_posts_modify_post_row
* @var array post_row Template variables for current post
* @var array row Post data
* @var array forum_names Forum names
* @since 3.2.3-RC2
*/
$vars = array(
'post_row',
'row',
'forum_names',
);
extract($phpbb_dispatcher->trigger_event('core.mcp_queue_get_posts_modify_post_row', compact($vars)));

$template->assign_block_vars('postrow', $post_row);

				}
unset($rowset, $forum_names);

				}
unset($rowset, $forum_names);

 

/* @var \phpbb\pagination $pagination */
$pagination = $phpbb_container->get('pagination');


$base_url = $this->u_action . "&amp;f=$forum_id&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir";
$pagination->generate_template_pagination($base_url, 'pagination', 'start', $total, $config['topics_per_page'], $start);


$base_url = $this->u_action . "&amp;f=$forum_id&amp;st=$sort_days&amp;sk=$sort_key&amp;sd=$sort_dir";
$pagination->generate_template_pagination($base_url, 'pagination', 'start', $total, $config['topics_per_page'], $start);