summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorINOPIAE <inopiae@cacert.org>2013-07-14 10:30:59 +0200
committerINOPIAE <inopiae@cacert.org>2013-07-14 10:30:59 +0200
commit4c592d37ecda8e3f840b9c383af3a84113ed2bf7 (patch)
tree72f9cff0afae28d38ce10d05d132c99a93828f95
parent956ade74a777b49a5acf68aee9b893224f7ccbaf (diff)
downloadcacert-devel-4c592d37ecda8e3f840b9c383af3a84113ed2bf7.tar.gz
cacert-devel-4c592d37ecda8e3f840b9c383af3a84113ed2bf7.tar.xz
cacert-devel-4c592d37ecda8e3f840b9c383af3a84113ed2bf7.zip
bug 1010: fixed sql-statement for org query and the filter for status
-rw-r--r--pages/account/18.php4
-rw-r--r--pages/account/22.php4
2 files changed, 4 insertions, 4 deletions
diff --git a/pages/account/18.php b/pages/account/18.php
index 0854bb8..7d352ba 100644
--- a/pages/account/18.php
+++ b/pages/account/18.php
@@ -35,7 +35,7 @@ $status = array_key_exists('status',$_SESSION['_config']) ? intval($_SESSION['_c
<?=sprintf("<option value='%d' %s>%s</option>",0, 0 == $orgfilterid? " selected" : "" ,_("All")) ?>
<? $query = "select `orginfo`.`O`, `orginfo`.`id`
from `org`, `orginfo`
- where `org`.`memid`='".intval($_SESSION['profile']['id'])."' `orginfo`.`id` = `org`.`orgid`
+ where `org`.`memid`='".intval($_SESSION['profile']['id'])."' and `orginfo`.`id` = `org`.`orgid`
ORDER BY `oemail`.`modified` desc";
$reso = mysql_query($query);
if(mysql_num_rows($reso) >= 1){
@@ -88,7 +88,7 @@ $status = array_key_exists('status',$_SESSION['_config']) ? intval($_SESSION['_c
$query .= "AND `org`.`orgid`=$orgfilterid ";
}
- if(1==$status)
+ if(0==$status)
{
$query .= "AND `oemail`.`revoked`=0 AND `oemail`.`renewed`=0 ";
$query .= "HAVING `timeleft` > 0 AND `revoked`=0 ";
diff --git a/pages/account/22.php b/pages/account/22.php
index 2746055..30aa542 100644
--- a/pages/account/22.php
+++ b/pages/account/22.php
@@ -34,7 +34,7 @@ $status = array_key_exists('dstatus',$_SESSION['_config']) ? intval($_SESSION['_
<?=sprintf("<option value='%d' %s>%s</option>",0, 0 == $orgfilterid? " selected" : "" ,_("All")) ?>
<? $query = "select `orginfo`.`O`, `orginfo`.`id`
from `org`, `orginfo`
- where `org`.`memid`='".intval($_SESSION['profile']['id'])."' `orginfo`.`id` = `org`.`orgid`
+ where `org`.`memid`='".intval($_SESSION['profile']['id'])."' and `orginfo`.`id` = `org`.`orgid`
ORDER BY `oemail`.`modified` desc";
$reso = mysql_query($query);
if(mysql_num_rows($reso) >= 1){
@@ -89,7 +89,7 @@ $status = array_key_exists('dstatus',$_SESSION['_config']) ? intval($_SESSION['_
$query .= "AND `org`.`orgid`=$dorgfilterid ";
}
- if(1==$dstatus)
+ if(0==$dstatus)
{
$query .= "AND `revoked`=0 AND `renewed`=0 ";
$query .= "HAVING `timeleft` > 0 ";