Code Duplication    Length = 5-6 lines in 2 locations

mail/inc/class.mail_ui.inc.php 2 locations

@@ 1429-1434 (lines=6) @@
1426
		}
1427
		$reverse = ($query['sort']=='ASC'?false:true);
1428
		$prefchanged = false;
1429
		if (!isset($GLOBALS['egw_info']['user']['preferences']['mail']['ActiveSearchType']) || ($query['cat_id'] !=$GLOBALS['egw_info']['user']['preferences']['mail']['ActiveSearchType']))
1430
		{
1431
			//error_log(__METHOD__.__LINE__.' Changing userPref ActivesearchType:'.$query['cat_id']);
1432
			$GLOBALS['egw']->preferences->add('mail','ActiveSearchType',$query['cat_id'],'user');
1433
			$prefchanged = true;
1434
		}
1435
		if (!isset($GLOBALS['egw_info']['user']['preferences']['mail']['ShowDetails']) || ($query['filter2'] !=$GLOBALS['egw_info']['user']['preferences']['mail']['ShowDetails']))
1436
		{
1437
			$GLOBALS['egw']->preferences->add('mail','ShowDetails',$query['filter2'],'user');
@@ 1435-1439 (lines=5) @@
1432
			$GLOBALS['egw']->preferences->add('mail','ActiveSearchType',$query['cat_id'],'user');
1433
			$prefchanged = true;
1434
		}
1435
		if (!isset($GLOBALS['egw_info']['user']['preferences']['mail']['ShowDetails']) || ($query['filter2'] !=$GLOBALS['egw_info']['user']['preferences']['mail']['ShowDetails']))
1436
		{
1437
			$GLOBALS['egw']->preferences->add('mail','ShowDetails',$query['filter2'],'user');
1438
			$prefchanged = true;
1439
		}
1440
		if ($prefchanged)
1441
		{
1442
			// save prefs