summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2014-04-29 16:13:59 +0200
committerMichael Tänzer <neo@nhng.de>2014-04-29 16:13:59 +0200
commitbb11f3a0645a6b96767c9c318fa239a12c3351e5 (patch)
tree2dba41fa37855e6f1165c89d91c04c1bc18d6f3d /www
parent4f555bd41ae6340c21f199512090e1e47d08fa3a (diff)
parent1a119ab85f3bd5b352223ceef6ba8f29151130b2 (diff)
downloadcacert-devel-bb11f3a0645a6b96767c9c318fa239a12c3351e5.tar.gz
cacert-devel-bb11f3a0645a6b96767c9c318fa239a12c3351e5.tar.xz
cacert-devel-bb11f3a0645a6b96767c9c318fa239a12c3351e5.zip
Merge branch 'bug-1221' into bug-1138
Conflicts: includes/account.php includes/general.php includes/loggedin.php includes/notary.inc.php pages/account/43.php pages/account/55.php pages/wot/10.php www/index.php www/wot.php Signed-off-by: Michael Tänzer <neo@nhng.de>
Diffstat (limited to 'www')
-rw-r--r--www/api/ccsr.php6
-rw-r--r--www/api/cemails.php2
-rw-r--r--www/stats.php5
-rw-r--r--www/wot.php9
4 files changed, 11 insertions, 11 deletions
diff --git a/www/api/ccsr.php b/www/api/ccsr.php
index 7efdf8d..aa33baa 100644
--- a/www/api/ccsr.php
+++ b/www/api/ccsr.php
@@ -42,7 +42,7 @@ require_once '../../includes/lib/check_weak_key.php';
}
if(count($emails) <= 0)
die("404,Wasn't able to match any emails sent against your account");
- $query = "select sum(`points`) as `points` from `notary` where `to`='$memid' group by `to`";
+ $query = "select sum(`points`) as `points` from `notary` where `to`='$memid' and `notary`.`deleted`=0 group by `to`";
$row = mysql_fetch_assoc(mysql_query($query));
$points = $row['points'];
@@ -62,12 +62,12 @@ require_once '../../includes/lib/check_weak_key.php';
$codesign = 1;
$CSR = trim($_REQUEST['optionalCSR']);
-
+
if (($weakKey = checkWeakKeyCSR($CSR)) !== "")
{
die("403, $weakKey");
}
-
+
$incsr = tempnam("/tmp", "ccsrIn");
$checkedcsr = tempnam("/tmp", "ccsrOut");
$fp = fopen($incsr, "w");
diff --git a/www/api/cemails.php b/www/api/cemails.php
index 0d067ea..260ca4f 100644
--- a/www/api/cemails.php
+++ b/www/api/cemails.php
@@ -25,7 +25,7 @@
echo "200,Authentication Ok\n";
$user = mysql_fetch_assoc($res);
$memid = $user['id'];
- $query = "select sum(`points`) as `points` from `notary` where `to`='$memid' group by `to`";
+ $query = "select sum(`points`) as `points` from `notary` where `to`='$memid' and `notary`.`deleted`=0 group by `to`";
$row = mysql_fetch_assoc(mysql_query($query));
$points = $row['points'];
echo "CS=".intval($user['codesign'])."\n";
diff --git a/www/stats.php b/www/stats.php
index 1599e17..d4d892d 100644
--- a/www/stats.php
+++ b/www/stats.php
@@ -32,7 +32,7 @@
$stats['timestamp'] = $ar['timestamp'];
return $stats;
}
-
+
return null;
}
@@ -40,7 +40,7 @@
if ($stats === null) {
echo '<p>', _("Error while retrieving the statistics!"), '</p>';
showfooter();
- die();
+ die();
}
?>
<h1>CAcert.org <?=_("Statistics")?></h1>
@@ -157,4 +157,3 @@
</div>
<? showfooter(); ?>
-
diff --git a/www/wot.php b/www/wot.php
index fb229b9..dec4246 100644
--- a/www/wot.php
+++ b/www/wot.php
@@ -225,7 +225,7 @@ function send_reminder()
}
$query = "select * from `notary` where `from`='".$_SESSION['profile']['id']."' and
- `deleted`=0 and `to`='".$_SESSION['_config']['notarise']['id']."'";
+ `to`='".$_SESSION['_config']['notarise']['id']."' and `deleted` = 0";
$res = mysql_query($query);
if(mysql_num_rows($res) > 0)
{
@@ -332,7 +332,7 @@ $iecho= "c";
if($newpoints < 0)
$newpoints = $awarded = 0;
- $query = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['_config']['notarise']['id']."' group by `to`";
+ $query = "select sum(`points`) as `total` from `notary` where `to`='".$_SESSION['_config']['notarise']['id']."' and `deleted` = 0 group by `to`";
$res = mysql_query($query);
$drow = mysql_fetch_assoc($res);
@@ -352,7 +352,8 @@ $iecho= "c";
`to`='".$_SESSION['_config']['notarise']['id']."' AND
`awarded`='$awarded' AND
`location`='".mysql_escape_string(stripslashes($_POST['location']))."' AND
- `date`='".mysql_escape_string(stripslashes($_POST['date']))."'";
+ `date`='".mysql_escape_string(stripslashes($_POST['date']))."' AND
+ `deleted`=0";
$res = mysql_query($query);
if(mysql_num_rows($res) > 0)
{
@@ -509,7 +510,7 @@ $iecho= "c";
$userid = intval($_REQUEST['userid']);
$user = mysql_fetch_assoc(mysql_query("select * from `users` where `id`='$userid' and `listme`=1"));
$points = mysql_num_rows(mysql_query("select sum(`points`) as `total` from `notary`
- where `to`='".$user['id']."' group by `to` HAVING SUM(`points`) > 0"));
+ where `to`='".$user['id']."' and `deleted` = 0 group by `to` HAVING SUM(`points`) > 0"));
if($points > 0)
{
$my_translation = L10n::get_translation();