bug 1138: rename interface to better describe what these functions do
authorMichael Tänzer <neo@nhng.de>
Sun, 6 Apr 2014 23:22:06 +0000 (01:22 +0200)
committerMichael Tänzer <neo@nhng.de>
Sun, 6 Apr 2014 23:22:06 +0000 (01:22 +0200)
Signed-off-by: Michael Tänzer <neo@nhng.de>
includes/notary.inc.php
pages/account/43.php
pages/account/59.php

index 0be8303..1d8b5f0 100644 (file)
@@ -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` ".
index b4f2465..f5d2098 100644 (file)
@@ -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">
index e9643d0..3c8d364 100644 (file)
@@ -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>