From 1737726070a4f13c9bdba728226e358be574aad9 Mon Sep 17 00:00:00 2001 From: quix0r Date: Sat, 10 Nov 2012 19:11:01 +0000 Subject: [PATCH] Even more fixes/improvements: - Added missing XML node - Added missing 'class' to all label tags - Swapped out text from surfbar templates to language file - Other minor improvements/fixes --- inc/callback-functions.php | 7 +- inc/functions.php | 13 ++-- inc/language/surfbar_de.php | 14 ++++ inc/libs/surfbar_functions.php | 2 +- inc/mysql-manager.php | 4 +- .../de/html/admin/admin_add_tester_user.tpl | 24 +++---- .../de/html/admin/admin_config_admin.tpl | 6 +- .../de/html/admin/admin_config_autopurge.tpl | 30 ++++---- .../de/html/admin/admin_config_order.tpl | 22 +++--- .../de/html/admin/admin_config_refid.tpl | 8 +-- .../de/html/admin/admin_config_title.tpl | 12 ++-- templates/de/html/admin/admin_config_user.tpl | 26 +++---- .../de/html/admin/admin_receive_table.tpl | 2 +- .../html/admin/admin_unlock_surfbar_urls.tpl | 2 +- templates/de/html/member/member_add_subid.tpl | 2 +- .../member/member_book_surfbar_dynamic.tpl | 71 +++++++++++-------- .../member/member_book_surfbar_static.tpl | 67 +++++++++++------ .../de/html/member/member_order_page2.tpl | 12 ++-- .../admin_undelete_show_surfbar_urls.xml | 5 ++ 19 files changed, 194 insertions(+), 135 deletions(-) diff --git a/inc/callback-functions.php b/inc/callback-functions.php index d42f017e3a..ba91f20d62 100644 --- a/inc/callback-functions.php +++ b/inc/callback-functions.php @@ -541,10 +541,13 @@ function doXmlStatusChangeList ($resource, $attributes) { if (count($attributes) > 0) { // Please don't add any attributes to foo-list nodes reportBug(__FUNCTION__, __LINE__, 'Expected 0 attributes because this is a foo-list node, got ' . count($attributes)); - } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['status_list'])) { + } elseif (!isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'])) { // doXmlCallbackFunction is missing - reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function/status-list not included around this node. Please fix your XML.'); + reportBug(__FUNCTION__, __LINE__, 'Required XML node callback-function not included around this node. Please fix your XML.'); } + + // Add the entry to the list + $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction']['status_list'] = array(); } // Handles the XML node 'status-change-list-entry' diff --git a/inc/functions.php b/inc/functions.php index ff6852bb84..80b004f5c4 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1343,7 +1343,7 @@ function handleExtraValues ($filterFunction, $value, $extraValue) { } // Tries to determine if call-back functions and/or extra values shall be parsed -function doHandleExtraValues ($filterFunctions, $extraValues, $key, $entries, $userIdColumn, $search) { +function doHandleExtraValues ($filterFunctions, $extraValues, $key, $entries, $userIdColumn, $search, $id = NULL) { // Debug mode enabled? if (isDebugModeEnabled()) { // Debug message @@ -1358,7 +1358,7 @@ function doHandleExtraValues ($filterFunctions, $extraValues, $key, $entries, $u // Debug mode enabled? if (isDebugModeEnabled()) { // Then log it - /* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'search=' . $search . ',filterFunctions=' . $filterFunctions[$search] . ',extraValues=' . $extraValues[$key] . ',key=' . $key . ',id=' . $id . ',entries[' . gettype($entries) . ']=' . $entries . ' - BEFORE!'); + /* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'search=' . $search . ',filterFunctions=' . $filterFunctions[$key] . ',extraValues=' . $extraValues[$key] . ',key=' . $key . ',id=' . $id . ',entries[' . gettype($entries) . ']=' . $entries . ' - BEFORE!'); } // END - if // Filter function + extra value set @@ -1367,7 +1367,7 @@ function doHandleExtraValues ($filterFunctions, $extraValues, $key, $entries, $u // Debug mode enabled? if (isDebugModeEnabled()) { // Then log it - /* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'search=' . $search . ',filterFunctions=' . $filterFunctions[$search] . ',extraValues=' . $extraValues[$key] . ',key=' . $key . ',id=' . $id . ',entries[' . gettype($entries) . ']=' . $entries . ' - AFTER!'); + /* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'search=' . $search . ',filterFunctions=' . $filterFunctions[$key] . ',extraValues=' . $extraValues[$key] . ',key=' . $key . ',id=' . $id . ',entries[' . gettype($entries) . ']=' . $entries . ' - AFTER!'); } // END - if } elseif ((!empty($filterFunctions[$search])) && (!empty($extraValues[$search]))) { // Debug mode enabled? @@ -2078,13 +2078,10 @@ function convertZeroToNull ($number) { // Converts a NULL to zero function convertNullToZero ($number) { // Is it a valid username? - if ((!is_null($number)) && (!empty($number)) && ($number > 0)) { - // Always secure it - $number = bigintval($number); - } else { + if ((is_null($number)) || (empty($number)) || ($number < 1)) { // Is not valid or zero $number = '0'; - } + } // END - if // Return it return $number; diff --git a/inc/language/surfbar_de.php b/inc/language/surfbar_de.php index ce5a8b9682..b64a39ec67 100644 --- a/inc/language/surfbar_de.php +++ b/inc/language/surfbar_de.php @@ -171,6 +171,20 @@ addMessages(array( 'MEMBER_SURFBAR_UNLIMITED_VIEWS' => "Unbegrenzt", 'MEMBER_SURFBAR_TEST_URL' => "URL-Tester", + // Member - book URLs + 'MEMBER_BOOK_SURFBAR_URL_DYNAMIC_TITLE' => "URL in Surfbar buchen - Dynamisch:", + 'MEMBER_BOOK_SURFBAR_URL_STATIC_TITLE' => "URL in Surfbar buchen - Statisch:", + 'MEMBER_BOOK_SURFBAR_URL_DYNAMIC_NOTICE' => "Die maximalen Kosten bzw. Einnahmen pro Surfbaraufruf richten sich nach verschiedenen Faktoren. Schauen Sie unter Surfbar starten nach, wenn Sie genaueres dazu wissen möchten.", + 'MEMBER_BOOK_SURFBAR_URL_LIMITED' => "Soll die Anzahl Aufrufe begrenzt werden?", + 'MEMBER_BOOK_SURFBAR_URL_ENTER_LIMIT' => "Aufrufe begrenzen auf:", + 'MEMBER_BOOK_SURFBAR_URL_ENTER_URL' => "URL eingeben:", + 'MEMBER_BOOK_SURFBAR_URL_TOTAL_AMOUNT' => "Sie haben bereits {%pipe,getSurfbarTotalUserUrls,translateComma%} von maximal {%config,translateComma=surfbar_max_order%} erlaubten URLs gebucht.", + 'MEMBER_BOOK_SURFBAR_URL_DYNAMIC_COSTS' => "Jeder Seiten-Aufruf durch andere Mitglieder kostet Ihnen mindestens {%pipe,determineSurfbarCosts,translateComma=true%} {?POINTS?}. Surfen Sie mit der Surfbar erhalten Sie mindestens {%pipe,determineSurfbarReward,translateComma=true%} {?POINTS?} auf Ihr Konto gutgeschrieben.", + 'MEMBER_BOOK_SURFBAR_URL_STATIC_COSTS' => "Jeder Seiten-Aufruf durch andere Mitglieder kostet Ihnen {%pipe,determineSurfbarCosts,translateComma=true%}{?POINTS?}. Surfen Sie mit der Surfbar erhalten Sie {%pipe,determineSurfbarReward,translateComma=true%} {?POINTS?} auf Ihr Konto gutgeschrieben.", + + // Member - legends + 'MEMBER_BOOK_SURFBAR_URL_DATA_LEGEND' => "Geben Sie die Daten zu Ihrer URL ein:", + // Subject lines for admins 'ADMIN_SURFBAR_NOTIFY_URL_UNLOCK_SUBJECT' => "[Surfbar:] URL hinzugefügt durch Admin", 'ADMIN_SURFBAR_NOTIFY_URL_REG_SUBJECT' => "[Surfbar:] Mitgliedsbuchung einer URL", diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index 65f9614ced..8a02ca6116 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -476,7 +476,7 @@ function executeSurfbarMemberEditAction ($urlData) { // Has the URL or limit changed? if (TRUE) { - //if (($urlData['url_views_allowed'] != $urlData['edit']['limit']) || ($url1 != $url2)) { + // @TODO if (($urlData['url_views_allowed'] != $urlData['edit']['limit']) || ($url1 != $url2)) { // Run the query SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_surfbar_urls` diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 419859d5cb..ace74be26f 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -2239,7 +2239,7 @@ function doGenericDeleteEntriesConfirm ($tableName, $columns = array(), $filterF // Is a user id provided? //* BUG: */ die('
'.print_r($rawUserId,TRUE).'
'.print_r($userIdColumn,TRUE).'
'); - if ((isset($rawUserId[0])) && (isPostRequestElementSet($rawUserId[0])) && (isset($userIdColumn[0]))) { + if ((isset($rawUserId[0])) && (isset($userIdColumn[0])) && (isPostRequestElementSet($rawUserId[0])) && (!is_array(postRequestElement($rawUserId[0])))) { // Add user id as well $sql .= ' AND `' . $userIdColumn[0] . '`=' . bigintval(postRequestElement($rawUserId[0])); } // END - if @@ -2372,7 +2372,7 @@ function doGenericListBuilder ($prefix, $listType, $tableName, $columns, $filter // Try to handle call-back functions and/or extra values //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'idx=' . $idx . ',row[' . $key . ']=' . $row[$key]); //if ($key == 'forced_campaign_created') die($idx.'=
'.print_r($columns,true).'
'.print_r($extraValues,true).'
'); - $row[$key] = doHandleExtraValues($filterFunctions, $extraValues, $idx, $row[$key], $userIdColumn, ((!is_null($name)) ? $name : $key)); + $row[$key] = doHandleExtraValues($filterFunctions, $extraValues, $idx, $row[$key], $userIdColumn, ((!is_null($name)) ? $name : $key), $id); } // END - foreach // Then list it diff --git a/templates/de/html/admin/admin_add_tester_user.tpl b/templates/de/html/admin/admin_add_tester_user.tpl index 3064d04f6b..846d6745ac 100644 --- a/templates/de/html/admin/admin_add_tester_user.tpl +++ b/templates/de/html/admin/admin_add_tester_user.tpl @@ -8,47 +8,47 @@
{--ADMIN_ADD_TESTER_USER_LEGEND--}
- +
{%config,generateGenderSelectionBox=tester_user_gender%}
- +
{?tester_user_surname_prefix?}{%pipe,getNextFreeTesterUserNumber%}
- +
- +
- +
{%pipe,addCountryCodeSelectionBox%}
- +
- +
- +
- + @@ -56,7 +56,7 @@
- +
{%pipe,addTesterUserDefaultRefidSelectionBox=refid%}
@@ -77,12 +77,12 @@ {--ADMIN_ADD_TESTER_USER_PASSWORDS_LEGEND--}
- +
- +
diff --git a/templates/de/html/admin/admin_config_admin.tpl b/templates/de/html/admin/admin_config_admin.tpl index 572d1a43a1..c2e7ed2cc0 100644 --- a/templates/de/html/admin/admin_config_admin.tpl +++ b/templates/de/html/admin/admin_config_admin.tpl @@ -9,14 +9,14 @@ {--ADMIN_CONFIG_ADMIN_MENU_TYPE_LEGEND--}
- +
- +
@@ -27,7 +27,7 @@ {--ADMIN_CONFIG_ADMIN_MENU_MISC_LEGEND--}
- +
{%template,ConfigurationYesNoSelectionBox=admin_menu_javascript%}
diff --git a/templates/de/html/admin/admin_config_autopurge.tpl b/templates/de/html/admin/admin_config_autopurge.tpl index 93f6243b86..f7d6778271 100644 --- a/templates/de/html/admin/admin_config_autopurge.tpl +++ b/templates/de/html/admin/admin_config_autopurge.tpl @@ -9,17 +9,17 @@ {--ADMIN_CONFIG_AUTOPURGE_INACTIVE_TITLE--}
- +
$content[ap_inactive_selection]
- +
$content[ap_in_since]
- +
$content[ap_in_time]
@@ -28,12 +28,12 @@ {--ADMIN_CONFIG_AUTOPURGE_UNCONFIRMED_TITLE--}
- +
$content[ap_unconfirmed_selection]
- +
$content[ap_un_time]
@@ -42,12 +42,12 @@ {--ADMIN_CONFIG_AUTOPURGE_TASKS_TITLE--}
- +
$content[ap_tasks_selection]
- +
$content[ap_task_time]
@@ -56,17 +56,17 @@ {--ADMIN_CONFIG_AUTOPURGE_MAILID_TITLE--}
- +
{%template,ConfigurationYesNoSelectionBox=auto_purge%}
- +
$content[auto_purge]
- +
$content[ap_notify_del_mails]
@@ -75,12 +75,12 @@ {--ADMIN_CONFIG_AUTOPURGE_DELETE_MAILS_TITLE--}
- +
$content[ap_del_mails_selection]
- +
$content[ap_del_mails_time]
@@ -89,17 +89,17 @@ {--ADMIN_CONFIG_AUTOPURGE_NOTIFICATION_TITLE--}
- +
$content[ap_notify_inactive]
- +
$content[ap_notify_unconfirmed]
- +
$content[ap_notify_tasks]
diff --git a/templates/de/html/admin/admin_config_order.tpl b/templates/de/html/admin/admin_config_order.tpl index edaffe9eec..226702d01e 100644 --- a/templates/de/html/admin/admin_config_order.tpl +++ b/templates/de/html/admin/admin_config_order.tpl @@ -9,14 +9,14 @@ {--ADMIN_CONFIG_ORDER_SELECT_MAX_LEGEND--}
- +
- +
@@ -27,42 +27,42 @@ {--ADMIN_CONFIG_ORDER_MEMBER_LEGEND--}
- +
- +
- +
{%template,ConfigurationYesNoSelectionBox=allow_url_in_text%}
- +
{%template,ConfigurationYesNoSelectionBox=allow_url_in_subject%}
- +
{%template,ConfigurationYesNoSelectionBox=url_blacklist%}
- +
$content[order_selection] @@ -86,7 +86,7 @@
- +
diff --git a/templates/de/html/admin/admin_config_refid.tpl b/templates/de/html/admin/admin_config_refid.tpl index 6891539b4c..6606a604fd 100644 --- a/templates/de/html/admin/admin_config_refid.tpl +++ b/templates/de/html/admin/admin_config_refid.tpl @@ -9,14 +9,14 @@ {--ADMIN_CONFIG_REFID_GENERAL_LEGEND--}
- +
$content[def_refid]
- +
@@ -40,7 +40,7 @@
- +
diff --git a/templates/de/html/admin/admin_config_title.tpl b/templates/de/html/admin/admin_config_title.tpl index a75ec618e9..e1c8c4078a 100644 --- a/templates/de/html/admin/admin_config_title.tpl +++ b/templates/de/html/admin/admin_config_title.tpl @@ -8,17 +8,17 @@
{--ADMIN_CONFIG_TITLE_LEGEND--}
- +
$content[enable_title_deco]
- +
$content[enable_mod_title]
- +
$content[enable_what_title]
@@ -27,17 +27,17 @@ {--ADMIN_CONFIG_TITLE_DECORATIONS--}
- +
- +
- +
diff --git a/templates/de/html/admin/admin_config_user.tpl b/templates/de/html/admin/admin_config_user.tpl index feced38c73..a0e5eb4eec 100644 --- a/templates/de/html/admin/admin_config_user.tpl +++ b/templates/de/html/admin/admin_config_user.tpl @@ -8,12 +8,12 @@
{--ADMIN_CONFIG_USER_LEGEND--}
- +
- +
@@ -21,52 +21,52 @@
{--ADMIN_CONFIG_TESTER_USER_LEGEND--}
- +
- +
$content[tester_user_gender_selection]
- +
- +
- +
- +
- +
- +
- +
- +
{%template,ConfigurationYesNoSelectionBox=tester_user_check_cat%}
@@ -75,7 +75,7 @@
- +
{%pipe,addTesterUserDefaultRefidSelectionBox%}
diff --git a/templates/de/html/admin/admin_receive_table.tpl b/templates/de/html/admin/admin_receive_table.tpl index 2a15a3b127..507288d470 100644 --- a/templates/de/html/admin/admin_receive_table.tpl +++ b/templates/de/html/admin/admin_receive_table.tpl @@ -1,5 +1,5 @@
- +
- + diff --git a/templates/de/html/member/member_add_subid.tpl b/templates/de/html/member/member_add_subid.tpl index bb45eb6522..b18871b761 100644 --- a/templates/de/html/member/member_add_subid.tpl +++ b/templates/de/html/member/member_add_subid.tpl @@ -9,7 +9,7 @@ {--MEMBER_ADD_SUBID_LEGEND--}
- +
diff --git a/templates/de/html/member/member_book_surfbar_dynamic.tpl b/templates/de/html/member/member_book_surfbar_dynamic.tpl index 09ae7460b8..f1b684cf78 100644 --- a/templates/de/html/member/member_book_surfbar_dynamic.tpl +++ b/templates/de/html/member/member_book_surfbar_dynamic.tpl @@ -2,47 +2,45 @@ {%form,formIdBook,formMethodPost=modules.php?module=login&what=book_surfbar%}
- URL in Surfbar buchen - Dynamisch: + {--MEMBER_BOOK_SURFBAR_URL_DYNAMIC_TITLE--}
-
- URL eingeben: -
+
+ {--MEMBER_BOOK_SURFBAR_URL_DATA_LEGEND--} +
+ + +
-
- Soll die Anzahl Aufrufe begrenzt werden?
- {--NO--} - {--YES--} -
+
+ + {--NO--} + {--YES--} +
-
- Aufrufe begrenzen auf: -
+
+ + +
+
-
+
- Jeder Seiten-Aufruf durch andere Mitglieder kostet Ihnen mindestens - {%pipe,determineSurfbarCosts,translateComma=true%} {?POINTS?}. - Surfen Sie mit der Surfbar erhalten Sie mindestens - {%pipe,determineSurfbarReward,translateComma=true%} {?POINTS?} - auf Ihr Konto gutgeschrieben. + {--MEMBER_BOOK_SURFBAR_URL_DYNAMIC_COSTS--}
- Sie haben bereits - {%pipe,getSurfbarTotalUserUrls,translateComma%} - von maximal - {%config,translateComma=surfbar_max_order%} - erlaubten URLs gebucht. + {--MEMBER_BOOK_SURFBAR_URL_TOTAL_AMOUNT--}
-
+
+ {%form_close%} - Die maximalen Kosten bzw. Einnahmen pro Surfbaraufruf richten sich nach - verschiedenen Faktoren. Schauen Sie unter Surfbar starten - nach, wenn Sie genaueres dazu wissen möchten. + {--MEMBER_BOOK_SURFBAR_URL_DYNAMIC_NOTICE--}
diff --git a/templates/de/html/member/member_book_surfbar_static.tpl b/templates/de/html/member/member_book_surfbar_static.tpl index ede62c0f32..b53ba54b56 100644 --- a/templates/de/html/member/member_book_surfbar_static.tpl +++ b/templates/de/html/member/member_book_surfbar_static.tpl @@ -2,40 +2,45 @@ {%form,formIdBook,formMethodPost=modules.php?module=login&what=book_surfbar%}
- URL in Surfbar buchen - Statisch: + {--MEMBER_BOOK_SURFBAR_URL_STATIC_TITLE--}
-
- URL eingeben: -
+
+ {--MEMBER_BOOK_SURFBAR_URL_DATA_LEGEND--} +
+ + +
-
- Soll die Anzahl Aufrufe begrenzt werden?
- {--NO--} - {--YES--} -
+
+ + {--NO--} + {--YES--} +
-
- Aufrufe begrenzen auf: -
+
+ + +
+
-
- Jeder Seiten-Aufruf durch andere Mitglieder kostet Ihnen {%pipe,determineSurfbarCosts,translateComma=true%}{?POINTS?}. Surfen Sie mit - der Surfbar erhalten Sie {%pipe,determineSurfbarReward,translateComma=true%} - {?POINTS?} auf Ihr Konto gutgeschrieben.
-
- Sie haben bereits {%pipe,getSurfbarTotalUserUrls,translateComma%} von maximal - {%config,translateComma=surfbar_max_order%} erlaubten URLs gebucht. +
+
+ {--MEMBER_BOOK_SURFBAR_URL_STATIC_COSTS--} +
+
+ {--MEMBER_BOOK_SURFBAR_URL_TOTAL_AMOUNT--} +
-
+
+ diff --git a/templates/de/html/member/member_order_page2.tpl b/templates/de/html/member/member_order_page2.tpl index 12b007a41f..aef471759c 100644 --- a/templates/de/html/member/member_order_page2.tpl +++ b/templates/de/html/member/member_order_page2.tpl @@ -8,7 +8,7 @@ $content[zip_content]
- +
@@ -28,7 +28,7 @@
- +
(Minimum: {?order_min?}) @@ -36,7 +36,7 @@
- +
@@ -45,14 +45,14 @@ $content[html_extension]
- +
- +
diff --git a/templates/xml/admin/admin_undelete_show_surfbar_urls.xml b/templates/xml/admin/admin_undelete_show_surfbar_urls.xml index bf8afe64be..b30e651b46 100644 --- a/templates/xml/admin/admin_undelete_show_surfbar_urls.xml +++ b/templates/xml/admin/admin_undelete_show_surfbar_urls.xml @@ -85,6 +85,11 @@ MA 02110-1301 USA + + + -- 2.39.5