ksar wrote:scouthostinguk wrote:I think I may of found a error on the viewtopic page.
When you visit the page the flags show 2 times.
I have never see that...
The think strange is that this variables are calculated in page_header() so normally it will be shown 2 times on every pages....
On our board we had the same problem. Double flags only on the index page. I discovered the problem was caused by an other mod. We have a calendar mod installed (
http://www.phpbb.com/community/viewtopi ... 9&t=691155).
This mod was also part of index.php.
Code: Select all
calendar_display_calendar_on_index();
Removing that line solved the double flags problem, but then we had no calendar part on the index page of course.
The line in the index.php file calls a function in includes/functions_calendar.php.
Code: Select all
function calendar_display_calendar_on_index()
{
global $auth, $db, $user, $config, $template;
$user->setup('calendar');
//find the first day of the week
$index_display_week = get_calendar_config_value( "index_display_week", 0 );
if( $index_display_week === "1" )
{
$template->assign_vars(array(
'S_CALENDAR_WEEK' => true,
));
calendar_display_week( 1 );
}
else
{
//see if we should display X number of upcoming events
$index_display_next_events = get_calendar_config_value( "index_display_next_events", 0 );
$s_next_events = false;
if( $index_display_next_events > 0 )
{
$s_next_events = true;
}
$template->assign_vars(array(
'S_CALENDAR_WEEK' => false,
'S_CALENDAR_NEXT_EVENTS' => $s_next_events,
));
display_next_events( $index_display_next_events );
}
}
More precise... the variable $user is causing the double flag problem. I think this is causing a double run of the query in includes/session.php
Code: Select all
$sql = 'SELECT lang_iso FROM ' . LANG_TABLE;
I don't have a good solution yet, but maybe the author (ksar) or someone else can give good advice on this.