X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fmodules%2Fmember%2Fwhat-transfer.php;h=10cc4218b662b24025c93d14ddbd17c0a5629454;hb=c3b4eaf29946349ff058691db2dcb615a5379bb2;hp=3c6d3e1c1bebec10f1d10f32dd3a02fdafef47dc;hpb=e59807bfe52d4c3d43499eebcd5d561ac0fdd2e8;p=mailer.git
diff --git a/inc/modules/member/what-transfer.php b/inc/modules/member/what-transfer.php
index 3c6d3e1c1b..10cc4218b6 100644
--- a/inc/modules/member/what-transfer.php
+++ b/inc/modules/member/what-transfer.php
@@ -16,7 +16,7 @@
* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009, 2010 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -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'));
@@ -363,7 +363,7 @@ switch ($mode) {
`time_trans` VARCHAR(10) NOT NULL DEFAULT 0,
`trans_type` ENUM('IN','OUT') NOT NULL DEFAULT 'IN',
KEY (`party_userid`)
-) TYPE=HEAP", array(getMemberId()), __FILE__, __LINE__);
+) TYPE = HEAP COMMENT = 'Temporary transfer table'", array(getMemberId()), __FILE__, __LINE__);
// Let's begin with the incoming list
$result = SQL_QUERY_ESC("SELECT `trans_id`, `from_userid`, `points`, `reason`, `time_trans` FROM `{?_MYSQL_PREFIX?}_user_transfers_in` WHERE `userid`=%s ORDER BY `id` ASC LIMIT {?transfer_max?}",
@@ -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'] = '' . $total . '';
+ $totalIn = countSumTotalData(getMemberId(), 'user_transfers_in', 'id', 'userid', true);
+ $content['in_link'] = $totalIn;
+ if ($totalIn > 0) {
+ $content['in_link'] = '' . $totalIn . '';
} // 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'] = '' . $dmy . '';
+ $content['out_link'] = $totalOut;
+ if ($totalOut > 0) {
+ $content['out_link'] = '' . $totalOut . '';
} // END - if
+ // Add all to total amount
+ $total = $totalIn + $totalOut;
+
// Total transactions
$content['all_link'] = $total;
if ($total > 0) {
- $content['all_link'] = '' . $total . '';
+ $content['all_link'] = '{%pipe,translateComma=' . $total . '%}';
} // 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__);