From 7a6515f7a4a512a6b1922b68aa4f211daad997cd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 12 Oct 2008 00:55:28 +0000 Subject: [PATCH] Fix for error and min/max refback displayed in edit form --- inc/databases.php | 2 +- inc/language/refback_de.php | 3 +++ inc/modules/member/what-refback.php | 4 +++- templates/de/html/member/member_refback_edit.tpl | 4 ++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/inc/databases.php b/inc/databases.php index b994f3e09b..495960040d 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -113,7 +113,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // This current patch level -define('CURR_SVN_REVISION', "495"); +define('CURR_SVN_REVISION', "496"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/language/refback_de.php b/inc/language/refback_de.php index c0a29361d7..2852c8e762 100644 --- a/inc/language/refback_de.php +++ b/inc/language/refback_de.php @@ -63,6 +63,9 @@ define('MEMBER_REFBACK_EDIT_TITLE', "Ref-Back für ausgewähltes Mitglie define('MEMBER_REFBACK_DELETED_SUBMIT', "Nicht möglich"); define('MEMBER_REFBACK_DELETED_TITLE', "Einstellen von Ref-Back ist für gelöschte Mitglieder nicht möglich."); define('MEMBER_REFBACK_DISABLED', "Refback ist administrativ deaktiviert. Bitte nutze die Referal-Übersicht links im Menü."); +define('MEMBER_REFBACK_MIN_MAX_NOTE_1', "Hinweis: Sie können derzeit zwischen "); +define('MEMBER_REFBACK_MIN_MAX_NOTE_2', " und "); +define('MEMBER_REFBACK_MIN_MAX_NOTE_3', " Prozent, inklusive, Refback einstellen."); // Error messages for members define('MEMBER_REFBACK_ERROR_MESSAGE', "Fehler beim Einstellen des Ref-Backs. Fehlermeldung:
\n%s"); diff --git a/inc/modules/member/what-refback.php b/inc/modules/member/what-refback.php index db6fdcd5d2..90d3ad7f62 100644 --- a/inc/modules/member/what-refback.php +++ b/inc/modules/member/what-refback.php @@ -60,7 +60,7 @@ if ((isset($_POST['edit'])) && (isset($_POST['id']))) { // Okay, has the user entered some values? if (isset($_POST['percents'])) { // Validate percents - if (($_POST['percents'] >= $_CONFIG['refback_min_percents']) || ($_POST['percents'] == 0)) && ($_POST['percents'] <= $_CONFIG['refback_max_percents'])) { + if ((($_POST['percents'] >= $_CONFIG['refback_min_percents']) || ($_POST['percents'] == 0)) && ($_POST['percents'] <= $_CONFIG['refback_max_percents'])) { // Change ref-back for this direct id $status = REFBACK_CHANGE_MEMBER_PERCENTS($_POST['id'], $_POST['percents']); @@ -88,6 +88,8 @@ if ((isset($_POST['edit'])) && (isset($_POST['id']))) { // Translate comma $content['refback'] = TRANSLATE_COMMA($content['refback']); + $content['max'] = $_CONFIG['refback_max_percents']; + $content['min'] = $_CONFIG['refback_min_percents']; // Load form for editing LOAD_TEMPLATE("member_refback_edit", false, $content); diff --git a/templates/de/html/member/member_refback_edit.tpl b/templates/de/html/member/member_refback_edit.tpl index d5264fb2b5..a146b2bdf9 100644 --- a/templates/de/html/member/member_refback_edit.tpl +++ b/templates/de/html/member/member_refback_edit.tpl @@ -25,3 +25,7 @@ + +
+ {--MEMBER_REFBACK_MIN_MAX_NOTE_1--}$content[min]{--MEMBER_REFBACK_MIN_MAX_NOTE_2--}$content[min]{--MEMBER_REFBACK_MIN_MAX_NOTE_3--} +
-- 2.39.5