phpBB

Code Changes

File: phpbb/log/log.php

  Unmodified   Added   Modified   Removed
Line 391Line 391
		{
$sql_where .= ' AND ';


		{
$sql_where .= ' AND ';


			if (is_array($field_value) && sizeof($field_value) == 2 && !is_array($field_value[1]))

			if (is_array($field_value) && count($field_value) == 2 && !is_array($field_value[1]))

			{
$sql_where .= $field . ' ' . $field_value[0] . ' ' . $field_value[1];
}

			{
$sql_where .= $field . ' ' . $field_value[0] . ' ' . $field_value[1];
}

Line 689Line 689
						}
}


						}
}


					if (($num_args - sizeof($log_data_ary)) > 0)

					if (($num_args - count($log_data_ary)) > 0)

					{

					{

						$log_data_ary = array_merge($log_data_ary, array_fill(0, $num_args - sizeof($log_data_ary), ''));

						$log_data_ary = array_merge($log_data_ary, array_fill(0, $num_args - count($log_data_ary), ''));

					}

$lang_arguments = array_merge(array($log[$i]['action']), $log_data_ary);

					}

$lang_arguments = array_merge(array($log[$i]['action']), $log_data_ary);

Line 740Line 740
		$vars = array('log', 'topic_id_list', 'reportee_id_list');
extract($this->dispatcher->trigger_event('core.get_logs_get_additional_data', compact($vars)));


		$vars = array('log', 'topic_id_list', 'reportee_id_list');
extract($this->dispatcher->trigger_event('core.get_logs_get_additional_data', compact($vars)));


		if (sizeof($topic_id_list))

		if (count($topic_id_list))

		{
$topic_auth = $this->get_topic_auth($topic_id_list);

foreach ($log as $key => $row)
{
$log[$key]['viewtopic'] = (isset($topic_auth['f_read'][$row['topic_id']])) ? append_sid("{$this->phpbb_root_path}viewtopic.{$this->php_ext}", 'f=' . $topic_auth['f_read'][$row['topic_id']] . '&t=' . $row['topic_id']) : false;

		{
$topic_auth = $this->get_topic_auth($topic_id_list);

foreach ($log as $key => $row)
{
$log[$key]['viewtopic'] = (isset($topic_auth['f_read'][$row['topic_id']])) ? append_sid("{$this->phpbb_root_path}viewtopic.{$this->php_ext}", 'f=' . $topic_auth['f_read'][$row['topic_id']] . '&t=' . $row['topic_id']) : false;

				$log[$key]['viewpost'] = (isset($topic_auth['f_read'][$row['topic_id']]) && $row['post_id']) ? append_sid("{$this->phpbb_root_path}viewtopic.{$this->php_ext}", 'f=' . $topic_auth['f_read'][$row['topic_id']] . '&t=' . $row['topic_id'] . '&p=' . $row['post_id']) : false;

				$log[$key]['viewpost'] = (isset($topic_auth['f_read'][$row['topic_id']]) && $row['post_id']) ? append_sid("{$this->phpbb_root_path}viewtopic.{$this->php_ext}", 'f=' . $topic_auth['f_read'][$row['topic_id']] . '&t=' . $row['topic_id'] . '&p=' . $row['post_id'] . '#p' . $row['post_id']) : false;

				$log[$key]['viewlogs'] = (isset($topic_auth['m_'][$row['topic_id']])) ? append_sid("{$this->phpbb_root_path}mcp.{$this->php_ext}", 'i=logs&mode=topic_logs&t=' . $row['topic_id'], true, $this->user->session_id) : false;
}
}


				$log[$key]['viewlogs'] = (isset($topic_auth['m_'][$row['topic_id']])) ? append_sid("{$this->phpbb_root_path}mcp.{$this->php_ext}", 'i=logs&mode=topic_logs&t=' . $row['topic_id'], true, $this->user->session_id) : false;
}
}


		if (sizeof($reportee_id_list))

		if (count($reportee_id_list))

		{
$reportee_data_list = $this->get_reportee_data($reportee_id_list);


		{
$reportee_data_list = $this->get_reportee_data($reportee_id_list);


Line 838Line 838
			$keywords_pattern = array();

// Build pattern and keywords...

			$keywords_pattern = array();

// Build pattern and keywords...

			for ($i = 0, $num_keywords = sizeof($keywords); $i < $num_keywords; $i++)

			for ($i = 0, $num_keywords = count($keywords); $i < $num_keywords; $i++)

			{
$keywords_pattern[] = preg_quote($keywords[$i], '#');
$keywords[$i] = $this->db->sql_like_expression($this->db->get_any_char() . $keywords[$i] . $this->db->get_any_char());

			{
$keywords_pattern[] = preg_quote($keywords[$i], '#');
$keywords[$i] = $this->db->sql_like_expression($this->db->get_any_char() . $keywords[$i] . $this->db->get_any_char());

Line 932Line 932
			{
$forum_auth['f_read'][$row['topic_id']] = $row['forum_id'];
}

			{
$forum_auth['f_read'][$row['topic_id']] = $row['forum_id'];
}

 

/**
* Allow modifying SQL query after topic data is retrieved (inside loop).
*
* @event core.phpbb_log_get_topic_auth_sql_after
* @var array forum_auth Forum permissions
* @var array row One row of data from SQL query
* @since 3.2.2-RC1
*/
$vars = array(
'forum_auth',
'row',
);
extract($this->dispatcher->trigger_event('core.phpbb_log_get_topic_auth_sql_after', compact($vars)));


if ($this->auth->acl_gets('a_', 'm_', $row['forum_id']))
{


if ($this->auth->acl_gets('a_', 'm_', $row['forum_id']))
{