Code Duplication    Length = 14-16 lines in 2 locations

core/modules/GestionModule.php 1 location

@@ 90-105 (lines=16) @@
87
		 * @return boolean|null
88
		 * return true si le module est activer sinon false
89
		 */
90
		public static function getModuleActiver($nom_module) {
91
			$dbc = App::getDb();
92
93
			$query = $dbc->select("activer")->from("module")->where("nom_module", "=", $dbc->quote($nom_module), "", true)->get();
94
95
			if (count($query) > 0) {
96
				foreach ($query as $obj) {
97
					if ($obj->activer == 1) {
98
						return true;
99
					}
100
					else {
101
						return false;
102
					}
103
				}
104
			}
105
		}
106
107
		private static function getUrlToId($url) {
108
			$dbc = App::getDb();

core/modules/RouterModule.php 1 location

@@ 85-98 (lines=14) @@
82
		 * appellee dans redirectError.class.php
83
		 * @param $url
84
		 */
85
		public function getRouteModuleExist($url) {
86
			$dbc = \core\App::getDb();
87
			$query = $dbc->select()->from("module")->where("activer", "=", 1)->get();
88
			
89
			if (count($query) > 0) {
90
				foreach ($query as $obj) {
91
					if ($this->getTestUrlExist($url, $obj->url) === true) {
92
						return true;
93
					}
94
				}
95
			}
96
			
97
			return false;
98
		}
99
		
100
		/**
101
		 * @param $url