]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-transfer.php
Renamed function so it might be more understandable
[mailer.git] / inc / modules / member / what-transfer.php
index 3c6d3e1c1bebec10f1d10f32dd3a02fdafef47dc..cf59a6ec085b1d732f7878ac92bb44136dfd5e51 100644 (file)
@@ -43,7 +43,7 @@ if (!defined('__SECURITY')) {
 }
 
 // Add description as navigation point
-addMenuDescription('member', __FILE__);
+addYouAreHereLink('member', __FILE__);
 
 if ((!isExtensionActive('transfer')) && (!isAdmin())) {
        loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('transfer'));
@@ -448,27 +448,27 @@ KEY (`party_userid`)
 
        default: // Overview page
                // Check incoming transfers
-               $total = countSumTotalData(getMemberId(), 'user_transfers_in', 'id', 'userid', true);
-               $content['in_link'] = $total;
-               if ($total > 0) {
-                       $content['in_link'] = '<a href="{%url=modules.php?module=login&amp;what=transfer&amp;mode=list_in%}">' . $total . '</a>';
+               $totalIn = countSumTotalData(getMemberId(), 'user_transfers_in', 'id', 'userid', true);
+               $content['in_link'] = $totalIn;
+               if ($totalIn > 0) {
+                       $content['in_link'] = '<a href="{%url=modules.php?module=login&amp;what=transfer&amp;mode=list_in%}">' . $totalIn . '</a>';
                } // END - if
 
                // Check outgoing transfers
-               $dmy = countSumTotalData(getMemberId(), 'user_transfers_out', 'id', 'userid', true);
-
-               // Add to total amount
-               $total += $dmy;
+               $totalOut = countSumTotalData(getMemberId(), 'user_transfers_out', 'id', 'userid', true);
 
-               $content['out_link'] = $dmy;
-               if ($dmy > 0) {
-                       $content['out_link'] = '<a href="{%url=modules.php?module=login&amp;what=transfer&amp;mode=list_out%}">' . $dmy . '</a>';
+               $content['out_link'] = $totalOut;
+               if ($totalOut > 0) {
+                       $content['out_link'] = '<a href="{%url=modules.php?module=login&amp;what=transfer&amp;mode=list_out%}">' . $totalOut . '</a>';
                } // END - if
 
+               // Add all to total amount
+               $total = $totalIn + $totalOut;
+
                // Total transactions
                $content['all_link'] = $total;
                if ($total > 0) {
-                       $content['all_link'] = '<a href="{%url=modules.php?module=login&amp;what=transfer&amp;mode=list_all%}">' . $total . '</a>';
+                       $content['all_link'] = '<a href="{%url=modules.php?module=login&amp;what=transfer&amp;mode=list_all%}">{%pipe,translateComma=' . $total . '%}</a>';
                } // END - if
 
                if (isFormSent()) {
@@ -505,12 +505,12 @@ KEY (`party_userid`)
 FROM
        `{?_MYSQL_PREFIX?}_user_transfers_out`
 WHERE
-       `time_trans` > (UNIX_TIMESTAMP() - %s) AND `userid`=%s
+       `time_trans` > (UNIX_TIMESTAMP() - {?transfer_timeout?}) AND
+       `userid`=%s
 ORDER BY
        `time_trans` DESC
 LIMIT 1",
                        array(
-                               getConfig('transfer_timeout'),
                                getMemberId()
                        ), __FILE__, __LINE__);