From b1672dc1cd8c423637e3803c151862331c41bd66 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 3 Dec 2008 21:54:37 +0000 Subject: [PATCH] Some rewrites to refback, TRANSLATE_COMMA() --- inc/databases.php | 2 +- inc/functions.php | 10 ++-------- inc/language/de.php | 2 +- inc/language/refback_de.php | 2 +- inc/modules/member/what-refback.php | 6 +++--- 5 files changed, 8 insertions(+), 14 deletions(-) diff --git a/inc/databases.php b/inc/databases.php index e94d3976d5..c27cfd48a3 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -114,7 +114,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // Current SVN revision -define('CURR_SVN_REVISION', "592"); +define('CURR_SVN_REVISION', "593"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/functions.php b/inc/functions.php index 1a863f6df8..e686d0c7df 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -603,16 +603,10 @@ function TRANSLATE_COMMA ($dotted, $cut=true, $max=0) { if ($max > 0) $maxComma = $max; // Cut zeros off? - if ($cut) { + if (($cut) && ($max == 0)) { // Test for commata if in cut-mode $com = explode(".", $dotted); - if (count($com) > 1) { - // Commata found, so only zeros? - if ($com[1] == str_repeat("0", strlen($com[1]))) { - // Only zeros, so display only one - $maxComma = 1; - } // END - if - } else { + if (count($com) < 2) { // Don't display commatas even if there are none... ;-) $maxComma = 0; } diff --git a/inc/language/de.php b/inc/language/de.php index 5239c5cac2..27a16c0d44 100644 --- a/inc/language/de.php +++ b/inc/language/de.php @@ -1215,7 +1215,7 @@ define('MEMBER_ACTIVITY_INACTIVE', "Inaktiv"); // Member reflist define('MEMBER_REFLIST_LIST_TITLE_1', "Ihre Referals in Ebene "); define('MEMBER_REFLIST_LIST_TITLE_2', " ("); -define('MEMBER_REFLIST_LIST_TITLE_3', "% Ref-Vergütung)"); +define('MEMBER_REFLIST_LIST_TITLE_3', "%)"); define('MEMBER_REFLIST_TITLE', "Referal-Übersicht"); define('MEMBER_REFLIST_POINTS', "Verdienst des Mitgliedes"); define('MEMBER_REFLIST_ACTIVITY', "Mitglied aktiv?"); diff --git a/inc/language/refback_de.php b/inc/language/refback_de.php index d62fc64ca8..ad3f9238d5 100644 --- a/inc/language/refback_de.php +++ b/inc/language/refback_de.php @@ -48,7 +48,7 @@ define('ADMIN_CONFIG_REFBACK_MAX_PERCENTS', "Maximum erlaubte Refback-Prozente:" // Member language strings define('MEMBER_REFBACK_LIST_TITLE_1', "Ref-Back Übersicht für Referal-Ebene "); define('MEMBER_REFBACK_LIST_TITLE_2', " ("); -define('MEMBER_REFBACK_LIST_TITLE_3', "% Ref-Vergütung)"); +define('MEMBER_REFBACK_LIST_TITLE_3', "%)"); define('MEMBER_REFBACK_TITLE', "Ref-Back und Referal-Übersicht"); define('MEMBER_REFBACK_NOTE', "Hier können Sie in jeder Referal-Ebene jedem von Ihnen geworbenen Mitglied Ref-Back einstellen. Sollte Ihr Referal {!POINTS!} verdienen und diese ihm/ihr nicht direkt gutgeschrieben werden, so erhält Ihr Referal die eingestellten Prozente von Ihrem Referalverdienst aufgebuch. Ihnen wird dafür sein Anteil (=eingestellte Prozente) von dem Refverdienst abgezogen. Unter {--MEMBER_REFBACK_POINTS--} sind die {!POINTS!}-Gutschriften durch Ref-Back an das jeweilige Mitglied zu verstehen."); define('MEMBER_REFBACK_EXAMPLE', "Ein Rechenbeispiel: Ihr Ref X verdient 1000 {!POINTS!}, es sind 10% in Ref-Ebene 1 eingestellt. Sie erhalten somit 100 {!POINTS!} in Ref-Ebene 1 gutgeschrieben. Nun haben Sie einen Refback von 90% dem Ref gegeben. Ihrem Ref werden somit 90 und Ihnen die restlichen 10 {!POINTS!} gutgeschrieben."); diff --git a/inc/modules/member/what-refback.php b/inc/modules/member/what-refback.php index 89929d7447..efc0964132 100644 --- a/inc/modules/member/what-refback.php +++ b/inc/modules/member/what-refback.php @@ -91,8 +91,8 @@ if ((isset($_POST['edit'])) && (isset($_POST['id']))) { // Translate comma $content['refback'] = TRANSLATE_COMMA($content['refback']); - $content['min'] = TRANSLATE_COMMA($_CONFIG['refback_min_perc'].".0", true, 1); - $content['max'] = TRANSLATE_COMMA($_CONFIG['refback_max_perc'].".0", true, 1); + $content['min'] = TRANSLATE_COMMA($_CONFIG['refback_min_perc'].".0"); + $content['max'] = TRANSLATE_COMMA($_CONFIG['refback_max_perc'].".0"); // Load form for editing LOAD_TEMPLATE("member_refback_edit", false, $content); @@ -143,7 +143,7 @@ if (SQL_NUMROWS($result) > 0) { // Remember the content $content['counter'] = TRANSLATE_COMMA($counter); - $content['percents'] = TRANSLATE_COMMA($content['percents'], true, 1); + $content['percents'] = TRANSLATE_COMMA($content['percents']); $content['rows'] = $rows; // Load level template -- 2.39.5