]> git.mxchange.org Git - mailer.git/commitdiff
Mailer project continued:
authorRoland Häder <roland@mxchange.org>
Wed, 3 Oct 2012 17:20:38 +0000 (17:20 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 3 Oct 2012 17:20:38 +0000 (17:20 +0000)
- New filter chain 'member_admin_actions' allows "hooking" of more admin
  member actions in what=list_user listing.
- Added 'list_refs' and list_links' as default admin actions
- Other minor fixes
- TODOs.txt updated

DOCS/TODOs.txt
inc/extensions/ext-booking.php
inc/filter/booking_filter.php
inc/language/booking_de.php
inc/language/user_de.php
inc/mysql-manager.php
inc/template-functions.php
inc/wrapper-functions.php

index b4f89f440e2ba419663476df4d9c897e810a606a..1fae91354a58c670d5262c80e13cc15fd98f8d68 100644 (file)
@@ -43,7 +43,7 @@
 ./inc/extensions/ext-rallye.php:94:            // @TODO Fix config_rallye_prices to list_rallye_prices
 ./inc/extensions/ext-yoomedia.php:121:         // @TODO Can this be moved into a database table?
 ./inc/extensions/ext-yoomedia.php:54:// @TODO Only deprecated when 'ext-network' is ready! setExtensionDeprecated('Y');
 ./inc/extensions/ext-rallye.php:94:            // @TODO Fix config_rallye_prices to list_rallye_prices
 ./inc/extensions/ext-yoomedia.php:121:         // @TODO Can this be moved into a database table?
 ./inc/extensions/ext-yoomedia.php:54:// @TODO Only deprecated when 'ext-network' is ready! setExtensionDeprecated('Y');
-./inc/extensions-functions.php:2038:// @TODO This should be rewrittten to allow, more development states, e.g. 'planing','alpha','beta','beta2','stable'
+./inc/extensions-functions.php:2040:// @TODO This should be rewrittten to allow, more development states, e.g. 'planing','alpha','beta','beta2','stable'
 ./inc/extensions-functions.php:424:    // @TODO This redirect is still needed to register sql_patches! Please try to avoid it
 ./inc/extensions-functions.php:440:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) )
 ./inc/extensions-functions.php:580:            // @TODO Extension is loaded, what next?
 ./inc/extensions-functions.php:424:    // @TODO This redirect is still needed to register sql_patches! Please try to avoid it
 ./inc/extensions-functions.php:440:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) )
 ./inc/extensions-functions.php:580:            // @TODO Extension is loaded, what next?
@@ -75,7 +75,7 @@
 ./inc/libs/doubler_functions.php:93:                   // @TODO Can't this be moved into EL?
 ./inc/libs/forced_functions.php:457:// @TODO Can't we use our new expression language instead of this ugly code?
 ./inc/libs/mailid_functions.php:47:            // @TODO Rewrite this to a dynamic include or so
 ./inc/libs/doubler_functions.php:93:                   // @TODO Can't this be moved into EL?
 ./inc/libs/forced_functions.php:457:// @TODO Can't we use our new expression language instead of this ugly code?
 ./inc/libs/mailid_functions.php:47:            // @TODO Rewrite this to a dynamic include or so
-./inc/libs/network_functions.php:978:  // @TODO Implement this function
+./inc/libs/network_functions.php:978:  // @TODO Implement this function, don't forget to set HTTP status back to '200 OK' if everything went fine
 ./inc/libs/order_functions.php:46:     // @TODO Move this array into a filter
 ./inc/libs/rallye_functions.php:769:// @TODO This function does not load min_users, min_prices, please encapsulate loading rallye data with e.g. getRallyeDataFromId()
 ./inc/libs/rallye_functions.php:836:   $EXPIRE = 3; // @TODO The hard-coded value...
 ./inc/libs/order_functions.php:46:     // @TODO Move this array into a filter
 ./inc/libs/rallye_functions.php:769:// @TODO This function does not load min_users, min_prices, please encapsulate loading rallye data with e.g. getRallyeDataFromId()
 ./inc/libs/rallye_functions.php:836:   $EXPIRE = 3; // @TODO The hard-coded value...
 ./inc/modules/admin/admin-inc.php:160:         // @TODO This and the next getCurrentAdminId() call might be moved into the templates?
 ./inc/modules/admin/admin-inc.php:233:         // @TODO This can be rewritten into a filter
 ./inc/modules/admin/admin-inc.php:509:// @TODO Try to rewrite this to adminAddMenuSelectionBox()
 ./inc/modules/admin/admin-inc.php:160:         // @TODO This and the next getCurrentAdminId() call might be moved into the templates?
 ./inc/modules/admin/admin-inc.php:233:         // @TODO This can be rewritten into a filter
 ./inc/modules/admin/admin-inc.php:509:// @TODO Try to rewrite this to adminAddMenuSelectionBox()
-./inc/modules/admin/overview-inc.php:168:                              // @TODO Rewrite this to a filter
-./inc/modules/admin/overview-inc.php:281:                              // @TODO Rewrite this to something with include files and/or filter
-./inc/modules/admin/overview-inc.php:315:                                              // @TODO This may also be rewritten to include files
-./inc/modules/admin/overview-inc.php:317:                                                      default: // @TODO Unknown support mode
-./inc/modules/admin/overview-inc.php:432:                      // @TODO Try to move this in includes
+./inc/modules/admin/overview-inc.php:169:                              // @TODO Rewrite this to a filter
+./inc/modules/admin/overview-inc.php:282:                              // @TODO Rewrite this to something with include files and/or filter
+./inc/modules/admin/overview-inc.php:316:                                              // @TODO This may also be rewritten to include files
+./inc/modules/admin/overview-inc.php:318:                                                      default: // @TODO Unknown support mode
+./inc/modules/admin/overview-inc.php:433:                      // @TODO Try to move this in includes
 ./inc/modules/admin/overview-inc.php:43:// @TODO This function does also check for uncompleted tasks
 ./inc/modules/admin/what-add_guestnl_cat.php:47:       // @TODO Check if category does already exist
 ./inc/modules/admin/what-admin_add.php:120:                            // @TODO This can be somehow rewritten to a function
 ./inc/modules/admin/overview-inc.php:43:// @TODO This function does also check for uncompleted tasks
 ./inc/modules/admin/what-add_guestnl_cat.php:47:       // @TODO Check if category does already exist
 ./inc/modules/admin/what-admin_add.php:120:                            // @TODO This can be somehow rewritten to a function
 ./inc/modules/member/what-unconfirmed.php:169: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
 ./inc/modules/member/what-unconfirmed.php:234:                         // @TODO This 'userid' cannot be saved because of encapsulated EL code
 ./inc/modules/order.php:78:            // @TODO Unused: 2,4
 ./inc/modules/member/what-unconfirmed.php:169: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY()
 ./inc/modules/member/what-unconfirmed.php:234:                         // @TODO This 'userid' cannot be saved because of encapsulated EL code
 ./inc/modules/order.php:78:            // @TODO Unused: 2,4
-./inc/mysql-manager.php:1421:          // @TODO Rewrite these lines to a filter
-./inc/mysql-manager.php:1445:  // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:1701:                  // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:390:   // @TODO Try to rewrite this to one or more functions
+./inc/mysql-manager.php:1442:          // @TODO Rewrite these lines to a filter
+./inc/mysql-manager.php:1466:  // @TODO Rewrite this to a filter
+./inc/mysql-manager.php:1722:                  // @TODO Rewrite this to a filter
+./inc/mysql-manager.php:398:   // @TODO Try to rewrite this to one or more functions
 ./inc/mysql-manager.php:44:// @TODO Can we cache this?
 ./inc/purge/purge-inact.php:55:        // @TODO Rewrite these if() blocks to a filter
 ./inc/revision-functions.php:168:// @TODO This function does also set and get in 'cache_array'
 ./inc/mysql-manager.php:44:// @TODO Can we cache this?
 ./inc/purge/purge-inact.php:55:        // @TODO Rewrite these if() blocks to a filter
 ./inc/revision-functions.php:168:// @TODO This function does also set and get in 'cache_array'
-./inc/template-functions.php:1107:                     // @TODO Deprecate this thing
-./inc/template-functions.php:1118:                     // @TODO Deprecate this thing
-./inc/template-functions.php:1225:     // @TODO This can be easily moved out after the merge from EL branch to this is complete
-./inc/template-functions.php:1274:             // @TODO Add a little more infos here
-./inc/template-functions.php:1642:// @TODO Lame description for this function
-./inc/template-functions.php:1664:                     // @TODO Move this in a filter
+./inc/template-functions.php:1108:                     // @TODO Deprecate this thing
+./inc/template-functions.php:1119:                     // @TODO Deprecate this thing
+./inc/template-functions.php:1226:     // @TODO This can be easily moved out after the merge from EL branch to this is complete
+./inc/template-functions.php:1275:             // @TODO Add a little more infos here
+./inc/template-functions.php:1643:// @TODO Lame description for this function
+./inc/template-functions.php:1665:                     // @TODO Move this in a filter
 ./inc/template-functions.php:197:       * @TODO On some pages this is buggy
 ./inc/template-functions.php:285:      // @TODO Remove these sanity checks if all is fine
 ./inc/template-functions.php:197:       * @TODO On some pages this is buggy
 ./inc/template-functions.php:285:      // @TODO Remove these sanity checks if all is fine
-./inc/template-functions.php:598:// @TODO $simple/$constants are deprecated
-./inc/template-functions.php:696:                      // @TODO $userid is deprecated and should be removed from loadEmailTemplate() and replaced with $content[userid] in all templates
-./inc/wrapper-functions.php:2968:      // @TODO Find a way to not use direct module comparison
+./inc/template-functions.php:599:// @TODO $simple/$constants are deprecated
+./inc/template-functions.php:697:                      // @TODO $userid is deprecated and should be removed from loadEmailTemplate() and replaced with $content[userid] in all templates
+./inc/wrapper-functions.php:2980:      // @TODO Find a way to not use direct module comparison
 ./inc/wrapper-functions.php:494:// @TODO Do some more sanity check here
 ./inc/xml-functions.php:208:   // @TODO Handle characters
 ./mailid.php:102:              // @TODO Rewrite this to a filter
 ./mailid.php:145:                                      // @TODO Rewrite this to a filter
 ./inc/wrapper-functions.php:494:// @TODO Do some more sanity check here
 ./inc/xml-functions.php:208:   // @TODO Handle characters
 ./mailid.php:102:              // @TODO Rewrite this to a filter
 ./mailid.php:145:                                      // @TODO Rewrite this to a filter
-./mailid_top.php:108:          // @TODO Rewrite this to a filter
-./mailid_top.php:145:                                  // @TODO Rewrite this to a filter
+./mailid_top.php:112:          // @TODO Rewrite this to a filter/function
+./mailid_top.php:149:                                  // @TODO Rewrite this to a filter
 ./mailid_top.php:18: * @TODO Merge this script with mailid.php                              *
 ./mailid_top.php:18: * @TODO Merge this script with mailid.php                              *
-./mailid_top.php:192:                                                  // @TODO Rewrite this to a filter
-./mailid_top.php:199:                                                                  // @TODO Rewrite this to a filter
-./mailid_top.php:234:                                                                  // @TODO Rewrite these blocks to filter
+./mailid_top.php:196:                                                  // @TODO Rewrite this to a filter
+./mailid_top.php:203:                                                                  // @TODO Rewrite this to a filter
+./mailid_top.php:238:                                                                  // @TODO Rewrite these blocks to filter
 ./view.php:71:         // @TODO No banner found, output some default banner
 ./templates/de/html/admin/admin_add_country.tpl:23:                    <!-- @TODO Rewrite this selection box to our generic functions //-->
 ./templates/de/html/admin/admin_config_other.tpl:79:                   <!-- @TODO Rewrite this selection to one of our functions //-->
 ./view.php:71:         // @TODO No banner found, output some default banner
 ./templates/de/html/admin/admin_add_country.tpl:23:                    <!-- @TODO Rewrite this selection box to our generic functions //-->
 ./templates/de/html/admin/admin_config_other.tpl:79:                   <!-- @TODO Rewrite this selection to one of our functions //-->
 ./inc/extensions/ext-funcoins.php:2:// @DEPRECATED
 ./inc/extensions/ext-iso3166.php:2:// @DEPRECATED
 ./inc/extensions/ext-primera.php:2:// @DEPRECATED
 ./inc/extensions/ext-funcoins.php:2:// @DEPRECATED
 ./inc/extensions/ext-iso3166.php:2:// @DEPRECATED
 ./inc/extensions/ext-primera.php:2:// @DEPRECATED
+./inc/filter/politician_stop_filter.php:2:// @DEPRECATED
 ./inc/gen_refback.php:2:// @DEPRECATED
 ./inc/js/js-jquery.php:2:// @DEPRECATED
 ./inc/language/funcoins_de.php:2:// @DEPRECATED
 ./inc/language/primera_de.php:2:// @DEPRECATED
 ./inc/libs/funcoins_functions.php:2:// @DEPRECATED
 ./inc/gen_refback.php:2:// @DEPRECATED
 ./inc/js/js-jquery.php:2:// @DEPRECATED
 ./inc/language/funcoins_de.php:2:// @DEPRECATED
 ./inc/language/primera_de.php:2:// @DEPRECATED
 ./inc/libs/funcoins_functions.php:2:// @DEPRECATED
+./inc/libs/politician_stop_functions.php:2:// @DEPRECATED
 ./inc/libs/primera_functions.php:2:// @DEPRECATED
 ./inc/loader/load_cache-admin.php:2:// @DEPRECATED
 ./inc/loader/load_cache-config.php:2:// @DEPRECATED
 ./inc/libs/primera_functions.php:2:// @DEPRECATED
 ./inc/loader/load_cache-admin.php:2:// @DEPRECATED
 ./inc/loader/load_cache-config.php:2:// @DEPRECATED
 ./templates/de/html/admin/admin_payout_add_new.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/admin/admin_reset_pass_done.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/admin/admin_send_reset_link.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/admin/admin_payout_add_new.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/admin/admin_reset_pass_done.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/admin/admin_send_reset_link.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/html/app_die_message.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/awards.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/beg/beg_banner.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/bug-tracker.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/awards.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/beg/beg_banner.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/bug-tracker.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/partner.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/philosophy.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/photos.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/partner.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/philosophy.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/photos.tpl:1:<!-- @DEPRECATED //-->
+./templates/de/html/politician_stop/politician_stop_snippet.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/powered.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/premium-backlinks.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/rallye_test.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/powered.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/premium-backlinks.tpl:1:<!-- @DEPRECATED //-->
 ./templates/de/html/rallye_test.tpl:1:<!-- @DEPRECATED //-->
index bb4469b12a79831691954d89cc069d2bb7912d9c..6afac46583c56fc1e5c4143e1f462fee3e8c0cbd 100644 (file)
@@ -79,6 +79,7 @@ INDEX (`userid`)",
                // Add the filters
                registerFilter(__FILE__, __LINE__, 'post_add_points', 'ADD_BOOKING_RECORD', false, true, isExtensionDryRun());
                registerFilter(__FILE__, __LINE__, 'post_sub_points', 'ADD_BOOKING_RECORD', false, true, isExtensionDryRun());
                // Add the filters
                registerFilter(__FILE__, __LINE__, 'post_add_points', 'ADD_BOOKING_RECORD', false, true, isExtensionDryRun());
                registerFilter(__FILE__, __LINE__, 'post_sub_points', 'ADD_BOOKING_RECORD', false, true, isExtensionDryRun());
+               registerFilter(__FILE__, __LINE__, 'member_admin_actions', 'ADD_BOOKING_MEMBER_ACTION', false, true, isExtensionDryRun());
                break;
 
        case 'remove': // Do stuff when removing extension
                break;
 
        case 'remove': // Do stuff when removing extension
@@ -89,6 +90,7 @@ INDEX (`userid`)",
                // Remove the filters
                unregisterFilter(__FILE__, __LINE__, 'post_add_points', 'ADD_BOOKING_RECORD', true, isExtensionDryRun());
                unregisterFilter(__FILE__, __LINE__, 'post_sub_points', 'ADD_BOOKING_RECORD', true, isExtensionDryRun());
                // Remove the filters
                unregisterFilter(__FILE__, __LINE__, 'post_add_points', 'ADD_BOOKING_RECORD', true, isExtensionDryRun());
                unregisterFilter(__FILE__, __LINE__, 'post_sub_points', 'ADD_BOOKING_RECORD', true, isExtensionDryRun());
+               unregisterFilter(__FILE__, __LINE__, 'member_admin_actions', 'ADD_BOOKING_MEMBER_ACTION', true, isExtensionDryRun());
                break;
 
        case 'activate': // Do stuff when admin activates this extension
                break;
 
        case 'activate': // Do stuff when admin activates this extension
index 9e65874f040d9aa2744a6db99c7a473edb550ea1..73aad6d671cfc5a50aa0a38bfa6709f80ee77fea 100644 (file)
@@ -42,8 +42,8 @@ if (!defined('__SECURITY')) {
 
 // Filter for adding booking record
 function FILTER_ADD_BOOKING_RECORD ($filterData) {
 
 // Filter for adding booking record
 function FILTER_ADD_BOOKING_RECORD ($filterData) {
-       // Add a record
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+       // Add a record
        addBookingRecord($filterData['subject'], $filterData['userid'], $filterData['points'], $filterData['points_mode']);
 
        // Return data
        addBookingRecord($filterData['subject'], $filterData['userid'], $filterData['points'], $filterData['points_mode']);
 
        // Return data
@@ -51,5 +51,16 @@ function FILTER_ADD_BOOKING_RECORD ($filterData) {
        return $filterData;
 }
 
        return $filterData;
 }
 
+// Filter for adding member action
+function FILTER_ADD_BOOKING_MEMBER_ACTION ($filterData) {
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+       // Add entry
+       array_push($filterData, 'list_booking');
+
+       // Return data
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+       return $filterData;
+}
+
 // [EOF]
 ?>
 // [EOF]
 ?>
index 8f1bd6eb31c0442619266c695b6a5db3927f353e..77e8fed9b76692b43bc050a081dea92ac62fefce 100644 (file)
@@ -42,6 +42,9 @@ if (!defined('__SECURITY')) {
 
 // Language strings
 addMessages(array(
 
 // Language strings
 addMessages(array(
+       // Admin member 'action' links
+       'ADMIN_USER_ACTION_LINK_LIST_BOOKING' => "Kontoauszug anzeigen",
+       'ADMIN_USER_ACTION_LINK_LIST_BOOKING_TITLE' => "Zeigt den Kontoauszug des Mitgliedes an.",
 ));
 
 // [EOF]
 ));
 
 // [EOF]
index fc65a05cc83f5c60d0d5b8dc5c2df1739471a49f..51b3741a2a486e1fb5c79e8c07dcc7ede14fe891 100644 (file)
@@ -50,20 +50,26 @@ addMessages(array(
        'ADMIN_USER_ACCOUNT_NOT_SAVED' => "Mitgliedsaccount <u>nicht</u> gespeichert.",
        'ADMIN_USER_ACCOUNT_LOCKED' => "Mitgliedsaccount <span class=\"data\">%s</span> wurde gesperrt.",
        'ADMIN_USER_ACCOUNT_UNLOCKED' => "Mitgliedsaccount <span class=\"data\">%s</span> wurde freigegeben.",
        'ADMIN_USER_ACCOUNT_NOT_SAVED' => "Mitgliedsaccount <u>nicht</u> gespeichert.",
        'ADMIN_USER_ACCOUNT_LOCKED' => "Mitgliedsaccount <span class=\"data\">%s</span> wurde gesperrt.",
        'ADMIN_USER_ACCOUNT_UNLOCKED' => "Mitgliedsaccount <span class=\"data\">%s</span> wurde freigegeben.",
+
+       // Admin member 'action' links
        'ADMIN_USER_ACTION_LINK_DELETE_USER' => "Mitgliedsdaten l&ouml;schen",
        'ADMIN_USER_ACTION_LINK_DELETE_USER' => "Mitgliedsdaten l&ouml;schen",
-       'ADMIN_USER_ACTION_LINK_EDIT_USER' => "Mitgliedsdaten bearbeiten",
-       'ADMIN_USER_ACTION_LINK_LOCK_USER' => "Mitglied sperren",
-       'ADMIN_USER_ACTION_LINK_UNLOCK_USER' => "Mitglied entsperren",
-       'ADMIN_USER_ACTION_LINK_ADD_POINTS' => "{?POINTS?} aufbuchen",
-       'ADMIN_USER_ACTION_LINK_SUB_POINTS' => "{?POINTS?} abziehen",
        'ADMIN_USER_ACTION_LINK_DELETE_USER_TITLE' => "Mitglied l&ouml;schen (mit Abfrage)",
        'ADMIN_USER_ACTION_LINK_DELETE_USER_TITLE' => "Mitglied l&ouml;schen (mit Abfrage)",
+       'ADMIN_USER_ACTION_LINK_EDIT_USER' => "Mitgliedsdaten bearbeiten",
        'ADMIN_USER_ACTION_LINK_EDIT_USER_TITLE' => "Mitglied editieren",
        'ADMIN_USER_ACTION_LINK_EDIT_USER_TITLE' => "Mitglied editieren",
+       'ADMIN_USER_ACTION_LINK_LOCK_USER' => "Mitglied sperren",
        'ADMIN_USER_ACTION_LINK_LOCK_USER_TITLE' => "Mitglied sperren (mit Sperrgrund)",
        'ADMIN_USER_ACTION_LINK_LOCK_USER_TITLE' => "Mitglied sperren (mit Sperrgrund)",
-       'ADMIN_USER_ACTION_LINK_UNLOCK_USER_TITLE' => "Mitglied entsperren",
+       'ADMIN_USER_ACTION_LINK_ADD_POINTS' => "{?POINTS?} aufbuchen",
        'ADMIN_USER_ACTION_LINK_ADD_POINTS_TITLE' => "Dem Mitglied {?POINTS?} aufbuchen",
        'ADMIN_USER_ACTION_LINK_ADD_POINTS_TITLE' => "Dem Mitglied {?POINTS?} aufbuchen",
+       'ADMIN_USER_ACTION_LINK_SUB_POINTS' => "{?POINTS?} abziehen",
        'ADMIN_USER_ACTION_LINK_SUB_POINTS_TITLE' => "Dem Mitglied {?POINTS?} abziehen",
        'ADMIN_USER_ACTION_LINK_SUB_POINTS_TITLE' => "Dem Mitglied {?POINTS?} abziehen",
-       'ADMIN_USER_ACTION_LINK_CONFIRM_ACCOUNT_TITLE' => "Das Mitgliederaccount best&auml;tigen",
+       'ADMIN_USER_ACTION_LINK_UNLOCK_USER' => "Mitglied entsperren",
+       'ADMIN_USER_ACTION_LINK_UNLOCK_USER_TITLE' => "Mitglied entsperren",
        'ADMIN_USER_ACTION_LINK_CONFIRM_ACCOUNT' => "Best&auml;tigen",
        'ADMIN_USER_ACTION_LINK_CONFIRM_ACCOUNT' => "Best&auml;tigen",
+       'ADMIN_USER_ACTION_LINK_CONFIRM_ACCOUNT_TITLE' => "Das Mitgliederaccount best&auml;tigen",
+       'ADMIN_USER_ACTION_LINK_LIST_REFS' => "Referrals anzeigen",
+       'ADMIN_USER_ACTION_LINK_LIST_REFS_TITLE' => "Alle Referrals des Mitglieds auflisten",
+       'ADMIN_USER_ACTION_LINK_LIST_LINKS' => "Unbest&auml;tigte Mails",
+       'ADMIN_USER_ACTION_LINK_LIST_LINKS_TITLE' => "Alle unbest&auml;tigten Mails des Mitglieds auflisten",
 
        // Legends
        'ADMIN_CONFIG_USER_LEGEND' => "Konfiguration zur Mitgliederliste",
 
        // Legends
        'ADMIN_CONFIG_USER_LEGEND' => "Konfiguration zur Mitgliederliste",
index 129b7c6ae1822d25b510b8ef5be4951af0bce075..cfd3e318cd896fcbf174e2eaf150380de76538d5 100644 (file)
@@ -476,12 +476,18 @@ function fetchUserData ($value, $column = 'userid') {
                if (!isValidUserId($value)) {
                        // Invalid, so abort here
                        reportBug(__FUNCTION__, __LINE__, 'User id ' . $value . ' is invalid.');
                if (!isValidUserId($value)) {
                        // Invalid, so abort here
                        reportBug(__FUNCTION__, __LINE__, 'User id ' . $value . ' is invalid.');
+               } // END - if
+
+               // Unset cached values if found and different
+               if ((isCurrentUserIdSet()) && (getCurrentUserId() != $value)) {
+                       // Unset it
+                       unsetCurrentUserId();
                } elseif (isUserDataValid()) {
                        // Use cache, so it is fine
                        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'value=' . $value . ' is valid, using cache #1');
                        return true;
                } elseif (isUserDataValid()) {
                        // Use cache, so it is fine
                        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'value=' . $value . ' is valid, using cache #1');
                        return true;
-               }
-       } elseif (isUserDataValid())  {
+               } // END - if
+       } elseif (isUserDataValid()) {
                // Using cache is fine
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'value=' . $value . ' is valid, using cache #2');
                return true;
                // Using cache is fine
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'value=' . $value . ' is valid, using cache #2');
                return true;
index 495cccb3458ba81f441ad5339b6ac68f6c20d8fd..73d0de026f2ef828888290dd5d92bb77952c2ef0 100644 (file)
@@ -1090,7 +1090,7 @@ function generateMemberAdminActionLinks ($userid) {
        } // END - if
 
        // Define all main targets
        } // END - if
 
        // Define all main targets
-       $targetArray = array('del_user', 'edit_user', 'lock_user', 'add_points', 'sub_points');
+       $targetArray = runFilterChain('member_admin_actions', array('del_user', 'edit_user', 'lock_user', 'list_refs', 'list_links', 'add_points', 'sub_points'));
 
        // Get user status
        $status = getFetchedUserData('userid', $userid, 'status');
 
        // Get user status
        $status = getFetchedUserData('userid', $userid, 'status');
@@ -1098,29 +1098,29 @@ function generateMemberAdminActionLinks ($userid) {
        // Begin of navigation links
        $OUT = '[';
 
        // Begin of navigation links
        $OUT = '[';
 
-       foreach ($targetArray as $tar) {
-               $OUT .= '<span class="admin_user_link"><a href="{%url=modules.php?module=admin&amp;what=' . $tar . '&amp;userid=' . $userid . '%}" title="{--ADMIN_USER_ACTION_LINK_';
-               //* DEBUG: */ debugOutput('*' . $tar.'/' . $status.'*');
-               if (($tar == 'lock_user') && ($status == 'LOCKED')) {
+       foreach ($targetArray as $target) {
+               $OUT .= '<span class="admin_user_link"><a href="{%url=modules.php?module=admin&amp;what=' . $target . '&amp;userid=' . $userid . '%}" title="{--ADMIN_USER_ACTION_LINK_';
+               //* DEBUG: */ debugOutput('*' . $target.'/' . $status.'*');
+               if (($target == 'lock_user') && ($status == 'LOCKED')) {
                        // Locked accounts shall be unlocked
                        $OUT .= 'UNLOCK_USER';
                        // Locked accounts shall be unlocked
                        $OUT .= 'UNLOCK_USER';
-               } elseif ($tar == 'del_user') {
+               } elseif ($target == 'del_user') {
                        // @TODO Deprecate this thing
                        $OUT .= 'DELETE_USER';
                } else {
                        // All other status is fine
                        // @TODO Deprecate this thing
                        $OUT .= 'DELETE_USER';
                } else {
                        // All other status is fine
-                       $OUT .= strtoupper($tar);
+                       $OUT .= strtoupper($target);
                }
                $OUT .= '_TITLE--}">{--ADMIN_USER_ACTION_LINK_';
                }
                $OUT .= '_TITLE--}">{--ADMIN_USER_ACTION_LINK_';
-               if (($tar == 'lock_user') && ($status == 'LOCKED')) {
+               if (($target == 'lock_user') && ($status == 'LOCKED')) {
                        // Locked accounts shall be unlocked
                        $OUT .= 'UNLOCK_USER';
                        // Locked accounts shall be unlocked
                        $OUT .= 'UNLOCK_USER';
-               } elseif ($tar == 'del_user') {
+               } elseif ($target == 'del_user') {
                        // @TODO Deprecate this thing
                        $OUT .= 'DELETE_USER';
                } else {
                        // All other status is fine
                        // @TODO Deprecate this thing
                        $OUT .= 'DELETE_USER';
                } else {
                        // All other status is fine
-                       $OUT .= strtoupper($tar);
+                       $OUT .= strtoupper($target);
                }
                $OUT .= '--}</a></span>|';
        } // END - foreach
                }
                $OUT .= '--}</a></span>|';
        } // END - foreach
index 47bf5c07afd39968bd7d9c40083e76f4a079d4da..fda7b2a4c04a5ad6364d213f09f6be2162d49f63 100644 (file)
@@ -997,9 +997,7 @@ function setCurrentUserId ($userid) {
        // Is the cache from below functions different?
        if (((isset($GLOBALS['getCurrentUserId'])) && ($GLOBALS['getCurrentUserId'] != $userid)) || ((!isset($GLOBALS['current_userid'])) && (isset($GLOBALS['isCurrentUserIdSet'])))) {
                // Then unset both
        // Is the cache from below functions different?
        if (((isset($GLOBALS['getCurrentUserId'])) && ($GLOBALS['getCurrentUserId'] != $userid)) || ((!isset($GLOBALS['current_userid'])) && (isset($GLOBALS['isCurrentUserIdSet'])))) {
                // Then unset both
-               unset($GLOBALS['getCurrentUserId']);
-               unset($GLOBALS['isCurrentUserIdSet']);
-               unset($GLOBALS['isValidUserId'][$userid]);
+               unsetCurrentUserId();
        } // END - if
 
        // Set userid
        } // END - if
 
        // Set userid
@@ -1042,6 +1040,20 @@ function isCurrentUserIdSet () {
        return $GLOBALS[__FUNCTION__];
 }
 
        return $GLOBALS[__FUNCTION__];
 }
 
+// Unsets current userid
+function unsetCurrentUserId () {
+       // Do we have it set?
+       if (isset($GLOBALS['current_userid'])) {
+               // Unset this, too
+               unset($GLOBALS['isValidUserId'][$GLOBALS['current_userid']]);
+       } // END - if
+
+       // Unset all cache entries
+       unset($GLOBALS['current_userid']);
+       unset($GLOBALS['getCurrentUserId']);
+       unset($GLOBALS['isCurrentUserIdSet']);
+}
+
 // Checks whether we are debugging template cache
 function isDebuggingTemplateCache () {
        // Do we have cache?
 // Checks whether we are debugging template cache
 function isDebuggingTemplateCache () {
        // Do we have cache?