summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2014-04-07 01:22:06 +0200
committerMichael Tänzer <neo@nhng.de>2014-04-07 01:22:06 +0200
commit8654cbfb0e6eed0dda52379d9bfd971c3e254b74 (patch)
tree8e40e35199470facaaafceeb966b89b44fdea929
parentecb426405c54a71511c2c4949e22fb030d8cec3f (diff)
downloadcacert-devel-8654cbfb0e6eed0dda52379d9bfd971c3e254b74.tar.gz
cacert-devel-8654cbfb0e6eed0dda52379d9bfd971c3e254b74.tar.xz
cacert-devel-8654cbfb0e6eed0dda52379d9bfd971c3e254b74.zip
bug 1138: rename interface to better describe what these functions do
Signed-off-by: Michael Tänzer <neo@nhng.de>
-rw-r--r--includes/notary.inc.php8
-rw-r--r--pages/account/43.php2
-rw-r--r--pages/account/59.php4
3 files changed, 7 insertions, 7 deletions
diff --git a/includes/notary.inc.php b/includes/notary.inc.php
index 0be8303..1d8b5f0 100644
--- a/includes/notary.inc.php
+++ b/includes/notary.inc.php
@@ -1312,15 +1312,15 @@ function get_alerts($userid){
* @param int $deleted - states if deleted data should be visible, default = 0 - not visible
* @return resource - a mysql result set
*/
-function get_email_address($userid, $primary,$deleted=0){
+function get_email_addresses($userid, $exclude, $deleted=0){
//should be entered in account/2.php
$userid = intval($userid);
$filter='';
if (0==$deleted) {
$filter .= ' and `deleted`=0';
}
- if ($primary) {
- $filter= $filter." and `email`!='".mysql_real_escape_string($primary)."'";
+ if ($exclude) {
+ $filter .= " and `email`!='".mysql_real_escape_string($exclude)."'";
}
$query = "select * from `email` where `memid`='".$userid."' and `hash`='' ".$filter." order by `created`";
return mysql_query($query);
@@ -1348,7 +1348,7 @@ function get_domains($userid, $deleted=0){
* @param int $userid
* @return resource - a mysql result set
*/
-function get_training_result($userid){
+function get_training_results($userid){
//should be entered in account/55.php
$userid = intval($userid);
$query = "SELECT `CP`.`pass_date`, `CT`.`type_text`, `CV`.`test_text` ".
diff --git a/pages/account/43.php b/pages/account/43.php
index b4f2465..f5d2098 100644
--- a/pages/account/43.php
+++ b/pages/account/43.php
@@ -403,7 +403,7 @@ if(intval($_REQUEST['userid']) > 0) {
<br/>
<?
//list secondary email addresses
- $dres = get_email_address(intval($row['id']),mysql_real_escape_string($row['email']));
+ $dres = get_email_addresses(intval($row['id']),mysql_real_escape_string($row['email']));
if(mysql_num_rows($dres) > 0) {
?>
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
diff --git a/pages/account/59.php b/pages/account/59.php
index e9643d0..3c8d364 100644
--- a/pages/account/59.php
+++ b/pages/account/59.php
@@ -130,7 +130,7 @@ if ( $support == 1) {
</table>
<br/>
<?
-$dres = get_email_address($userid,'',1);
+$dres = get_email_addresses($userid,'',1);
if(mysql_num_rows($dres) > 0) {
?>
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
@@ -166,7 +166,7 @@ if(mysql_num_rows($dres) > 0) {
<br/>
<?
-$dres = get_training_result($userid);
+$dres = get_training_results($userid);
?>
<table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
<tr>