projects
/
mailer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1b0f774
)
Fix/rewrites for if 'value' is '0' (not empty)
author
Roland Häder
<roland@mxchange.org>
Mon, 27 Sep 2010 03:33:07 +0000
(
03:33
+0000)
committer
Roland Häder
<roland@mxchange.org>
Mon, 27 Sep 2010 03:33:07 +0000
(
03:33
+0000)
inc/expression-functions.php
patch
|
blob
|
history
inc/filters.php
patch
|
blob
|
history
inc/language-functions.php
patch
|
blob
|
history
inc/language/de.php
patch
|
blob
|
history
inc/modules/member/what-bonus.php
patch
|
blob
|
history
templates/de/html/member/member_ref_list_level.tpl
patch
|
blob
|
history
templates/de/html/member/member_refback_list_level.tpl
patch
|
blob
|
history
diff --git
a/inc/expression-functions.php
b/inc/expression-functions.php
index c923b069b9c381d994253f820ce72471fe772eee..dd533a27a7cbcbc53ec6874c9eb99b024ae8c3d9 100644
(file)
--- a/
inc/expression-functions.php
+++ b/
inc/expression-functions.php
@@
-188,7
+188,8
@@
function doExpressionPipe ($data) {
if (!empty($data['callback'])) {
//if ($data['callback'] == 'getMemberId') die('<pre>'.encodeEntities(print_r($data, true)).'</pre>');
// If the value is empty, we don't add it
if (!empty($data['callback'])) {
//if ($data['callback'] == 'getMemberId') die('<pre>'.encodeEntities(print_r($data, true)).'</pre>');
// If the value is empty, we don't add it
- if (empty($data['value'])) {
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'value[' . gettype($data['value']) . ']=' . $data['value']);
+ if ((empty($data['value'])) && ($data['value'] != '0')) {
// No value is set
$replacer = '{DQUOTE} . ' . $data['extra_func2'] . '(' . $data['extra_func'] . '(' . $data['callback'] . '())) . {DQUOTE}';
} else {
// No value is set
$replacer = '{DQUOTE} . ' . $data['extra_func2'] . '(' . $data['extra_func'] . '(' . $data['callback'] . '())) . {DQUOTE}';
} else {
diff --git
a/inc/filters.php
b/inc/filters.php
index aece47961aae64b77d8563e3f4fe531bb8f7a88a..d05ec3d5e1999ef350b71dff38c53adbfc6ec4c0 100644
(file)
--- a/
inc/filters.php
+++ b/
inc/filters.php
@@
-469,7
+469,7
@@
function FILTER_COMPILE_EXPRESSION_CODE ($code) {
$callback = '';
$extraFunction = '';
$extraFunction2 = '';
$callback = '';
$extraFunction = '';
$extraFunction2 = '';
- $value =
''
;
+ $value =
null
;
// Extract command and call-back
$cmdArray = explode(',', $cmd);
// Extract command and call-back
$cmdArray = explode(',', $cmd);
diff --git
a/inc/language-functions.php
b/inc/language-functions.php
index 58a308f09b656dd20f9fa5c8dc7859cb993954f7..ce44f5849d69f3af7bc454936d8ec38eb4567ab9 100644
(file)
--- a/
inc/language-functions.php
+++ b/
inc/language-functions.php
@@
-61,7
+61,11
@@
function getMessage ($messageId) {
// Getter for message string as a mask
function getMaskedMessage ($messageId, $data) {
// Getter for message string as a mask
function getMaskedMessage ($messageId, $data) {
- return sprintf(getMessage($messageId), $data);
+ // Construct message
+ $message = sprintf(getMessage($messageId), $data);
+
+ // Return it
+ return $message;
}
// Init messages
}
// Init messages
@@
-71,17
+75,22
@@
function initMessages () {
// Add messages
function addMessages ($messages) {
// Add messages
function addMessages ($messages) {
+ // Cache current language
+ $currentLanguage = getCurrentLanguage();
+
// Merge both
// Merge both
- $GLOBALS['messages'][
getCurrentLanguage()] = merge_array($GLOBALS['messages'][getCurrentLanguage()
], $messages);
+ $GLOBALS['messages'][
$currentLanguage] = merge_array($GLOBALS['messages'][$currentLanguage
], $messages);
// Don't count them if we don't want it
// Don't count them if we don't want it
- if (isset($GLOBALS['count'])) return;
+ if (isset($GLOBALS['count'])) {
+ return;
+ } // END - if
// And count them
// And count them
- if (isset($GLOBALS['msg_count'][
getCurrentLanguage()
])) {
- $GLOBALS['msg_count'][
getCurrentLanguage()
] += count($messages);
+ if (isset($GLOBALS['msg_count'][
$currentLanguage
])) {
+ $GLOBALS['msg_count'][
$currentLanguage
] += count($messages);
} else {
} else {
- $GLOBALS['msg_count'][
getCurrentLanguage()
] = count($messages);
+ $GLOBALS['msg_count'][
$currentLanguage
] = count($messages);
}
}
}
}
diff --git
a/inc/language/de.php
b/inc/language/de.php
index da72a748240608d8e9c8e93fc4d27b2dcc2ad026..6c32c022721ec990e17c9ac05f36ef22c5bc6511 100644
(file)
--- a/
inc/language/de.php
+++ b/
inc/language/de.php
@@
-1105,7
+1105,7
@@
addMessages(array(
'MEMBER_REFLIST_LIST_TITLE_1' => "Ihre Referals in Ebene <u>",
'MEMBER_REFLIST_LIST_TITLE_2' => "</u> (<u>",
'MEMBER_REFLIST_LIST_TITLE_3' => "%</u>)",
'MEMBER_REFLIST_LIST_TITLE_1' => "Ihre Referals in Ebene <u>",
'MEMBER_REFLIST_LIST_TITLE_2' => "</u> (<u>",
'MEMBER_REFLIST_LIST_TITLE_3' => "%</u>)",
- 'MEMBER_REFLIST_COUNTER' => "In dieser Ebene haben Sie <span class=\"data\">
%s
</span> Mitglieder geworben.",
+ 'MEMBER_REFLIST_COUNTER' => "In dieser Ebene haben Sie <span class=\"data\">
{%%pipe,translateComma=%s%%}
</span> Mitglieder geworben.",
'MEMBER_REFLIST_TITLE' => "Referal-Übersicht",
'MEMBER_REFLIST_POINTS' => "Verdienst des Mitgliedes",
'MEMBER_REFLIST_ACTIVITY' => "Mitglied aktiv?",
'MEMBER_REFLIST_TITLE' => "Referal-Übersicht",
'MEMBER_REFLIST_POINTS' => "Verdienst des Mitgliedes",
'MEMBER_REFLIST_ACTIVITY' => "Mitglied aktiv?",
diff --git
a/inc/modules/member/what-bonus.php
b/inc/modules/member/what-bonus.php
index f14026eb67e7a9f5e9f3a54b2c7cd2b8d99dfebf..7d878dc980dc56eb764db84f49ab90b452734a8b 100644
(file)
--- a/
inc/modules/member/what-bonus.php
+++ b/
inc/modules/member/what-bonus.php
@@
-97,12
+97,8
@@
if (!SQL_HASZERONUMS($result)) {
$cnt = 1;
while ($content = SQL_FETCHARRAY($result)) {
// Prepare data for the template
$cnt = 1;
while ($content = SQL_FETCHARRAY($result)) {
// Prepare data for the template
- $content = array(
- 'cnt' => $cnt,
- 'userid' => $content['userid'],
- 'points' => $content['points'],
- 'last_online' => generateDateTime($content['last_online'], 2)
- );
+ $content['cnt'] = $cnt;
+ $content['last_online'] = generateDateTime($content['last_online'], 2);
// Load row template
$OUT .= loadTemplate('member_bonus_row', true, $content);
// Load row template
$OUT .= loadTemplate('member_bonus_row', true, $content);
diff --git
a/templates/de/html/member/member_ref_list_level.tpl
b/templates/de/html/member/member_ref_list_level.tpl
index 11d4c67d294aeec687892a5314fc89c3794da024..efc01c0ef8fee4fe60928b772c41785f350a1a69 100644
(file)
--- a/
templates/de/html/member/member_ref_list_level.tpl
+++ b/
templates/de/html/member/member_ref_list_level.tpl
@@
-29,7
+29,7
@@
$content[rows]
<tr>
<td align="center" class="table_footer" colspan="6">
$content[rows]
<tr>
<td align="center" class="table_footer" colspan="6">
- <span class="notice">{%message,MEMBER_REFLIST_COUNTER=
{%pipe,translateComma=$content[counter]%}
%}</span>
+ <span class="notice">{%message,MEMBER_REFLIST_COUNTER=
$content[counter]
%}</span>
</td>
</tr>
</table>
</td>
</tr>
</table>
diff --git
a/templates/de/html/member/member_refback_list_level.tpl
b/templates/de/html/member/member_refback_list_level.tpl
index cd7abfd7cb85e7a6bc499291c5c9c24a2393c8f1..604e7181cab35292a34b40988d2f2063e2f62893 100644
(file)
--- a/
templates/de/html/member/member_refback_list_level.tpl
+++ b/
templates/de/html/member/member_refback_list_level.tpl
@@
-28,7
+28,7
@@
$content[rows]
<tr>
<td align="center" class="table_footer" colspan="6">
$content[rows]
<tr>
<td align="center" class="table_footer" colspan="6">
- <span class="notice">{%message,MEMBER_REFLIST_COUNTER=
{%pipe,translateComma=$content[counter]%}
%}</span>
+ <span class="notice">{%message,MEMBER_REFLIST_COUNTER=
$content[counter]
%}</span>
</td>
</tr>
</table>
</td>
</tr>
</table>