Code Duplication    Length = 2-2 lines in 4 locations

Sources/Display.php 4 locations

@@ 1265-1266 (lines=2) @@
1262
	// Build the mod button array
1263
	$context['mod_buttons'] = array();
1264
1265
	if ($context['can_move'])
1266
		$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');
1267
1268
	if ($context['can_delete'])
1269
		$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']);
@@ 1277-1278 (lines=2) @@
1274
	if ($context['can_sticky'])
1275
		$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']);
1276
1277
	if ($context['can_merge'])
1278
		$context['mod_buttons']['merge'] = array('text' => 'merge', 'image' => 'merge.png', 'url' => $scripturl . '?action=mergetopics;board=' . $context['current_board'] . '.0;from=' . $context['current_topic']);
1279
1280
	if ($context['calendar_post'])
1281
		$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');
@@ 1280-1281 (lines=2) @@
1277
	if ($context['can_merge'])
1278
		$context['mod_buttons']['merge'] = array('text' => 'merge', 'image' => 'merge.png', 'url' => $scripturl . '?action=mergetopics;board=' . $context['current_board'] . '.0;from=' . $context['current_topic']);
1279
1280
	if ($context['calendar_post'])
1281
		$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');
1282
1283
	// Restore topic. eh?  No monkey business.
1284
	if ($context['can_restore_topic'])
@@ 1284-1285 (lines=2) @@
1281
		$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');
1282
1283
	// Restore topic. eh?  No monkey business.
1284
	if ($context['can_restore_topic'])
1285
		$context['mod_buttons']['restore_topic'] = array('text' => 'restore_topic', 'image' => '', 'url' => $scripturl . '?action=restoretopic;topics=' . $context['current_topic'] . ';' . $context['session_var'] . '=' . $context['session_id']);
1286
1287
	// Show a message in case a recently posted message became unapproved.
1288
	$context['becomesUnapproved'] = !empty($_SESSION['becomesUnapproved']) ? true : false;