diff --git a/includes/account.php b/includes/account.php index 8e76a6a..821c46b 100644 --- a/includes/account.php +++ b/includes/account.php @@ -148,7 +148,7 @@ if($_SESSION['_config']['incname'] < 1 || $_SESSION['_config']['incname'] > 4) $_SESSION['_config']['incname'] = 1; } - if($_POST['codesign'] == 1) + if($_POST['codesign'] == 1 && $_SESSION['profile']['points'] >= 100) $_SESSION['_config']['codesign'] = 1; else $_SESSION['_config']['codesign'] = 0; @@ -160,7 +160,15 @@ if($_SESSION['_config']['rootcert'] < 1 || $_SESSION['_config']['rootcert'] > 2) $_SESSION['_config']['rootcert'] = 1; } - $id = 4; + $csr = ""; + if(trim($_POST['optionalCSR']) == "") + { + $id = 4; + } else { + $oldid = 4; + $_POST['keytype'] = "MS"; + $csr = $_POST['optionalCSR']; + } } if($oldid == 4) @@ -227,7 +235,8 @@ fclose($fp); mysql_query("update `emailcerts` set `csr_name`='$CSRname' where `id`='$emailid'"); } else if($_POST['keytype'] == "MS") { - $csr = "-----BEGIN CERTIFICATE REQUEST-----\n".$CSR."-----END CERTIFICATE REQUEST-----\n"; + if($csr == "") + $csr = "-----BEGIN CERTIFICATE REQUEST-----\n".$CSR."-----END CERTIFICATE REQUEST-----\n"; $tmpfname = tempnam("/tmp", "CSR"); $fp = fopen($tmpfname, "w"); fputs($fp, $csr); @@ -1896,7 +1905,7 @@ } else { mysql_query("update `users` set `password`=password('".mysql_escape_string(stripslashes($_POST['newpass']))."') where `id`='".intval($_POST['userid'])."'"); $row = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='".$_POST['userid']."'")); - printf(_("The password for %s has been updated sucessfully in the system."), $row['email']); + printf(_("The password for %s has been updated successfully in the system."), $row['email']); } showfooter(); exit; @@ -2119,7 +2128,7 @@ } $totalpoints = intval($tmp['points']) + $points; - $body = _("Your request to have points transfered was sucessful. You were issued $points points as a result, and you now have $totalpoints in total")."\n\n"._("The following comments were made by reviewers")."\n\n"; + $body = _("Your request to have points transfered was successful. You were issued $points points as a result, and you now have $totalpoints in total")."\n\n"._("The following comments were made by reviewers")."\n\n"; $res = mysql_query("select * from `tverify-vote` where `tverify`='$uid' and `vote`='1'"); while($row = mysql_fetch_assoc($res)) $body .= $row['comment']."\n"; diff --git a/includes/account_stuff.php b/includes/account_stuff.php index 5419ef9..a527457 100644 --- a/includes/account_stuff.php +++ b/includes/account_stuff.php @@ -150,7 +150,7 @@ function hideall() {

- +