]> git.mxchange.org Git - mailer.git/commitdiff
Introduced translateTaskType()
authorRoland Häder <roland@mxchange.org>
Mon, 4 Jul 2011 00:39:21 +0000 (00:39 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 4 Jul 2011 00:39:21 +0000 (00:39 +0000)
14 files changed:
DOCS/TODOs.txt
inc/functions.php
inc/language/de.php
inc/language/holiday_de.php
inc/language/order_de.php
inc/language/payout_de.php
inc/language/rallye_de.php
inc/language/support_de.php
inc/modules/admin/overview-inc.php
inc/modules/admin/what-list_task.php
templates/de/html/admin/admin_list_task_ext_rows.tpl
templates/de/html/admin/admin_list_task_rows.tpl
templates/de/html/admin/admin_overview_list_ext_rows.tpl
templates/de/html/admin/admin_overview_list_rows.tpl

index 55b9d06a2e4ed7f90d00c7961cc6930f25840949..fe1ae14eb947762f051a7bc6b3dfc7abf5e55a88 100644 (file)
@@ -35,7 +35,7 @@
 ./inc/extensions/ext-network.php:38: * @TODO Yoo!Media: What is LayerAd compared to Layer click?            *
 ./inc/extensions/ext-network.php:93:           // @TODO network_type_handle is an internal name and needs documentation
 ./inc/extensions/ext-newsletter.php:218:               // @TODO Move these into configuration
-./inc/extensions/ext-order.php:356:            // @TODO This should be moved out to inc/daily/
+./inc/extensions/ext-order.php:354:            // @TODO This should be moved out to inc/daily/
 ./inc/extensions/ext-rallye.php:329:           // @TODO Move this code into a hook
 ./inc/extensions/ext-rallye.php:92:            // @TODO Fix config_rallye_prices to list_rallye_prices
 ./inc/extensions/ext-yoomedia.php:121:         // @TODO Can this be moved into a database table?
index 4b5a7854cb2599f803b96b4338143a1369765860..7e6e5f8adb8056580c5f65314a41f357a9aa2b69 100644 (file)
@@ -2373,6 +2373,24 @@ function convertBooleanToYesNo ($boolean) {
        return $converted;
 }
 
+// Translates task type to a human-readable version
+function translateTaskType ($taskType) {
+       // Construct message id
+       $messageId = 'ADMIN_TASK_TYPE_' . strtoupper($taskType) . '';
+
+       // Is the message id there?
+       if (isMessageIdValid($messageId)) {
+               // Then construct message
+               $message = '{--' . $messageId . '--}';
+       } else {
+               // Else it is an unknown task type
+               $message = '{%message,ADMIN_TASK_TYPE_UNKNOWN=' . $taskType . '%}';
+       } // END - if
+
+       // Return message
+       return $message;
+}
+
 //-----------------------------------------------------------------------------
 // Automatically re-created functions, all taken from user comments on www.php.net
 //-----------------------------------------------------------------------------
index d41405542d8b0b4c35d4c94156712e9f87f73a1b..1f0fb9c8ad7913849391b5552723db5353c2c63c 100644 (file)
@@ -1115,10 +1115,11 @@ addMessages(array(
        'ADMIN_LIST_MODE_NOREFS_ACCOUNTS' => "Alle Mitglieder-Accounts ohne Referals auflisten",
 
        // Admin task lines
-       'ADMIN_TASK_IS_MEMBER_SUPPORT' => "Support-Anfrage eines Mitgliedes",
-       'ADMIN_TASK_IS_EXTENSION' => "Erweiterung-Installation",
-       'ADMIN_TASK_IS_EXTENSION_UPDATE' => "Erweiterungsupdate",
-       'ADMIN_TASK_IS_EXTENSION_DEACTIVATION' => "Erweiterung-Deaktivierung",
+       'ADMIN_TASK_TYPE_MEMBER_SUPPORT' => "Support-Anfrage eines Mitgliedes",
+       'ADMIN_TASK_TYPE_EXTENSION' => "Erweiterung-Installation",
+       'ADMIN_TASK_TYPE_EXTENSION_UPDATE' => "Erweiterungsupdate",
+       'ADMIN_TASK_TYPE_EXTENSION_DEACTIVATION' => "Erweiterung-Deaktivierung",
+       'ADMIN_TASK_TYPE_UNKNOWN' => "Unbekannter Task-Typ <span class=\"data\">%s</span> detected.",
 
        // Filter sub-system
        'FILTER_FAILED_ALREADY_INIT' => "Filter-System ist bereits initialisiert.",
index 84eaab4383370d850494a0ddcb6fa63282a74636..461f3805d7de2fe07f29ffb8ef0304f8cbcf9245 100644 (file)
@@ -43,7 +43,7 @@ if (!defined('__SECURITY')) {
 // Language definitions
 addMessages(array(
        // Admin strings
-       'ADMIN_TASK_IS_HOLIDAY_REQUEST' => "Urlaubsanfrage",
+       'ADMIN_TASK_TYPE_HOLIDAY_REQUEST' => "Urlaubsanfrage",
        'ADMIN_HOLIDAY_NOTHING_FOUND' => "Niemand hat Urlaub beantragt.",
        'ADMIN_HOLIDAY_TSTART' => "Anfang",
        'ADMIN_HOLIDAY_TEND' => "Ende",
index e070c508d054612d86de2394a314df6aa7b41bba..f6f8db3cccf555f064ebeb0b43f52478465a6f0f 100644 (file)
@@ -88,7 +88,7 @@ addMessages(array(
        'ADMIN_CONFIG_REPAY_POINTS_SHRED' => "Nicht gutschreiben (verf&auml;llt dann)",
        'ADMIN_REPAY_ON_DELETE_MODE' => "Wenn Sie eine Mailbuchung l&ouml;schen, wie sollen die ausgegebenen {?POINTS?} gehandhabt werden?",
 
-       'ADMIN_TASK_IS_MEMBER_ORDER' => "Mailbuchung vom Mitglied",
+       'ADMIN_TASK_TYPE_MEMBER_ORDER' => "Mailbuchung vom Mitglied",
        'ADMIN_UNLOCK_EMAIL_LINK' => "Mailbuchung ansehen",
 ));
 
index c7d5e3e6211e96800bb29d4fa8be0c8a7ab041e4..dd95305f7bf2b41f046976e024df0785a1db7944 100644 (file)
@@ -74,7 +74,7 @@ addMessages(array(
        'ADMIN_PAYOUT_YOUR_RET_FAILED' => "Return-Code: Fehlgeschlagen",
        'ADMIN_PAYOUT_OPTIONAL_SETTINGS' => "Optionale Einstellungen",
        'ADMIN_PAYOUT_YOUR_PASS_TRANSFER' => "Passwortverschl&uuml;sslung zur &Uuml;bertragung",
-       'ADMIN_TASK_IS_PAYOUT_REQUEST' => "Auszahlungsanfrage",
+       'ADMIN_TASK_TYPE_PAYOUT_REQUEST' => "Auszahlungsanfrage",
        'ADMIN_PAYOUT_LIST_REQUESTS' => "Jetzt alle Auszahlungsanfragen auflisten.",
        'ADMIN_PAYOUT_TRANSFER_FAILED' => "Transfer nicht abgeschlossen:",
        'ADMIN_PAYOUT_ALLOW_URLS' => "URLs erlauben",
index 67c931700e48b5fb4237311bdbf30e210a49d759..b15bafd73b1f36776a24d4f71484b2fe7b06a45d 100644 (file)
@@ -131,8 +131,8 @@ addMessages(array(
        'RALLYE_REFERAL_POINTS' => "Verdienst durch Refs",
        'RALLYE_REGISTER_NOW' => "Jetzt kostenlos und unverbindlich anmelden.",
        'RALLYE_GET_REFERAL_LINK' => "Jetzt dran teilnehmen.",
-       'ADMIN_TASK_IS_RALLYE_EXPIRED' => "Rallye wurde beendet",
-       'ADMIN_TASK_IS_RALLYE_PURGED' => "Rallye wurde gel&ouml;scht",
+       'ADMIN_TASK_TYPE_RALLYE_EXPIRED' => "Rallye wurde beendet",
+       'ADMIN_TASK_TYPE_RALLYE_PURGED' => "Rallye wurde gel&ouml;scht",
        'RALLYE_LIST_USERS_TITLE' => "Alle teilnehmenden Mitglieder auflisten.",
        'RALLYE_REFERAL_POINTS_NOTE' => "Die {?POINTS?} in der Spalte <u>Verdienst durch Refs</u> geben den Verdienst in erster Ebene vor der Referal-Rallye an und wird sich bis Ende der Referal-Rallye nicht ver&auml;ndern.",
        'RALLYE_MIN_USERS' => "Gesamtzahl der Mitglieder, ab der Referal-Rallye automatisch endet.",
index c22eb5c50ed408afe2fd50b841625f0f4f8bb801..199b4cd65cfcb45f33d37a458e7baf5770e7d639 100644 (file)
@@ -48,7 +48,7 @@ addMessages(array(
        'MEMBER_SUPPORT_ORDER_SUBJECT' => "Ihr Anfrage an den Support: Mailbuchung",
        'MEMBER_SUPPORT_REFERAL_LINK_SUBJECT' => "Ihr Anfrage an den Support: Referal-Link",
        'MEMBER_SUPPORT_UNCONFIRMED_SUBJECT' => "Ihr Anfrage an den Support: Unbest&auml;tigte Mails",
-       'ADMIN_TASK_IS_MEMBER_SUPPORT' => "Mitglieder-Support",
+       'ADMIN_TASK_TYPE_MEMBER_SUPPORT' => "Mitglieder-Support",
        'ADMIN_UNKNOWN_SUPPORT_MODE' => "Unbekannter Support-Modus <span class=\"data\">%s</span> erkannt.",
        'ADMIN_TASK_SUPPORT_MODE' => "Support-Art",
 ));
index 11acac5e80c495c4f944535b2cb32a0c0ea1987b..b8ed4070ad49666e71b4a4f51790e25afd48cb33 100644 (file)
@@ -431,9 +431,6 @@ LIMIT 1",
                                        break;
                        } // END - switch
 
-                       // Get task type
-                       $content['task_type_msg'] = '{--ADMIN_TASK_IS_' . strtoupper($content['task_type']) . '--}';
-
                        if (isValidUserId($content['userid'])) {
                                // Member found otherwise it's a system task
                                $content['userid'] = generateUserProfileLink($content['userid']);
index 29e6a73c96993ebe8e99042b73a6583d8dde9872..16fce750b6c26ca6598f279c0ef5e9b3f88805ef 100644 (file)
@@ -145,9 +145,6 @@ ORDER BY
                        // Init infos
                        $content['infos'] = '';
 
-                       // Get admin task
-                       $content['task_type_msg'] = '{--ADMIN_TASK_IS_' . strtoupper($content['task_type']) . '--}';
-
                        // Generate infos
                        switch ($content['task_type']) {
                                case 'EXTENSION':
@@ -167,9 +164,6 @@ ORDER BY
 
                        // Prepare content
                        $content = merge_array($content, array(
-                               'assign_admin'  => $content['assigned_admin'],
-                               'userid'        => $content['userid'],
-                               'task_type_msg' => $content['task_type_msg'],
                                'task_created'  => generateDateTime($content['task_created'], 2)
                        ));
 
index 2743c813145fb52ad70c4dc3c35bcc450aa5c364..e3fbf2eb9b8959e602302ae968d1c2cd24fcf881 100644 (file)
@@ -15,7 +15,7 @@
                $content[userid]
        </td>
        <td class="{%template,ColorSwitch%} bottom right" align="center">
-               $content[task_type_msg]
+               {%pipe,translateTaskType=$content[task_type]%}
        </td>
        <td class="{%template,ColorSwitch%} bottom" align="center">
                $content[task_created]
index 8a46935ec682552a6ed95c7eeb34373510f29ab1..cf309a408e32e2cbbbc977d6bd43a51694987021 100644 (file)
@@ -15,7 +15,7 @@
                $content[userid]
        </td>
        <td class="{%template,ColorSwitch%} bottom right" align="center">
-               $content[task_type_msg]
+               {%pipe,translateTaskType=$content[task_type]%}
        </td>
        <td class="{%template,ColorSwitch%} bottom" align="center">
                $content[task_created]
index caa2805281e6ed49fd8bc8c08485f5eeb66dc834..545970eb09c0813849aad8a1d9f8e5ba58eabf6b 100644 (file)
@@ -15,7 +15,7 @@
                $content[userid]
        </td>
        <td class="{%template,ColorSwitch%} bottom right" align="center">
-               $content[task_type_msg]
+               {%pipe,translateTaskType=$content[task_type]%}
        </td>
        <td class="{%template,ColorSwitch%} bottom right" align="center">
                $content[task_created]
index 21697ba33b809b29face9821d104b58a613ff0e9..d429a364267ef784c3e2e59285223df826b31819 100644 (file)
@@ -15,7 +15,7 @@
                $content[userid]
        </td>
        <td class="{%template,ColorSwitch%} bottom right" align="center">
-               $content[task_type_msg]
+               {%pipe,translateTaskType=$content[task_type]%}
        </td>
        <td class="{%template,ColorSwitch%} bottom right" align="center">
                $content[task_created]