Code Duplication    Length = 16-16 lines in 2 locations

Sources/Subs-Members.php 1 location

@@ 994-1009 (lines=16) @@
991
		// First get the profile of the given board.
992
		if (isset($board_info['id']) && $board_info['id'] == $board_id)
993
			$profile_id = $board_info['profile'];
994
		elseif ($board_id !== 0)
995
		{
996
			$request = $smcFunc['db_query']('', '
997
				SELECT id_profile
998
				FROM {db_prefix}boards
999
				WHERE id_board = {int:id_board}
1000
				LIMIT 1',
1001
				array(
1002
					'id_board' => $board_id,
1003
				)
1004
			);
1005
			if ($smcFunc['db_num_rows']($request) == 0)
1006
				fatal_lang_error('no_board');
1007
			list ($profile_id) = $smcFunc['db_fetch_row']($request);
1008
			$smcFunc['db_free_result']($request);
1009
		}
1010
		else
1011
			$profile_id = 1;
1012

Sources/Display.php 1 location

@@ 1810-1825 (lines=16) @@
1807
	if (allowedTo('delete_any'))
1808
		$allowed_all = true;
1809
	// Allowed to delete replies to their messages?
1810
	elseif (allowedTo('delete_replies'))
1811
	{
1812
		$request = $smcFunc['db_query']('', '
1813
			SELECT id_member_started
1814
			FROM {db_prefix}topics
1815
			WHERE id_topic = {int:current_topic}
1816
			LIMIT 1',
1817
			array(
1818
				'current_topic' => $topic,
1819
			)
1820
		);
1821
		list ($starter) = $smcFunc['db_fetch_row']($request);
1822
		$smcFunc['db_free_result']($request);
1823
1824
		$allowed_all = $starter == $user_info['id'];
1825
	}
1826
	else
1827
		$allowed_all = false;
1828