bug 782: added some echo for tracing
authorINOPIAE <inopiae@cacert.org>
Sun, 23 Jun 2013 20:01:35 +0000 (22:01 +0200)
committerINOPIAE <inopiae@cacert.org>
Sun, 23 Jun 2013 20:01:35 +0000 (22:01 +0200)
includes/account.php
www/gpg.php

index 3039248..79237e1 100644 (file)
                        {
                                $cid = intval(substr($id,14));
                                $comment=trim(mysql_real_escape_string(stripslashes($_REQUEST['comment_'.$cid])));
+echo "cid:".$cid." comment:".$comment."++</br>";
+echo "update `domaincerts` set `description`='$comment' where `id`='$cid' and `memid`='".$_SESSION['profile']['id']."'</br>";
                                mysql_query("update `domaincerts` set `description`='$comment' where `id`='$cid' and `memid`='".$_SESSION['profile']['id']."'");
                        }
                }
                        if(substr($id,0,14)=="check_comment_")
                        {
                                $cid = intval(substr($id,14));
-                               if(!empty($_REQUEST['check_comment_'.$cid])) {
-                                       $comment=trim(mysql_real_escape_string(stripslashes($_REQUEST['comment_'.$cid])));
-                                       mysql_query("update `orgemailcerts` set `description`='$comment' where `id`='$cid' and `memid`='".$_SESSION['profile']['id']."'");
-                               }
+                               $comment=trim(mysql_real_escape_string(stripslashes($_REQUEST['comment_'.$cid])));
+                               mysql_query("update `orgemailcerts` set `description`='$comment' where `id`='$cid' and `memid`='".$_SESSION['profile']['id']."'");
                        }
                }
                echo(_("Certificate settings have been changed.")."<br/>\n");
                        if(substr($id,0,14)=="check_comment_")
                        {
                                $cid = intval(substr($id,14));
-                               if(!empty($_REQUEST['check_comment_'.$cid])) {
-                                       $comment=trim(mysql_real_escape_string(stripslashes($_REQUEST['comment_'.$cid])));
-                                       mysql_query("update `orgdomaincerts` set `description`='$comment' where `id`='$cid' and `memid`='".$_SESSION['profile']['id']."'");
-                               }
+                               $comment=trim(mysql_real_escape_string(stripslashes($_REQUEST['comment_'.$cid])));
+                               mysql_query("update `orgdomaincerts` set `description`='$comment' where `id`='$cid' and `memid`='".$_SESSION['profile']['id']."'");
                        }
                }
                echo(_("Certificate settings have been changed.")."<br/>\n");
index 9356aea..b7c9989 100644 (file)
@@ -517,10 +517,8 @@ function verifyEmail($email)
                        if(substr($id,0,14)=="check_comment_")
                        {
                                $cid = intval(substr($id,14));
-                               if(!empty($_REQUEST['check_comment_'.$cid])) {
-                                       $comment=trim(mysql_real_escape_string(stripslashes($_REQUEST['comment_'.$cid])));
-                                       mysql_query("update `gpg` set `description`='$comment' where `id`='$cid' and `memid`='".$_SESSION['profile']['id']."'");
-                               }
+                               $comment=trim(mysql_real_escape_string(stripslashes($_REQUEST['comment_'.$cid])));
+                               mysql_query("update `gpg` set `description`='$comment' where `id`='$cid' and `memid`='".$_SESSION['profile']['id']."'");
                        }
                }
                echo(_("Certificate settings have been changed.")."<br/>\n");