Code Duplication    Length = 5-6 lines in 2 locations

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

@@ 1544-1549 (lines=6) @@
1541
		}
1542
		$reverse = ($query['sort']=='ASC'?false:true);
1543
		$prefchanged = false;
1544
		if (!isset($GLOBALS['egw_info']['user']['preferences']['mail']['ActiveSearchType']) || ($query['cat_id'] !=$GLOBALS['egw_info']['user']['preferences']['mail']['ActiveSearchType']))
1545
		{
1546
			//error_log(__METHOD__.__LINE__.' Changing userPref ActivesearchType:'.$query['cat_id']);
1547
			$GLOBALS['egw']->preferences->add('mail','ActiveSearchType',$query['cat_id'],'user');
1548
			$prefchanged = true;
1549
		}
1550
		if (!isset($GLOBALS['egw_info']['user']['preferences']['mail']['ShowDetails']) || ($query['filter2'] !=$GLOBALS['egw_info']['user']['preferences']['mail']['ShowDetails']))
1551
		{
1552
			$GLOBALS['egw']->preferences->add('mail','ShowDetails',$query['filter2'],'user');
@@ 1550-1554 (lines=5) @@
1547
			$GLOBALS['egw']->preferences->add('mail','ActiveSearchType',$query['cat_id'],'user');
1548
			$prefchanged = true;
1549
		}
1550
		if (!isset($GLOBALS['egw_info']['user']['preferences']['mail']['ShowDetails']) || ($query['filter2'] !=$GLOBALS['egw_info']['user']['preferences']['mail']['ShowDetails']))
1551
		{
1552
			$GLOBALS['egw']->preferences->add('mail','ShowDetails',$query['filter2'],'user');
1553
			$prefchanged = true;
1554
		}
1555
		if ($prefchanged)
1556
		{
1557
			// save prefs