Code Duplication    Length = 12-15 lines in 2 locations

Sources/Profile-Actions.php 1 location

@@ 333-347 (lines=15) @@
330
					'value' => $txt['profile_warning_previous_reason'],
331
				),
332
				'data' => array(
333
					'function' => function($warning) use ($scripturl, $txt)
334
					{
335
						$ret = '
336
						<div class="floatleft">
337
							' . $warning['reason'] . '
338
						</div>';
339
340
						if (!empty($warning['id_notice']))
341
							$ret .= '
342
						<div class="floatright">
343
							<a href="' . $scripturl . '?action=moderate;area=notice;nid=' . $warning['id_notice'] . '" onclick="window.open(this.href, \'\', \'scrollbars=yes,resizable=yes,width=400,height=250\');return false;" target="_blank" rel="noopener" title="' . $txt['profile_warning_previous_notice'] . '"><span class="generic_icons filter centericon"></span></a>
344
						</div>';
345
346
						return $ret;
347
					},
348
				),
349
			),
350
			'level' => array(

Sources/ModerationCenter.php 1 location

@@ 1525-1536 (lines=12) @@
1522
					'value' => $txt['profile_warning_previous_reason'],
1523
				),
1524
				'data' => array(
1525
					'function' => function($rowData) use ($scripturl, $txt)
1526
					{
1527
						$output = '
1528
							<div class="floatleft">
1529
								' . $rowData['reason'] . '
1530
							</div>';
1531
1532
						if (!empty($rowData['id_notice']))
1533
							$output .= '
1534
								&nbsp;<a href="' . $scripturl . '?action=moderate;area=notice;nid=' . $rowData['id_notice'] . '" onclick="window.open(this.href, \'\', \'scrollbars=yes,resizable=yes,width=400,height=250\');return false;" target="_blank" rel="noopener" title="' . $txt['profile_warning_previous_notice'] . '"><span class="generic_icons filter centericon"></span></a>';
1535
						return $output;
1536
					},
1537
				),
1538
			),
1539
			'points' => array(