]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-unlock_sponsor.php
Deprecated variables for templates removed, mor EL-rewrites, getMessage() rewritten:
[mailer.git] / inc / modules / admin / what-unlock_sponsor.php
index d25521cfe985c42610d529db90ff3c53bb0974ee..e8676e512ac9274e2e097c1e0105d5afc06f7ad8 100644 (file)
@@ -135,7 +135,7 @@ LIMIT 1",
                        array($content['id']), __FILE__, __LINE__);
 
                        // Update, if applyable, referal count and points
-                       if (($content['refid'] > 0) && ($content['refid'] != $content['id'])) {
+                       if ((isValidUserId($content['refid'])) && ($content['refid'] != $content['id'])) {
                                // Update referal account
                                SQL_QUERY_ESC("UPDATE
        `{?_MYSQL_PREFIX?}_sponsor_data`
@@ -182,7 +182,7 @@ LIMIT 1",
                } // END - foreach
        } else {
                // Nothing selected
-               loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SPONSOR_NONE_SELECTED_UNLOCK'));
+               loadTemplate('admin_settings_saved', false, '{--ADMIN_SPONSOR_NONE_SELECTED_UNLOCK--}');
        }
 } // END - if
 
@@ -201,16 +201,15 @@ if (SQL_NUMROWS($result) > 0) {
        $OUT = ''; $SW = 2;
        while ($content = SQL_FETCHARRAY($result)) {
                // Transfer data to array
-               // @TODO Rewritings: remote->remote_addr, created->sponsor_created in template
                $content = array(
-                       'sw'      => $SW,
-                       'id'      => $content['id'],
-                       'gender'   => translateGender($content['gender']),
-                       'surname' => $content['surname'],
-                       'family'  => $content['family'],
-                       'email'   => generateEmailLink($content['email'], 'sponsor_data'),
-                       'remote'  => $content['remote_addr'],
-                       'created' => generateDateTime($content['sponsor_created'], 2),
+                       'sw'              => $SW,
+                       'id'              => $content['id'],
+                       'gender'          => $content['gender'],
+                       'surname'         => $content['surname'],
+                       'family'          => $content['family'],
+                       'email'           => generateEmailLink($content['email'], 'sponsor_data'),
+                       'remote_addr'     => $content['remote_addr'],
+                       'sponsor_created' => generateDateTime($content['sponsor_created'], 2),
                );
 
                // Load row template and switch colors
@@ -222,7 +221,7 @@ if (SQL_NUMROWS($result) > 0) {
        loadTemplate('admin_unlock_sponsor', false, $OUT);
 } else {
        // No pending accounts found
-       loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SPONSOR_NONE_PENDING'));
+       loadTemplate('admin_settings_saved', false, '{--ADMIN_SPONSOR_NONE_PENDING--}');
 }
 
 // Free memory