Code Duplication    Length = 2-2 lines in 4 locations

Sources/Display.php 4 locations

@@ 1424-1425 (lines=2) @@
1421
	// Build the mod button array
1422
	$context['mod_buttons'] = array();
1423
1424
	if ($context['can_move'])
1425
		$context['mod_buttons']['move'] = array('text' => 'move_topic', 'image' => 'admin_move.png', 'url' => $scripturl . '?action=movetopic;current_board=' . $context['current_board'] . ';topic=' . $context['current_topic'] . '.0');
1426
1427
	if ($context['can_delete'])
1428
		$context['mod_buttons']['delete'] = array('text' => 'remove_topic', 'image' => 'admin_rem.png', 'custom' => 'data-confirm="' . $txt['are_sure_remove_topic'] . '"', 'class' => 'you_sure', 'url' => $scripturl . '?action=removetopic2;topic=' . $context['current_topic'] . '.0;' . $context['session_var'] . '=' . $context['session_id']);
@@ 1436-1437 (lines=2) @@
1433
	if ($context['can_sticky'])
1434
		$context['mod_buttons']['sticky'] = array('text' => empty($context['is_sticky']) ? 'set_sticky' : 'set_nonsticky', 'image' => 'admin_sticky.png', 'url' => $scripturl . '?action=sticky;topic=' . $context['current_topic'] . '.' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id']);
1435
1436
	if ($context['can_merge'])
1437
		$context['mod_buttons']['merge'] = array('text' => 'merge', 'image' => 'merge.png', 'url' => $scripturl . '?action=mergetopics;board=' . $context['current_board'] . '.0;from=' . $context['current_topic']);
1438
1439
	if ($context['calendar_post'])
1440
		$context['mod_buttons']['calendar'] = array('text' => 'calendar_link', 'image' => 'linktocal.png', 'url' => $scripturl . '?action=post;calendar;msg=' . $context['topic_first_message'] . ';topic=' . $context['current_topic'] . '.0');
@@ 1439-1440 (lines=2) @@
1436
	if ($context['can_merge'])
1437
		$context['mod_buttons']['merge'] = array('text' => 'merge', 'image' => 'merge.png', 'url' => $scripturl . '?action=mergetopics;board=' . $context['current_board'] . '.0;from=' . $context['current_topic']);
1438
1439
	if ($context['calendar_post'])
1440
		$context['mod_buttons']['calendar'] = array('text' => 'calendar_link', 'image' => 'linktocal.png', 'url' => $scripturl . '?action=post;calendar;msg=' . $context['topic_first_message'] . ';topic=' . $context['current_topic'] . '.0');
1441
1442
	// Restore topic. eh?  No monkey business.
1443
	if ($context['can_restore_topic'])
@@ 1443-1444 (lines=2) @@
1440
		$context['mod_buttons']['calendar'] = array('text' => 'calendar_link', 'image' => 'linktocal.png', 'url' => $scripturl . '?action=post;calendar;msg=' . $context['topic_first_message'] . ';topic=' . $context['current_topic'] . '.0');
1441
1442
	// Restore topic. eh?  No monkey business.
1443
	if ($context['can_restore_topic'])
1444
		$context['mod_buttons']['restore_topic'] = array('text' => 'restore_topic', 'image' => '', 'url' => $scripturl . '?action=restoretopic;topics=' . $context['current_topic'] . ';' . $context['session_var'] . '=' . $context['session_id']);
1445
1446
	// Show a message in case a recently posted message became unapproved.
1447
	$context['becomesUnapproved'] = !empty($_SESSION['becomesUnapproved']) ? true : false;