Project

General

Profile

« Previous | Next » 

Revision 1872

Added by Dietmar over 11 years ago

  1. bugfix preferences timezone, date_format, time_format settings, backend and frontend

View differences:

index.php
60 60
		}
61 61
	}
62 62
// Insert default timezone values
63
	$user_time = true;
63 64
	include_once( ADMIN_PATH.'/interface/timezones.php' );
64 65
	$template->set_block('main_block', 'timezone_list_block', 'timezone_list');
65 66
	foreach( $TIMEZONES AS $hour_offset => $title )
......
73 74
	$user_time = true;
74 75
	include_once( ADMIN_PATH.'/interface/date_formats.php' );
75 76
	$template->set_block('main_block', 'date_format_list_block', 'date_format_list');
77

  
76 78
	foreach( $DATE_FORMATS AS $format => $title )
77 79
	{
78 80
		$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
79 81
		$template->set_var( 'VALUE', ($format != 'system_default' ? $format : 'system_default') );
80 82
		$template->set_var( 'NAME',  $title );
81
		if( (DATE_FORMAT == $format && !isset($_SESSION['USE_DEFAULT_DATE_FORMAT'])) ||
83
		if( ($admin->get_session('DATE_FORMAT') == $format && !isset($_SESSION['USE_DEFAULT_DATE_FORMAT'])) ||
82 84
			('system_default' == $format && isset($_SESSION['USE_DEFAULT_DATE_FORMAT'])) )
83 85
		{
84 86
			$template->set_var('SELECTED', ' selected="selected"');
......
88 90
		$template->parse('date_format_list', 'date_format_list_block', true);
89 91
	}
90 92
// Insert time format list
93
	$user_time = true;
91 94
	include_once( ADMIN_PATH.'/interface/time_formats.php' );
92 95
	$template->set_block('main_block', 'time_format_list_block', 'time_format_list');
93 96
	foreach( $TIME_FORMATS AS $format => $title )
......
95 98
		$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
96 99
		$template->set_var('VALUE', $format != 'system_default' ? $format : 'system_default' );
97 100
		$template->set_var('NAME',  $title);
98
		if( (TIME_FORMAT == $format && !isset($_SESSION['USE_DEFAULT_TIME_FORMAT'])) ||
101
		if( ($admin->get_session('TIME_FORMAT') == $format && !isset($_SESSION['USE_DEFAULT_TIME_FORMAT'])) ||
99 102
		    ('system_default' == $format && isset($_SESSION['USE_DEFAULT_TIME_FORMAT'])) )
100 103
		{
101 104
			$template->set_var('SELECTED', ' selected="selected"');

Also available in: Unified diff