Code Duplication    Length = 9-11 lines in 2 locations

core/admin/contenus/ParentTexte.php 1 location

@@ 13-23 (lines=11) @@
10
		
11
		
12
		//-------------------------- GETTER ----------------------------------------------------------------------------//
13
		public function getParentTexte($parent) {
14
			$dbc = \core\App::getDb();
15
16
			$query = $dbc->select("titre")->from("page")->where("ID_page", "=", $parent)->get();
17
18
			if ((is_array($query)) && (count($query) > 0)) {
19
				foreach ($query as $obj) $this->parent_texte = $obj->titre;
20
			}
21
22
			return $this->parent_texte;
23
		}
24
		//-------------------------- END GETTER ----------------------------------------------------------------------------//
25
		
26
		

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

@@ 16-24 (lines=9) @@
13
14
		
15
		//-------------------------- BUILDER ----------------------------------------------------------------------------//
16
		public function __construct() {
17
			$dbc1 = Bataille::getDb();
18
19
			$query = $dbc1->select("coef_niveau_unite")->from("configuration")->where("ID_configuration", "=", 1)->get();
20
21
			if ((is_array($query)) && (count($query) == 1)) {
22
				foreach ($query as $obj) $this->coef_unite = $obj->coef_niveau_unite;
23
			}
24
		}
25
		//-------------------------- END BUILDER ----------------------------------------------------------------------------//
26
		
27