Code Duplication    Length = 9-10 lines in 4 locations

Sources/Logging.php 4 locations

@@ 468-476 (lines=9) @@
465
			trigger_error('logActions(): data is not an array with action \'' . $log['action'] . '\'', E_USER_NOTICE);
466
467
		// Pull out the parts we want to store separately, but also make sure that the data is proper
468
		if (isset($log['extra']['topic']))
469
		{
470
			if (!is_numeric($log['extra']['topic']))
471
				trigger_error('logActions(): data\'s topic is not a number', E_USER_NOTICE);
472
			$topic_id = empty($log['extra']['topic']) ? 0 : (int) $log['extra']['topic'];
473
			unset($log['extra']['topic']);
474
		}
475
		else
476
			$topic_id = 0;
477
478
		if (isset($log['extra']['message']))
479
		{
@@ 478-486 (lines=9) @@
475
		else
476
			$topic_id = 0;
477
478
		if (isset($log['extra']['message']))
479
		{
480
			if (!is_numeric($log['extra']['message']))
481
				trigger_error('logActions(): data\'s message is not a number', E_USER_NOTICE);
482
			$msg_id = empty($log['extra']['message']) ? 0 : (int) $log['extra']['message'];
483
			unset($log['extra']['message']);
484
		}
485
		else
486
			$msg_id = 0;
487
488
		// @todo cache this?
489
		// Is there an associated report on this?
@@ 516-524 (lines=9) @@
513
		if (isset($log['extra']['member']) && !is_numeric($log['extra']['member']))
514
			trigger_error('logActions(): data\'s member is not a number', E_USER_NOTICE);
515
516
		if (isset($log['extra']['board']))
517
		{
518
			if (!is_numeric($log['extra']['board']))
519
				trigger_error('logActions(): data\'s board is not a number', E_USER_NOTICE);
520
			$board_id = empty($log['extra']['board']) ? 0 : (int) $log['extra']['board'];
521
			unset($log['extra']['board']);
522
		}
523
		else
524
			$board_id = 0;
525
526
		if (isset($log['extra']['board_to']))
527
		{
@@ 526-535 (lines=10) @@
523
		else
524
			$board_id = 0;
525
526
		if (isset($log['extra']['board_to']))
527
		{
528
			if (!is_numeric($log['extra']['board_to']))
529
				trigger_error('logActions(): data\'s board_to is not a number', E_USER_NOTICE);
530
			if (empty($board_id))
531
			{
532
				$board_id = empty($log['extra']['board_to']) ? 0 : (int) $log['extra']['board_to'];
533
				unset($log['extra']['board_to']);
534
			}
535
		}
536
537
		if (isset($log['extra']['member_affected']))
538
			$memID = $log['extra']['member_affected'];