bug 1123: fixed merge conflicts on testserver
authorBenny Baumann <BenBE@geshi.org>
Sun, 14 Jul 2013 20:23:52 +0000 (22:23 +0200)
committerBenny Baumann <BenBE@geshi.org>
Sun, 14 Jul 2013 20:35:10 +0000 (22:35 +0200)
includes/account.php
pages/gpg/0.php
www/gpg.php

index aecbd36..709cfa6 100644 (file)
@@ -17,8 +17,9 @@
 */
        require_once("../includes/loggedin.php");
        require_once("../includes/lib/l10n.php");
-       require_once('lib/check_weak_key.php');
-       require_once('notary.inc.php');
+       require_once("../includes/lib/check_weak_key.php");
+       require_once("../includes/temp_functions.php");
+       require_once("../includes/notary.inc.php");
 
        loadem("account");
 
index 60b1784..c513793 100644 (file)
@@ -19,6 +19,8 @@
 ?>
 <p><?=_("Paste your own public OpenPGP key below. It should not contain a picture. CAcert will sign your key after submission.")?></p>
 <form method="post" action="gpg.php">
+<p><?=_("Optional comment, only used in the certifictate overview")?><br />
+  <input type="text" name="description" maxlength="80" size=80 /></p>
 <textarea name="CSR" cols="80" rows="15"><?=array_key_exists('CSR',$_POST)?strip_tags($_POST['CSR']):""?></textarea><br />
 <p><input type="checkbox" name="CCA" /> <strong><?=sprintf(_("I accept the CAcert Community Agreement (%s)."),"<a href='/policy/CAcertCommunityAgreement.html'>CCA</a>")?></strong><br />
   <?=_("Please Note: You need to accept the CCA to proceed.")?></p>
index 267fabd..d0ba432 100644 (file)
@@ -286,6 +286,13 @@ function verifyEmail($email)
        {
                write_user_agreement(intval($_SESSION['profile']['id']), "CCA", "certificate creation", "", 1);
 
+               //set variable for comment
+               if(trim($_REQUEST['description']) == ""){
+                       $description= "";
+               }else{
+                       $description= trim(mysql_real_escape_string(stripslashes($_REQUEST['description'])));
+               }
+
                $query = "insert into `gpg` set `memid`='".intval($_SESSION['profile']['id'])."',
                                                `email`='".mysql_real_escape_string($lastvalidemail)."',
                                                `level`='1',