Next wave of lesser getMessage() usage and more EL
[mailer.git] / inc / modules / admin / what-add_points.php
index fe7baa722f4d9aa524005eb7766b5242867ff2c8..5c64717b9ed5feaebdc6da2eb5730a78408274c9 100644 (file)
@@ -56,7 +56,10 @@ if (getRequestParameter('userid') == 'all') {
                        __FILE__, __LINE__);
 
                // Process all entries
-               while ($content = merge_array($content, SQL_FETCHARRAY($result_main))) {
+               while ($row = SQL_FETCHARRAY($result_main)) {
+                       // Merge both arrays
+                       $content = merge_array($content, $row);
+
                        // Remove depth to prevent booking errors. This is a bad coding
                        // practice, thats also why we need to write this project from
                        // scratch...
@@ -78,7 +81,7 @@ if (getRequestParameter('userid') == 'all') {
                SQL_FREERESULT($result_main);
 
                // Output message
-               loadTemplate('admin_settings_saved', false, getMessage('ADMIN_ALL_POINTS_ADDED'));
+               loadTemplate('admin_settings_saved', false, '{--ADMIN_ALL_POINTS_ADDED--}');
        } else {
                // Display form add points
                loadTemplate('admin_add_points_all');
@@ -103,7 +106,7 @@ if (getRequestParameter('userid') == 'all') {
                        $message = loadEmailTemplate('add-points', $content, bigintval(getRequestParameter('userid')));
 
                        sendEmail(bigintval(getRequestParameter('userid')), getMessage('ADMIN_ADD_SUBJ'), $message);
-                       loadTemplate('admin_settings_saved', false, getMessage('ADMIN_POINTS_ADDED'));
+                       loadTemplate('admin_settings_saved', false, '{--ADMIN_POINTS_ADDED--}');
                } else {
                        // Prepare content
                        $content['user']   = '<a href="' . generateEmailLink($content['email'], 'user_data') . '">' . $content['surname'] . ' ' . $content['family'] . '</a>';
@@ -114,7 +117,7 @@ if (getRequestParameter('userid') == 'all') {
                }
        } else {
                // User not found!
-               loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestParameter('userid')) . '</div>');
+               loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', bigintval(getRequestParameter('userid'))) . '</div>');
        }
 } else {
        // Output selection form with all confirmed user accounts listed