From eb0e8029f78522f27990ab8444b6bb47759d7e29 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Sat, 21 Aug 2010 19:24:54 +0200 Subject: [PATCH] Only deletes company if it is being replaced. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- modules/admin.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/admin.php b/modules/admin.php index 19f3ec5..ceb2da6 100644 --- a/modules/admin.php +++ b/modules/admin.php @@ -1378,15 +1378,15 @@ class AdminModule extends PLModule XDB::execute("DELETE FROM profile_addresses WHERE jobid = {?} AND type = 'hq'", $id); - XDB::execute('DELETE FROM profile_job_enum - WHERE id = {?}', - $id); if (Env::has('change')) { XDB::execute('UPDATE profile_job SET jobid = {?} WHERE jobid = {?}', Env::i('newJobId'), $id); + XDB::execute('DELETE FROM profile_job_enum + WHERE id = {?}', + $id); $page->trigSuccess("L'entreprise a bien été remplacée."); } else { -- 2.1.4