- 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
./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?
./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 //-->
// 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
// 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
// Filter for adding booking record
function FILTER_ADD_BOOKING_RECORD ($filterData) {
// Filter for adding booking record
function FILTER_ADD_BOOKING_RECORD ($filterData) {
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
addBookingRecord($filterData['subject'], $filterData['userid'], $filterData['points'], $filterData['points_mode']);
// Return data
addBookingRecord($filterData['subject'], $filterData['userid'], $filterData['points'], $filterData['points_mode']);
// Return data
+// 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;
+}
+
// 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.",
'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öschen",
'ADMIN_USER_ACTION_LINK_DELETE_USER' => "Mitgliedsdaten lö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öschen (mit Abfrage)",
'ADMIN_USER_ACTION_LINK_DELETE_USER_TITLE' => "Mitglied lö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ä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ätigen",
'ADMIN_USER_ACTION_LINK_CONFIRM_ACCOUNT' => "Bestätigen",
+ 'ADMIN_USER_ACTION_LINK_CONFIRM_ACCOUNT_TITLE' => "Das Mitgliederaccount bestä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ätigte Mails",
+ 'ADMIN_USER_ACTION_LINK_LIST_LINKS_TITLE' => "Alle unbestätigten Mails des Mitglieds auflisten",
// Legends
'ADMIN_CONFIG_USER_LEGEND' => "Konfiguration zur Mitgliederliste",
// Legends
'ADMIN_CONFIG_USER_LEGEND' => "Konfiguration zur Mitgliederliste",
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;
} // 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');
// 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&what=' . $tar . '&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&what=' . $target . '&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
// 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]);
} // END - if
// Set userid
} // END - if
// Set userid
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?