Code Duplication    Length = 14-14 lines in 2 locations

modules/bataille/app/controller/ForumFaction.php 1 location

@@ 49-62 (lines=14) @@
46
		 * @return bool
47
		 * fonction qui test si un forum aec ce titre existe déjà
48
		 */
49
		private function getForumExist($titre) {
50
			$dbc = App::getDb();
51
			
52
			$query = $dbc->select("titre")->from("_bataille_faction_forum")
53
				->where("titre", "=", $titre, "AND")
54
				->where("ID_faction", "=", $this->id_faction)
55
				->get();
56
			
57
			if (count($query) > 0) {
58
				return true;
59
			}
60
			
61
			return false;
62
		}
63
		
64
		/**
65
		 * @param $id_forum

modules/bataille/app/controller/PermissionsFaction.php 1 location

@@ 21-34 (lines=14) @@
18
		 * @return bool
19
		 * permet de savoir si le joueur en question est le chef de la faction
20
		 */
21
		protected function getTestChefFaction($id_identite, $id_faction) {
22
			$dbc = App::getDb();
23
			
24
			$query = $dbc->select("ID_identite")->from("_bataille_faction")
25
				->where("ID_identite", "=", $id_identite, "AND")
26
				->where("ID_faction", "=", $id_faction)
27
				->get();
28
			
29
			if (count($query) > 0) {
30
				return true;
31
			}
32
			
33
			return false;
34
		}
35
		
36
		/**
37
		 * @return int