Code Duplication    Length = 10-11 lines in 2 locations

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

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

@@ 180-189 (lines=10) @@
177
		/**
178
		 * fonction qui permet de finir le mode vacances
179
		 */
180
		public function setDesactiverModeVacances() {
181
			$dbc = App::getDb();
182
			
183
			$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();
184
		
185
			$dbc->update("last_connexion", date("Y-m-d- H:i:s"))
186
				->update("last_check_nourriture", date("Y-m-d- H:i:s"))
187
				->from("_bataille_base")
188
				->where("ID_identite", "=", Bataille::getIdIdentite())->set();
189
		}
190
		//-------------------------- END SETTER ----------------------------------------------------------------------------//
191
	}