phpBB

Code Changes

File: viewforum.php

  Unmodified   Added   Modified   Removed
Line 284Line 284

$sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 'r' => $user->lang['REPLIES'], 's' => $user->lang['SUBJECT'], 'v' => $user->lang['VIEWS']);
$sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => array('t.topic_last_post_time', 't.topic_last_post_id'), 'r' => (($auth->acl_get('m_approve', $forum_id)) ? 't.topic_posts_approved + t.topic_posts_unapproved + t.topic_posts_softdeleted' : 't.topic_posts_approved'), 's' => 'LOWER(t.topic_title)', 'v' => 't.topic_views');


$sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 'r' => $user->lang['REPLIES'], 's' => $user->lang['SUBJECT'], 'v' => $user->lang['VIEWS']);
$sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => array('t.topic_last_post_time', 't.topic_last_post_id'), 'r' => (($auth->acl_get('m_approve', $forum_id)) ? 't.topic_posts_approved + t.topic_posts_unapproved + t.topic_posts_softdeleted' : 't.topic_posts_approved'), 's' => 'LOWER(t.topic_title)', 'v' => 't.topic_views');

 

/**
* Modify the topic ordering if needed
*
* @event core.viewforum_modify_topic_ordering
* @var array sort_by_text Topic ordering options
* @var array sort_by_sql Topic orderings options SQL equivalent
* @since 3.2.5-RC1
*/
$vars = array(
'sort_by_text',
'sort_by_sql',
);
extract($phpbb_dispatcher->trigger_event('core.viewforum_modify_topic_ordering', compact($vars)));


$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param, $default_sort_days, $default_sort_key, $default_sort_dir);


$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param, $default_sort_days, $default_sort_key, $default_sort_dir);

Line 597Line 611
	$direction = (($sort_dir == 'd') ? 'DESC' : 'ASC');
$sql_start = $start;
}

	$direction = (($sort_dir == 'd') ? 'DESC' : 'ASC');
$sql_start = $start;
}

 

/**
* Modify the topics sort ordering if needed
*
* @event core.viewforum_modify_sort_direction
* @var string direction Topics sort order
* @since 3.2.5-RC1
*/
$vars = array(
'direction',
);
extract($phpbb_dispatcher->trigger_event('core.viewforum_modify_sort_direction', compact($vars)));


if (is_array($sort_by_sql[$sort_key]))
{


if (is_array($sort_by_sql[$sort_key]))
{