Code Duplication    Length = 5-6 lines in 2 locations

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

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