Next wave of lesser getMessage() usage and more EL
[mailer.git] / inc / modules / admin / overview-inc.php
index 360550d5b99886530e149de939748d34365379d1..e5d3f0cdcb582432029dad0c73e11306daa4b2ab 100644 (file)
@@ -85,10 +85,10 @@ function outputStandardOverview (&$result_tasks) {
 
                                // Get extension version
                                $ext_ver = getExtensionVersion($ext_name);
-                               //* DEBUG: */ outputHtml($ext_name."=".$ext_ver."<br />");
+                               //* DEBUG: */ debugOutput($ext_name.'='.$ext_ver);
 
                                // Update extension if extension is installed and outdated
-                               //* DEBUG: */ outputHtml('ext=' . $ext_name . ',ver=' . getThisExtensionVersion() . '/' . getExtensionVersion($ext_name)."<br />");
+                               //* DEBUG: */ debugOutput('ext=' . $ext_name . ',ver=' . getThisExtensionVersion() . '/' . getExtensionVersion($ext_name));
                                if (getThisExtensionVersion() > $ext_ver) {
                                        // Update the extension
                                        updateExtension($ext_name, $ext_ver);
@@ -168,7 +168,7 @@ LIMIT 1",
                                if ($taskData['task_type'] == 'SUPPORT_MEMBER') {
                                        $mode = substr($taskData['text'], 0, strpos($taskData['text'], ':'));
                                        $taskData['text'] = substr($taskData['text'], strpos($taskData['text'], ':') + 1);
-                                       $add = "<li>{--ADMIN_TASK_SUPPORT_MODE--}: <strong>" . $mode . "</strong></li>";
+                                       $add = '<li>{--ADMIN_TASK_SUPPORT_MODE--}: <strong>' . $mode . '</strong></li>';
                                } // END - if
 
                                // Is a userid assign?
@@ -179,7 +179,7 @@ LIMIT 1",
                                                $content = getUserDataArray();
 
                                                // Generate HTML list entry
-                                               $add = "<li>{--ADMIN_MEMBER_UID--}: <strong>".generateUserProfileLink($taskData['userid'], 'user_data')." (<a href=\"".generateEmailLink($content['email'], 'user_data')."\">".translateGender($content['gender']) . ' ' . $content['surname'] . ' ' . $content['family']."</a>)</strong></li>";
+                                               $add = '<li>{--ADMIN_MEMBER_UID--}: <strong>' . generateUserProfileLink($taskData['userid'], 'user_data') . ' (<a href="' . generateEmailLink($content['email'], 'user_data') . '">' . translateGender($content['gender']) . ' ' . $content['surname'] . ' ' . $content['family'] . '</a>)</strong></li>';
                                        } else {
                                                // Invalid userid, so log and zero it
                                                logDebugMessage(__FUNCTION__, __LINE__, 'Invalid userid=' . $taskData['userid'] . ' -> not found!');
@@ -195,7 +195,7 @@ LIMIT 1",
 
                                // Initialize variables (no title for SQL commands by default)
                                $ext_name = ''; $ext_ver = '';
-                               $title = getMessage('TASK_NO_TITLE');
+                               $title = '{--TASK_NO_TITLE--}';
 
                                // Shall I list SQL commands assigned to an extension installation or update task?
                                if ((getConfig('verbose_sql') == 'Y')) {
@@ -220,7 +220,7 @@ LIMIT 1",
                                                $taskData['text'] .= getExtensionNotes();
 
                                                // Set title
-                                               $title = getMessage('ADMIN_SQLS_EXECUTED_ON_REGISTER');
+                                               $title = '{--ADMIN_SQLS_EXECUTED_ON_REGISTER--}';
                                        } elseif ($taskData['task_type'] == 'EXTENSION_UPDATE') {
                                                // Prepare extension name and version
                                                $ext_name = substr($ext_name, 7);
@@ -239,7 +239,7 @@ LIMIT 1",
                                                $taskData['text'] .= getExtensionNotes();
 
                                                // Set title
-                                               $title = getMessage('ADMIN_SQLS_EXECUTED_ON_UPDATE');
+                                               $title = '{--ADMIN_SQLS_EXECUTED_ON_UPDATE--}';
                                        } else {
                                                // Remove extension's name
                                                $ext_name = '';
@@ -261,7 +261,7 @@ LIMIT 1",
                                        $taskData['text'] .= getExtensionNotes();
                                } else {
                                        // This should not normally happen!
-                                       debug_report_bug('ext_name(' . $ext_name . ') or ext_ver(' . $ext_ver . ') is empty! sql_patches=' . getExtensionVersion('sql_patches') . '/verbose_sql=' . getConfig('verbose_sql'));
+                                       debug_report_bug(__FILE__, __LINE__, 'ext_name(' . $ext_name . ') or ext_ver(' . $ext_ver . ') is empty! sql_patches=' . getExtensionVersion('sql_patches') . '/verbose_sql=' . getConfig('verbose_sql'));
                                }
 
                                // Prepare array for the template
@@ -421,7 +421,7 @@ LIMIT 1",
                                }
                        } else {
                                // Unknown action
-                               debug_report_bug(sprintf("Unknown task action performed. data=<pre>%s</pre>", print_r($postData, true)));
+                               debug_report_bug(__FILE__, __LINE__, sprintf("Unknown task action performed. data=<pre>%s</pre>", print_r($postData, true)));
                        }
 
                        // Update query
@@ -448,9 +448,9 @@ LIMIT 1",
                        }
 
                        // Get task type
-                       $content['task_type_msg'] = getMessage('ADMIN_TASK_IS_'.strtoupper($content['task_type']).'');
+                       $content['task_type_msg'] = '{--ADMIN_TASK_IS_' . strtoupper($content['task_type']) . '--}';
 
-                       if ($content['userid'] > 0) {
+                       if (isValidUserId($content['userid'])) {
                                // Member found otherwise it's a system task
                                $content['userid'] = generateUserProfileLink($content['userid']);
                        } else {