Code Duplication    Length = 10-10 lines in 2 locations

core/process/queries/QueryManagerMysqlMonocleAlternate.php 1 location

@@ 534-543 (lines=10) @@
531
		if ($team != 0) {
532
			$where .= ($where == "" ? " HAVING" : " AND")." team = ".$team;
533
		}
534
		switch ($rankingNumber) {
535
			case 1:
536
				$order = " ORDER BY active DESC, level DESC";
537
				break;
538
			case 2:
539
				$order = " ORDER BY maxCp DESC, level DESC";
540
				break;
541
			default:
542
				$order = " ORDER BY level DESC, active DESC";
543
		}
544
		$order .= ", last_seen DESC, name ";
545
		$limit = " LIMIT ".($page * 10).",10 ";
546
		$req = "SELECT gd.owner_name AS name, MAX(owner_level) AS level, MAX(cp) AS maxCp, MAX(active) AS active, MAX(team) AS team, FROM_UNIXTIME(MAX(last_modified)) as last_seen

core/process/queries/QueryManagerPostgresqlMonocleAlternate.php 1 location

@@ 532-541 (lines=10) @@
529
		if ($team != 0) {
530
			$where .= ($where == "" ? " HAVING" : " AND")." team = ".$team;
531
		}
532
		switch ($rankingNumber) {
533
			case 1:
534
				$order = " ORDER BY active DESC, level DESC";
535
				break;
536
			case 2:
537
				$order = " ORDER BY maxCp DESC, level DESC";
538
				break;
539
			default:
540
				$order = " ORDER BY level DESC, active DESC";
541
		}
542
		$order .= ", last_seen DESC, name ";
543
		$limit = " LIMIT 10 OFFSET ".($page * 10);
544
		$req = "SELECT gd.owner_name AS name, MAX(owner_level) AS level, MAX(cp) AS maxCp, MAX(active) AS active, MAX(team) AS team, TO_TIMESTAMP(MAX(last_modified)) as last_seen