bug 782: moved position of setting variable $description
authorINOPIAE <inopiae@cacert.org>
Mon, 24 Jun 2013 18:34:13 +0000 (20:34 +0200)
committerINOPIAE <inopiae@cacert.org>
Mon, 24 Jun 2013 18:34:13 +0000 (20:34 +0200)
www/gpg.php

index c69689a..a8b31fb 100644 (file)
@@ -251,13 +251,6 @@ function verifyEmail($email)
                }
                $resulttable.="</table>";
 
-               //set variable for comment
-               if(trim($_REQUEST['description']) == ""){
-                       $description= trim(mysql_real_escape_string(stripslashes($_REQUEST['description'])));
-               }else{
-                       $description= "";
-               }
-
                if($nok==0)
                {
                        showheader(_("Welcome to CAcert.org"));
@@ -281,6 +274,13 @@ function verifyEmail($email)
 
        if($oldid == "0" && $CSR != "")
        {
+               //set variable for comment
+               if(trim($_REQUEST['description']) == ""){
+                       $description= trim(mysql_real_escape_string(stripslashes($_REQUEST['description'])));
+               }else{
+                       $description= "";
+               }
+
                $query = "insert into `gpg` set `memid`='".intval($_SESSION['profile']['id'])."',
                                                `email`='".mysql_real_escape_string($lastvalidemail)."',
                                                `level`='1',