Code Duplication    Length = 5-6 lines in 2 locations

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

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