bug 1138: Only revoke assurance if we actually found one
authorMichael Tänzer <neo@nhng.de>
Tue, 29 Apr 2014 15:25:34 +0000 (17:25 +0200)
committerMichael Tänzer <neo@nhng.de>
Tue, 29 Apr 2014 15:25:34 +0000 (17:25 +0200)
Signed-off-by: Michael Tänzer <neo@nhng.de>
pages/account/43.php

index dcfa378..e92950f 100644 (file)
@@ -135,8 +135,8 @@ if(intval($_REQUEST['userid']) > 0) {
                 $res = mysql_query("select `to` from `notary` where `id`='$assurance' and `deleted` = 0");
                 if ($res) {
                     $trow = mysql_fetch_assoc($res);
-                    mysql_query("update `notary` set `deleted`=NOW() where `id`='$assurance'");
                     if ($trow) {
+                        mysql_query("update `notary` set `deleted`=NOW() where `id`='$assurance'");
                         fix_assurer_flag($trow['to']);
                     }
                 }