bug 782: fixed typo
authorINOPIAE <inopiae@cacert.org>
Wed, 1 May 2013 20:40:00 +0000 (22:40 +0200)
committerINOPIAE <inopiae@cacert.org>
Wed, 1 May 2013 20:40:00 +0000 (22:40 +0200)
includes/account.php
pages/account/3.php
pages/account/5.php

index 898c58c..d54fbd9 100644 (file)
 
        if($oldid == 5 && array_key_exists('change',$_REQUEST) && $_REQUEST['change'] != "")
        {
-         showheader(_("My CAcert.org Account!"));
-         //echo _("Now changing the settings for the following certificates:")."<br>\n";
-         foreach($_REQUEST as $id => $val)
-         {
-           //echo $id."<br/>";
-           if(substr($id,0,5)=="cert_")
-           {
-             $id = intval(substr($id,5));
-             $dis=(array_key_exists('disablelogin_'.$id,$_REQUEST) && $_REQUEST['disablelogin_'.$id]=="1")?"0":"1";
-             //echo "$id -> ".$_REQUEST['disablelogin_'.$id]."<br/>\n";
-             mysql_query("update `emailcerts` set `disablelogin`='$dis' where `id`='$id' and `memid`='".$_SESSION['profile']['id']."'");
-             //$row = mysql_fetch_assoc($res);
-           }
-               if(substr($id,0,14)=="check_comment_")
-               {
-                       $id = intval(substr($id,14));
-                       $comment=trim(mysql_real_escape_string(stripslashes($_REQUEST['comment_'.$id])));
-                       mysql_query("update `emailcerts` set `description`='$comment' where `id`='$id' and `memid`='".$_SESSION['profile']['id']."'");
-                       //$row = mysql_fetch_assoc($res);
-               }
-         }
-         echo(_("Certificate settings have been changed.")."<br/>\n");
-         showfooter();
-         exit;
+               showheader(_("My CAcert.org Account!"));
+               foreach($_REQUEST as $id => $val)
+               {
+                       if(substr($id,0,5)=="cert_")
+                       {
+                               $id = intval(substr($id,5));
+                               $dis=(array_key_exists('disablelogin_'.$id,$_REQUEST) && $_REQUEST['disablelogin_'.$id]=="1")?"0":"1";
+                               mysql_query("update `emailcerts` set `disablelogin`='$dis' where `id`='$id' and `memid`='".$_SESSION['profile']['id']."'");
+                       }
+                       if(substr($id,0,14)=="check_comment_")
+                       {
+                               if (!empty($_REQUEST['check_comment'.$id])) {
+                                       $id = intval(substr($id,14));
+                                       $comment=trim(mysql_real_escape_string(stripslashes($_REQUEST['comment_'.$id])));
+                                       mysql_query("update `emailcerts` set `description`='$comment' where `id`='$id' and `memid`='".$_SESSION['profile']['id']."'");
+                               }
+                       }
+               }
+               echo(_("Certificate settings have been changed.")."<br/>\n");
+               showfooter();
+               exit;
        }
 
 
index 2726952..b92f4fa 100644 (file)
@@ -44,7 +44,7 @@
     <td class="DataTD"><input type="checkbox" name="addid[]" value="<?=intval($row['id'])?>"></td>
     <td class="DataTD"><?=sanitizeHTML($row['email'])?></td>
   </tr>
-<? } 
+<? }
 if($_SESSION['profile']['points'] >= 50)
 {
        $fname = $_SESSION['profile']['fname'];
@@ -67,7 +67,7 @@ if($_SESSION['profile']['points'] >= 50)
       <? if($fname && $mname && $lname && $suffix) { ?><input type="radio" name="incname" value="4"> <?=_("Include")?> '<?=$fname." ".$mname." ".$lname." ".$suffix?>'<br><? } ?>
     </td>
   </tr>
-<? } ?> 
+<? } ?>
 <? if($_SESSION['profile']['points'] >= 100 && $_SESSION['profile']['codesign'] > 0) { ?>
   <tr>
     <td class="DataTD" align="left">
@@ -86,8 +86,8 @@ if($_SESSION['profile']['points'] >= 50)
   </tr>
   <tr>
    <td class="DataTD" colspan="2" align="left">
-      <?=_("Optional comment, only used in the certifictate overview")?><br>
-       <input type="text" name="description" maxlength="100" size=100>
+      <?=_("Optional comment, only used in the certifictate overview max. 100 characters")?><br>
+       <input type="text" name="description" maxlength="100" size="100">
    </td>
   </tr>
 
index 7ef8933..ab7a8c9 100644 (file)
     <td class="DataTD"><?=$row['expires']?></td>
     <td class="DataTD">
       <input type="checkbox" name="disablelogin_<?=$row['id']?>" value="1" <?=$row['disablelogin']?"":"checked='checked'"?>/>
-      <input type="hidden" name="cert_<?=$row['id']?>" value="1"/>
+      <input type="hidden" name="cert_<?=$row['id']?>" value="1" />
     </td>
-    <td class="DataTD"><input name="comment_<?=$row['id']?>" type="text"><?=htmlspecialchars($row['description'])?></input></td>
-    <td><input type="checkbox" name="check_comment_<?=$row['id']?>" value="0"/></td>
+    <td class="DataTD"><input name="comment_<?=$row['id']?>" type="text" value="<?=htmlspecialchars($row['description'])?>" /></td>
+    <td class="DataTD"><input type="checkbox" name="check_comment_<?=$row['id']?>" /></td>
   </tr>
     <? } ?>
   <tr>