Code Duplication    Length = 4-4 lines in 4 locations

etemplate/inc/class.bo_tracking.inc.php 2 locations

@@ 702-705 (lines=4) @@
699
			$GLOBALS['egw_info']['user']['preferences'] = $GLOBALS['egw']->preferences->default_prefs();
700
			$GLOBALS['egw_info']['user']['preferences']['common']['lang'] = $user_or_lang;
701
		}
702
		if ($GLOBALS['egw_info']['user']['preferences']['common']['lang'] != translation::$userlang)	// load the right language if needed
703
		{
704
			translation::init();
705
		}
706
707
		if ($do_notify)
708
		{
@@ 745-748 (lines=4) @@
742
		// Re-load date/time preferences
743
		egw_time::init();
744
745
		if ($GLOBALS['egw_info']['user']['preferences']['common']['lang'] != translation::$userlang)
746
		{
747
			translation::init();
748
		}
749
750
		if (!$do_notify)
751
		{

phpgwapi/inc/class.asyncservice.inc.php 1 location

@@ 425-428 (lines=4) @@
422
						$GLOBALS['egw']->session->account_domain = $domain;
423
						$GLOBALS['egw_info']['user']  = $GLOBALS['egw']->session->read_repositories();
424
425
						if ($lang != $GLOBALS['egw_info']['user']['preferences']['common']['lang'])
426
						{
427
							translation::init();
428
						}
429
						// set VFS user for vfs access rights
430
						egw_vfs::$user = $job['account_id'];
431
						egw_vfs::clearstatcache();

calendar/inc/class.calendar_boupdate.inc.php 1 location

@@ 1180-1183 (lines=4) @@
1177
			$GLOBALS['egw_info']['user']['preferences'] = $GLOBALS['egw']->preferences->read_repository();
1178
			//echo "<p>".__METHOD__."() restored enviroment of #$temp_user[account_id] $temp_user[account_fullname]: tz={$GLOBALS['egw_info']['user']['preferences']['common']['tz']}</p>\n";
1179
		}
1180
		if ($lang !== $GLOBALS['egw_info']['user']['preferences']['common']['lang'])
1181
		{
1182
			translation::init();
1183
		}
1184
		// restore timezone, in case we had to reset it to server-timezone
1185
		if ($restore_tz) date_default_timezone_set($restore_tz);
1186