Code Duplication    Length = 12-12 lines in 2 locations

app/Query/QueryName.php 1 location

@@ 328-339 (lines=12) @@
325
			" WHERE n_file=" . $tree->getTreeId() . " " .
326
			($marnm ? "" : " AND n_type!='_MARNM'");
327
328
		if ($surn) {
329
			$sql .= " AND n_surn=" . Database::quote($surn) . " COLLATE '" . I18N::collation() . "'";
330
		} elseif ($salpha == ',') {
331
			$sql .= " AND n_surn=''";
332
		} elseif ($salpha == '@') {
333
			$sql .= " AND n_surn='@N.N.'";
334
		} elseif ($salpha) {
335
			$sql .= " AND " . self::getInitialSql('n_surn', $salpha);
336
		} else {
337
			// All surnames
338
			$sql .= " AND n_surn NOT IN ('', '@N.N.')";
339
		}
340
341
		// Fetch all the letters in our alphabet, whether or not there
342
		// are any names beginning with that letter. It looks better to

app/Controller/IndividualListController.php 1 location

@@ 327-338 (lines=12) @@
324
			" WHERE n_file=" . $this->tree()->getTreeId() . " " .
325
			($marnm ? "" : " AND n_type!='_MARNM'");
326
327
		if ($surn) {
328
			$sql .= " AND n_surn=" . Database::quote($surn) . " COLLATE '" . I18N::collation() . "'";
329
		} elseif ($salpha == ',') {
330
			$sql .= " AND n_surn=''";
331
		} elseif ($salpha == '@') {
332
			$sql .= " AND n_surn='@N.N.'";
333
		} elseif ($salpha) {
334
			$sql .= " AND " . $this->getInitialSql('n_surn', $salpha);
335
		} else {
336
			// All surnames
337
			$sql .= " AND n_surn NOT IN ('', '@N.N.')";
338
		}
339
340
		// Fetch all the letters in our alphabet, whether or not there
341
		// are any names beginning with that letter. It looks better to