From 774b4d67682dd4793dad0b438791ca23f684c03c Mon Sep 17 00:00:00 2001 From: INOPIAE Date: Thu, 13 Dec 2012 07:31:10 +0100 Subject: bug 1121: introduced 4 new function into includes/notary.inc.php to process the cca recording, added the write_user_agreement to www/index.php and www/wot.php, added delete_user_agreement to the cron/removedead.php --- includes/notary.inc.php | 66 +++++++++++++++++++++++++++++++++++++++++++++ scripts/cron/removedead.php | 4 ++- www/index.php | 3 +++ www/wot.php | 5 ++++ 4 files changed, 77 insertions(+), 1 deletion(-) diff --git a/includes/notary.inc.php b/includes/notary.inc.php index cc0e0eb..7d67abf 100644 --- a/includes/notary.inc.php +++ b/includes/notary.inc.php @@ -602,4 +602,70 @@

[ ]

diff --git a/scripts/cron/removedead.php b/scripts/cron/removedead.php index aadda81..2257dc8 100755 --- a/scripts/cron/removedead.php +++ b/scripts/cron/removedead.php @@ -19,7 +19,8 @@ require_once(dirname(__FILE__).'/../../includes/mysql.php'); require_once(dirname(__FILE__).'/../../includes/lib/l10n.php'); - + require_once(dirname(__FILE__).'/../../includes/notary.inc.php'); + $query = "select * from `users` where `users`.`verified`=0 and (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(`users`.`created`)) >= 172800"; $res = mysql_query($query); @@ -27,6 +28,7 @@ { mysql_query("delete from `email` where `memid`='".$row['id']."'"); mysql_query("delete from `users` where `id`='".$row['id']."'"); + delete_user_agreement($row['id']); } $query = "delete from `domains` where `hash`!='' and diff --git a/www/index.php b/www/index.php index 41b6d7a..46f55a7 100644 --- a/www/index.php +++ b/www/index.php @@ -18,6 +18,7 @@ require_once('../includes/lib/l10n.php'); + $id = 0; if(array_key_exists("id",$_REQUEST)) $id=intval($_REQUEST['id']); $oldid = 0; if(array_key_exists("oldid",$_REQUEST)) $oldid=intval($_REQUEST['oldid']); $process = ""; if(array_key_exists("process",$_REQUEST)) $process=$_REQUEST['process']; @@ -544,6 +545,8 @@ require_once('../includes/lib/l10n.php'); `regional`='".$_SESSION['signup']['regional']."', `radius`='".$_SESSION['signup']['radius']."'"; mysql_query($query); + include_once("../includes/notary.inc.php"); + write_user_agreement($memid, "CCA", "account creation", "", 1); $body = _("Thanks for signing up with CAcert.org, below is the link you need to open to verify your account. Once your account is verified you will be able to start issuing certificates till your hearts' content!")."\n\n"; $body .= "http://".$_SESSION['_config']['normalhostname']."/verify.php?type=email&emailid=$emailid&hash=$hash\n\n"; diff --git a/www/wot.php b/www/wot.php index c6c0568..c09f910 100644 --- a/www/wot.php +++ b/www/wot.php @@ -297,6 +297,10 @@ $iecho= "c"; } mysql_query($query); fix_assurer_flag($_SESSION['_config']['notarise']['id']); + include_once("../includes/notary.inc.php"); + write_user_agreement($_SESSION['profile']['id'], "CCA", "assurance", "Assuring", 1, $_SESSION['_config']['notarise']['id']); +/* to be activates after the CCA recording is announced + write_user_agreement($_SESSION['_config']['notarise']['id'], "CCA", "assurance", "Being assured", 0, $_SESSION['profile']['id']); */ if($_SESSION['profile']['points'] < 150) { @@ -313,6 +317,7 @@ $iecho= "c"; `method`='Administrative Increase', `when`=NOW()"; mysql_query($query); + // No need to fix_assurer_flag here, this should only happen for assurers... $_SESSION['profile']['points'] += $addpoints; } -- cgit v1.2.1