Subject: CAcert Code Development list.
List archive
- From: Wytze van der Raay <wytze AT cacert.org>
- To: Michael Tänzer <michael.taenzer AT cacert.org>
- Cc: "critical-admin AT cacert.org" <critical-admin AT cacert.org>, cacert-devel AT lists.cacert.org, Ulrich Schröter CAcert <ulrich AT cacert.org>, Benny Baumann <benbe AT cacert.org>, Marcus Mängel <inopiae AT cacert.org>, Werner Dworak <werner.dworak AT cacert.org>
- Subject: Re: Patch request: Bug #1112
- Date: Wed, 24 Apr 2013 15:21:21 +0200
- Organization: CAcert
Hi Michael,
Op 16-4-2013 19:07, Michael Tänzer schreef:
> We have a fix for https://bugs.cacert.org/view.php?id=1112
> "Exchange the text on the TTP page according to the new TTP programm"
>
> The fix was reviewed by Benny Baumann (BenBE) and me (NEOatNHNG) and
> tested by Werner Dworak, Martin Gummi and Marcus Mängel (INOPIAE).
>
> Diff is attached. Please also run the locale makefile so that our
> translators see the new strings (if present) on
> https://translations.cacert.org and new translations get imported into
> the system.
>
> Changed files:
> /includes/wot.inc.php
> /pages/wot/4.php
> /www/wot.php
The fix has been installed on the production server on April 24, 2013.
See also the attached log message. The requested translation server
updates have also been performed.
Regards,
-- wytze
--- Begin Message ---Fix for https://bugs.cacert.org/view.php?id=1112
- From: Wytze van der Raay <wytze AT cacert.org>
- To: cacert-systemlog AT lists.cacert.org
- Subject: Fwd: [cvs.cacert.org checkin notification]
- Date: Wed, 24 Apr 2013 15:16:17 +0200
- Organization: CAcert
"Exchange the text on the TTP page according to the new TTP program"
In conjunction with the attached CVS changes a new tarball has been
made available incorporating all updates. The new tarball is available
through http://www.cacert.org/src-lic.php
-- end
--- Begin Message ---
- From: "root" <root AT cvs.cacert.org>
- To: critical-admin AT cacert.org
- Subject: cvs.cacert.org checkin notification
- Date: Wed, 24 Apr 2013 15:13:03 +0200 (CEST)
uid=0(root) gid=0(root) groups=0(root)
wot.php 1.64 1.65
Wed Apr 24 15:13:03 CEST 2013
Update of /var/lib/cvs/cacert/www
In directory webdb:/home/cacert/www/www
Modified Files:
wot.php
Log Message:
Fix for https://bugs.cacert.org/view.php?id=1112
"Exchange the text on the TTP page according to the new TTP program"
===================================================================
RCS file: /var/lib/cvs/cacert/www/wot.php,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- wot.php 2013/01/17 15:06:35 1.64
+++ wot.php 2013/04/24 13:13:03 1.65
@@ -115,6 +115,7 @@
+
loadem("account");
if(array_key_exists('date',$_POST) && $_POST['date'] != "")
$_SESSION['_config']['date'] = $_POST['date'];
@@ -126,6 +127,40 @@
if($oldid == 12)
$id = $oldid;
+
+ if($oldid == 4)
+ {
+ if ($_POST['ttp']!='') {
+ //This mail does not need to be translated
+ $body = "Hi TTP adminstrators,\n\n";
+ $body .= "User ".$_SESSION['profile']['fname']." ".
+ $_SESSION['profile']['lname']." with email address '".
+ $_SESSION['profile']['email']."' is requesting a TTP
assurances for ".
+
mysql_escape_string(stripslashes($_POST['country'])).".\n\n";
+ if ($_POST['ttptopup']=='1') {
+ $body .= "The user is also requesting TTP
TOPUP.\n\n";
+ }else{
+ $body .= "The user is NOT requesting TTP
TOPUP.\n\n";
+ }
+ $body .= "The user received
".intval($_SESSION['profile']['points'])." assurance points up to today.\n\n";
+ $body .= "Please start the TTP assurance process.";
+
sendmail("support AT cacert.org",
"[CAcert.org] TTP request.", $body,
"support AT cacert.org",
"", "", "CAcert Website");
+
+ //This mail needs to be translated
+ $body =_("You are receiving this email because you
asked for TTP assurance.")."\n\n";
+ if ($_POST['ttptopup']=='1') {
+ $body .=_("You are requesting TTP
TOPUP.")."\n\n";
+ }else{
+ $body .=_("You are NOT requesting TTP
TOPUP.")."\n\n";
+ }
+ $body .= _("Best regards")."\n";
+ $body .= _("CAcert Support Team");
+
+ sendmail($_SESSION['profile']['email'], "[CAcert.org]
"._("You requested TTP assurances"), $body,
"support AT cacert.org",
"", "", "CAcert Support");
+
+ }
+
+ }
if(($id == 5 || $oldid == 5 || $id == 6 || $oldid == 6))
if (!is_assurer($_SESSION['profile']['id']))
@@ -341,14 +376,8 @@
if(($drow['total'] + $newpoints) >= 100 && $newpoints > 0)
{
- $body .= _("You have at least 100 Assurance Points.
If you want ".
- "to become an assurer try the Assurer
Challenge").
- " ( https://cats.cacert.org ).\n\n";
- $body .= _("To make it easier for others in your area
to find ".
- "you, it's helpful to list yourself
as an assurer (this ".
- "is voluntary), as well as a physical
location where you ".
- "live or work the most. You can flag
your account to be ".
- "listed, and add a comment to the
display by going to:")."\n";
+ $body .= _("You have at least 100 Assurance Points,
if you want to become an assurer try the Assurer Challenge")." (
https://cats.cacert.org )\n\n";
+ $body .= _("To make it easier for others in your area
to find you, it's helpful to list yourself as an assurer (this is voluntary),
as well as a physical location where you live or work the most. You can flag
your account to be listed, and add a comment to the display by going
to:")."\n";
$body .= "https://www.cacert.org/wot.php?id=8\n\n";
$body .= _("You can list your location by going
to:")."\n";
$body .= "https://www.cacert.org/wot.php?id=13\n\n";
--- End Message ------ Begin Message ---
- From: "root" <root AT cvs.cacert.org>
- To: critical-admin AT cacert.org
- Subject: cvs.cacert.org checkin notification
- Date: Wed, 24 Apr 2013 15:13:06 +0200 (CEST)
uid=0(root) gid=0(root) groups=0(root)
mysql.php.sample 1.14 1.15 wot.inc.php 1.7 1.8
Wed Apr 24 15:13:06 CEST 2013
Update of /var/lib/cvs/cacert/includes
In directory webdb:/home/cacert/www/includes
Modified Files:
mysql.php.sample wot.inc.php
Log Message:
Fix for https://bugs.cacert.org/view.php?id=1112
"Exchange the text on the TTP page according to the new TTP program"
===================================================================
RCS file: /var/lib/cvs/cacert/includes/wot.inc.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- wot.inc.php 2013/01/17 14:55:25 1.7
+++ wot.inc.php 2013/04/24 13:13:06 1.8
@@ -40,6 +40,15 @@
return intval($row['list']);
}
+
+ function get_number_of_ttpassurances ($userid)
+ {
+ $res = query_init ("SELECT count(*) AS `list` FROM `notary`
+ WHERE (`method`='Trusted Third Parties' or
`method`='TTP-Assisted') AND `to`='".intval($userid)."' ");
+ $row = query_getnextrow($res);
+
+ return intval($row['list']);
+ }
function get_number_of_assurees ($userid)
{
===================================================================
RCS file: /var/lib/cvs/cacert/includes/mysql.php.sample,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- mysql.php.sample 2012/10/13 13:53:53 1.14
+++ mysql.php.sample 2013/04/24 13:13:06 1.15
@@ -64,7 +64,8 @@
fputs($smtp, "DATA\r\n");
$InputBuffer = fgets($smtp, 1024);
fputs($smtp, "X-Mailer: CAcert.org Website\r\n");
- fputs($smtp, "X-OriginatingIP:
".$_SERVER["REMOTE_ADDR"]."\r\n");
+ if (array_key_exists("REMOTE_ADDR", $_SERVER))
+ fputs($smtp, "X-OriginatingIP:
".$_SERVER["REMOTE_ADDR"]."\r\n");
fputs($smtp, "Sender: $errorsto\r\n");
fputs($smtp, "Errors-To: $errorsto\r\n");
if($replyto != "")
--- End Message ------ Begin Message ---
- From: "root" <root AT cvs.cacert.org>
- To: critical-admin AT cacert.org
- Subject: cvs.cacert.org checkin notification
- Date: Wed, 24 Apr 2013 15:13:08 +0200 (CEST)
uid=0(root) gid=0(root) groups=0(root)
4.php 1.9 1.10
Wed Apr 24 15:13:08 CEST 2013
Update of /var/lib/cvs/cacert/pages/wot
In directory webdb:/home/cacert/www/pages/wot
Modified Files:
4.php
Log Message:
Fix for https://bugs.cacert.org/view.php?id=1112
"Exchange the text on the TTP page according to the new TTP program"
===================================================================
RCS file: /var/lib/cvs/cacert/pages/wot/4.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- 4.php 2012/12/11 14:34:38 1.9
+++ 4.php 2013/04/24 13:13:08 1.10
@@ -14,7 +14,9 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
-*/ ?>
+*/
+require_once(dirname(__FILE__).'/../../includes/wot.inc.php');
+?>
<h3><?=_("Trusted Third Parties")?></h3>
@@ -32,4 +34,49 @@
<p><?=sprintf(_("If you are interested in the TTP programme, read the pages
%s for the basic way how the TTP programme works for you, and %s whether the
TTP programme affects the country where you are located."),"<a
href='//wiki.cacert.org/TTP/TTPuser'>https://wiki.cacert.org/TTP/TTPuser</a>","<a
href='//wiki.cacert.org/TTP/TTPAL'>https://wiki.cacert.org/TTP/TTPAL</a>")?>
</p>
-<p><?=sprintf(_("If you want to take part in the TTP programme, send an
email to %s with your name, the main email address of your CAcert account and
the country that you want to see the TTP. CAcert will then send you the
needed forms and guide you through the process."),"<a
href='mailto:support AT cacert.org'>support AT cacert.org</a>")?></p>
+<?
+// test for points <100
+if ($_SESSION['profile']['points']<100){
+ // test for TTP assurances
+ if
(get_number_of_ttpassurances(intval($_SESSION['profile']['id']))<2){?>
+ <p><?=_("If you want to ask for TTP assurances fill out the
missing data and send the request to
support AT cacert.org
to start the process. CAcert will then inform you about the next
steps.")?></p>
+ <form method="post" action="wot.php">
+ <table align="center" valign="middle" border="0"
cellspacing="0" cellpadding="0" class="wrapper">
+ <tr>
+ <td class="DataTD"><?=_("Country where you
want to visit the TTP")?></td>
+ <td class="DataTD"><select size="1"
name="country">
+ <option>Australia</option>
+ <option>Puerto Rico</option>
+ <option>USA</option>
+ </select></td>
+ </tr>
+ <tr>
+ <td class="DataTD"><?=_("I want to take part
in the TTP Topup programme")?></td>
+ <td class="DataTD"><input type="checkbox"
name="ttptopup" value="1"></td>
+ </tr>
+ <tr>
+ <td colspan="2" >
+ <input type="hidden" name="oldid"
value="<?=intval($id)?>">
+ <input type="submit" name="ttp"
value="<?=_("I need a TTP assurance")?>">
+ </td>
+ </tr>
+ </table>
+ </form>
+<? //"
+ } else {
+ /* As soon as the TPP TOPUP Programme is established this routine
should be used
+ <p><?=_("As you have already got 2 TTP assurances you can only take
part in the TTP TOPUP programme. If you want to ask for the TTP TOPUP
programme use the submit button to send the request to
support AT cacert.org
to start the process. CAcert will then inform you about the next
steps.")?></p>
+ <form method="post" action="wot.php">
+ <input type="hidden" name="oldid"
value="<?=intval($id)?>">
+ <input type="submit" name="ttptopup" value="<?=_("I
need a TTP TOPUP")?>">
+ </form>
+*/
+?>
+ <p><?=_("We are working to develop the TTP TOPUP process to be able
to fill the gap of the missing 30 assurance points to 100 assurance points.
Meanwhile you have to close this gap with face to face assurances from CAcert
Assurers. Think not only travelling to populated countries, but as well to
assurers visiting your country or area.")?></p>
+<?
+ }
+} else {
+?>
+ <p><?=_("You reached the maximum points that can be granted by the
TTP programme and therefore you cannot take part in the TTP programme any
more.")?></p>
+<?
+}
--- End Message ---Attachment: smime.p7s
Description: S/MIME-cryptografische ondertekening
--- End Message ---
Attachment:
smime.p7s
Description: S/MIME-cryptografische ondertekening
- Patch request: Bug #1112, Michael Tänzer, 04/16/2013
- Re: Patch request: Bug #1112, Wytze van der Raay, 04/24/2013
- Re: Patch request: Bug #1112, Wytze van der Raay, 04/24/2013
- Re: Patch request: Bug #1112, Benny Baumann, 04/24/2013
- Re: Patch request: Bug #1112, Wytze van der Raay, 04/28/2013
- Re: Patch request: Bug #1112, Benny Baumann, 04/24/2013
- Re: Patch request: Bug #1112, Wytze van der Raay, 04/24/2013
- Re: Patch request: Bug #1112, Wytze van der Raay, 04/24/2013
Archive powered by MHonArc 2.6.16.