Code Duplication    Length = 10-11 lines in 2 locations

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

@@ 86-95 (lines=10) @@
83
		/**
84
		 * fonction qui permet de finir le mode vacances
85
		 */
86
		public function setDesactiverModeVacances() {
87
			$dbc = App::getDb();
88
			
89
			$dbc->update("mode_vacances", 0)->update("last_connexion", date("Y-m-d H:i:s"))->from("_bataille_infos_player")->where("ID_identite", "=", Bataille::getIdIdentite())->set();
90
		
91
			$dbc->update("last_connexion", date("Y-m-d- H:i:s"))
92
				->update("last_check_nourriture", date("Y-m-d- H:i:s"))
93
				->from("_bataille_base")
94
				->where("ID_identite", "=", Bataille::getIdIdentite())->set();
95
		}
96
		//-------------------------- END SETTER ----------------------------------------------------------------------------//
97
	}

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

@@ 183-193 (lines=11) @@
180
		/**
181
		 * set la date de derniere connexion a now
182
		 */
183
		private function setLastConnexion() {
184
			$dbc = App::getDb();
185
			
186
			$dbc->update("last_connexion", date("Y-m-d H:i:s"))
187
				->from("_bataille_base")
188
				->where("ID_identite", "=", Bataille::getIdIdentite(), "AND")
189
				->where("ID_base", "=", $this->id_base)
190
				->set();
191
			
192
			$dbc->update("last_connexion", date("Y-m-d H:i:s"))->from("_bataille_infos_player")->where("ID_identite", "=", Bataille::getIdIdentite())->set();
193
		}
194
		
195
		/**
196
		 * fonction qui au chargement de la base regardera la derniere co du joueur