New naming convention applied to many functions, see #118 for details
[mailer.git] / inc / modules / admin / what-sub_points.php
index cab446b0723e528ef4290521878df86ba0d3cfb5..57123d9487eaae15debe4d27b1ae65af8ba10784 100644 (file)
@@ -55,7 +55,7 @@ if (REQUEST_GET('uid') == "all") {
 
        // Is the form sent?
        if ((IS_FORM_SENT()) && (REQUEST_POST('points') > 0)) {
-               $result_main = SQL_QUERY("SELECT userid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' ORDER BY userid",
+               $result_main = SQL_QUERY("SELECT userid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE `status`='CONFIRMED' ORDER BY `userid` ASC",
                        __FILE__, __LINE__);
                while ($content = SQL_FETCHARRAY($result_main)) {
                        // Ok, add points to used points and send an email to him...
@@ -67,7 +67,7 @@ if (REQUEST_GET('uid') == "all") {
 
                        // Load message and send it away
                        $msg = LOAD_EMAIL_TEMPLATE("sub-points", $content, bigintval($content['userid']));
-                       SEND_EMAIL($content['email'], getMessage('ADMIN_SUB_SUBJ'), $msg);
+                       sendEmail($content['email'], getMessage('ADMIN_SUB_SUBJ'), $msg);
                } // END - while
 
                // Free memory
@@ -97,13 +97,13 @@ if (REQUEST_GET('uid') == "all") {
 
                        // Load email and send it away
                        $msg = LOAD_EMAIL_TEMPLATE("sub-points", $content, bigintval(REQUEST_GET('uid')));
-                       SEND_EMAIL($content['email'], getMessage('ADMIN_SUB_SUBJ'), $msg);
+                       sendEmail($content['email'], getMessage('ADMIN_SUB_SUBJ'), $msg);
 
                        // Output message
                        LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_POINTS_SUBTRACTED'));
                } else {
                        // @TODO Rewrite these constants
-                       define('__USER_VALUE', "<a href=\"".CREATE_EMAIL_LINK($content['email'], "user_data")."\">".$content['surname']." ".$content['family']."</a>");
+                       define('__USER_VALUE', "<a href=\"".generateMemberEmailLink($content['email'], "user_data")."\">".$content['surname']." ".$content['family']."</a>");
                        define('__UID', bigintval(REQUEST_GET('uid')));
 
                        // Load form
@@ -118,7 +118,7 @@ if (REQUEST_GET('uid') == "all") {
        SQL_FREERESULT($result);
 } else {
        // Output selection form with all confirmed user accounts listed
-       ADD_MEMBER_SELECTION_BOX("0", true);
+       ADD_MEMBER_SELECTION_BOX('0', true);
 }
 
 //