A lot fixes:
authorRoland Haeder <roland@mxchange.org>
Thu, 11 Sep 2014 18:59:44 +0000 (20:59 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 11 Sep 2014 19:01:24 +0000 (21:01 +0200)
- $_SESSION must be used, not $GLOBALS['_SESSION']
- "Cache" 'isAdmin' must be unset, not set to FALSE
- initSession() must be called before user name (including admin data) has been read from session (so? ;-) )
- Various other improvements
- TODOs.txt updated

Signed-off-by: Roland Häder <roland@mxchange.org>
DOCS/TODOs.txt
inc/load_cache.php
inc/modules/admin/admin-inc.php
inc/mysql-connect.php
inc/mysql-manager.php
inc/session-functions.php
inc/wrapper-functions.php

index 9a7a4049f4fe15a40c5d4bba34ec9ad1a5c98bcc..9a6b322db1e7746e2b5d27cc5fd293e69eda31c3 100644 (file)
@@ -1,25 +1,25 @@
 ### WARNING: THIS FILE IS AUTO-GENERATED BY ./contrib/todo-builder.sh (uid=/user=quix0r) ###
 ### DO NOT EDIT THIS FILE. ###
-./api.php:68:// @TODO Do stuff here
-./autoreg.php:62:// @TODO Add processing of request here
-./beg.php:173:                 // @TODO Opps, what is missing here???
-./cron.php:62:// @TODO Do stuff here
-./inc/classes/cachesystem.class.php:519:       // @TODO Add support for more types which break in last else-block
-./inc/config-functions.php:151:        // @TODO Make this all better... :-/
-./inc/config-functions.php:329:                                        // @TODO Call setConfigEntry() somehow
-./inc/config-functions.php:359:                // @TODO Call setConfigEntry() somehow
-./inc/daily/daily_beg.php:52:// @TODO This should be converted in a daily beg rallye
-./inc/daily/daily_birthday.php:63:// @TODO Move this out to an extension
-./inc/email-functions.php:113: * @TODO Rewrite this to an extension 'smtp'
-./inc/email-functions.php:209:// @TODO $rawUserId is currently unused
-./inc/expression-functions.php:173:// @TODO FILTER_COMPILE_CONFIG does not handle call-back functions so we handle it here again
-./inc/expression-functions.php:46:     // @TODO is escapeQuotes() enough for strings with single/double quotes?
-./inc/extensions/admins/mode-update.php:43:// @TODO Remove double tabs from all lines
-./inc/extensions/autopurge/mode-update.php:43:// @TODO Remove double tabs from all lines
-./inc/extensions/beg/mode-update.php:43:// @TODO Remove double tabs from all lines
-./inc/extensions/bonus/mode-update.php:43:// @TODO Remove double tabs from all lines
-./inc/extensions/doubler/mode-setup.php:43:// @TODO Remove double tabs from all lines
-./inc/extensions/doubler/mode-update.php:43:// @TODO Remove double tabs from all lines
+./api.php:63:// @TODO Do stuff here
+./autoreg.php:57:// @TODO Add processing of request here
+./beg.php:168:                 // @TODO Opps, what is missing here???
+./cron.php:57:// @TODO Do stuff here
+./inc/classes/cachesystem.class.php:511:       // @TODO Add support for more types which break in last else-block
+./inc/config-functions.php:146:        // @TODO Make this all better... :-/
+./inc/config-functions.php:324:                                        // @TODO Call setConfigEntry() somehow
+./inc/config-functions.php:354:                // @TODO Call setConfigEntry() somehow
+./inc/daily/daily_beg.php:47:// @TODO This should be converted in a daily beg rallye
+./inc/daily/daily_birthday.php:58:// @TODO Move this out to an extension
+./inc/email-functions.php:108: * @TODO Rewrite this to an extension 'smtp'
+./inc/email-functions.php:204:// @TODO $rawUserId is currently unused
+./inc/expression-functions.php:168:// @TODO FILTER_COMPILE_CONFIG does not handle call-back functions so we handle it here again
+./inc/expression-functions.php:41:     // @TODO is escapeQuotes() enough for strings with single/double quotes?
+./inc/extensions/admins/mode-update.php:38:// @TODO Remove double tabs from all lines
+./inc/extensions/autopurge/mode-update.php:38:// @TODO Remove double tabs from all lines
+./inc/extensions/beg/mode-update.php:38:// @TODO Remove double tabs from all lines
+./inc/extensions/bonus/mode-update.php:38:// @TODO Remove double tabs from all lines
+./inc/extensions/doubler/mode-setup.php:38:// @TODO Remove double tabs from all lines
+./inc/extensions/doubler/mode-update.php:38:// @TODO Remove double tabs from all lines
 ./inc/extensions/ext-html_mail.php:91:         // @TODO Move these arrays into config
 ./inc/extensions/ext-menu.php:52:              // @TODO Convert menu-Id to one coding-standard. admin(edit|_add) => admin_menu_(edit|add), mem(edit|_add) => (edit|add)_(admin|guest|member)_menu
 ./inc/extensions/ext-newsletter.php:218:               // @TODO Move these into configuration
 ./inc/extensions/ext-top10.php:50:// @TODO Only deprecated when 'ext-ranking' is ready: setExtensionDeprecated('Y');
 ./inc/extensions/ext-yoomedia.php:120:         // @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/forced/mode-setup.php:43:// @TODO Remove double tabs from all lines
-./inc/extensions-functions.php:2239:                   // @TODO Is this really neccessary?
-./inc/extensions-functions.php:2296:// @TODO This should be rewrittten to allow, more development states, e.g. 'planing','alpha','beta','beta2','stable'
-./inc/extensions-functions.php:439:    // @TODO This redirect is still needed to register sql_patches! Please try to avoid it
-./inc/extensions-functions.php:455:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) )
-./inc/extensions-functions.php:595:            // @TODO Extension is loaded, what next?
-./inc/extensions/grade/mode-setup.php:43:// @TODO Remove double tabs from all lines
-./inc/extensions/html_mail/mode-update.php:43:// @TODO Remove double tabs from all lines
-./inc/extensions/network/mode-setup.php:18: * @TODO ADCocktail: All request parameters, BIDausKAS, WIDausKAS???    *
-./inc/extensions/network/mode-setup.php:19: * @TODO ADCocktail: Zero array element is return code!                 *
-./inc/extensions/network/mode-setup.php:20: * @TODO adgain.de: Textlink-View is a JavaScript URL                   *
-./inc/extensions/network/mode-setup.php:21: * @TODO ADkracher: Textlink-View is a JavaScript URL                   *
-./inc/extensions/network/mode-setup.php:22: * @TODO Admono.de: highforcedbanner, traffic from abroad               *
-./inc/extensions/network/mode-setup.php:23: * @TODO Ads-AbisZ: HighForced banner, mini layer                       *
-./inc/extensions/network/mode-setup.php:24: * @TODO Ads-Im-Netz: All APIs provide URLs/JavaScripts                 *
-./inc/extensions/network/mode-setup.php:25: * @TODO Ads4Clicks: Some has JavaScript as output code, high forced    *
-./inc/extensions/network/mode-setup.php:26: * @TODO Affiliblatt: Layer requires script in head                     *
-./inc/extensions/network/mode-setup.php:27: * @TODO Affiliblatt: Textlinks, popup, popunder, HTML mail, lead       *
-./inc/extensions/network/mode-setup.php:28: * @TODO AllAds4You: Traffic from abroad, High-Forced banner            *
-./inc/extensions/network/mode-setup.php:29: * @TODO Earn4Webbis: HighForced banner, page peel, mini layer          *
-./inc/extensions/network/mode-setup.php:30: * @TODO FuCoExSponsor: Textlink-View is JavaScript!                    *
-./inc/extensions/network/mode-setup.php:31: * @TODO Fusion-Ads: Has click/banner URL in API response               *
-./inc/extensions/network/mode-setup.php:32: * @TODO GeldSponsor.de Requires ID card copy/business reg.             *
-./inc/extensions/network/mode-setup.php:33: * @TODO GolloX: Please add full support                                *
-./inc/extensions/network/mode-setup.php:34: * @TODO LoseAds: HighForced banner, mini layer, all premium            *
-./inc/extensions/network/mode-setup.php:35: * @TODO Paid4Ad: HighForced banner, mini layer                         *
-./inc/extensions/network/mode-setup.php:36: * @TODO Sponsor-Box: HighForced banner, leader board, mini layer       *
-./inc/extensions/network/mode-setup.php:37: * @TODO Paid-4-Webmaster: leader board, mini layer                     *
-./inc/extensions/network/mode-setup.php:38: * @TODO Vario-Ads: HighForced banner, mini layer                       *
-./inc/extensions/network/mode-setup.php:39: * @TODO SuperPromo24: HighForced banner, leader board, mini/page layer *
-./inc/extensions/network/mode-setup.php:40: * @TODO SuperPromo24: Textlink view is a JavaScript                    *
-./inc/extensions/network/mode-setup.php:41: * @TODO Der Werbepartner.cc: Banner click/view is JavaScript!          *
-./inc/extensions/network/mode-setup.php:42: * @TODO Der Werbepartner.cc: Forced textlink not correct               *
-./inc/extensions/network/mode-setup.php:43: * @TODO Der Werbepartner.cc: Layer not correct                         *
-./inc/extensions/network/mode-setup.php:44: * @TODO Der Werbepartner.cc: Sky banner is JavaScript!                 *
-./inc/extensions/network/mode-setup.php:45: * @TODO Der Werbepartner.cc: Surfbar click not correct                 *
-./inc/extensions/network/mode-setup.php:46: * @TODO Der Werbepartner.cc: Textlink not correct                      *
-./inc/extensions/network/mode-setup.php:47: * @TODO Xijide: Lead/Sale (together) unsupported (no target URL)       *
-./inc/extensions/network/mode-setup.php:48: * @TODO Yoo!Media: What is LayerAd compared to Layer click?            *
-./inc/extensions/network/mode-setup.php:94:// @TODO network_type_handler is an internal name and needs documentation
-./inc/extensions/order/mode-update.php:43:// @TODO Remove double-tab from all lines
-./inc/extensions/other/mode-update.php:43:// @TODO Remove double tabs from all lines
-./inc/extensions/payout/mode-update.php:43:// @TODO Remove double tabs from all lines
-./inc/extensions/rallye/mode-update.php:43:// @TODO Remove double tabs from all lines
-./inc/extensions/register/mode-update.php:367:                         // @TODO Make configurable through web interface
-./inc/extensions/register/mode-update.php:43:// @TODO Remove double tabs from all lines
-./inc/extensions/sponsor/mode-setup.php:43:// @TODO Remove double tabs from all lines
-./inc/extensions/sql_patches/mode-update.php:43:// @TODO Remove double tabs from all lines
-./inc/extensions/surfbar/mode-setup.php:43:// @TODO Remove double tabs from all lines
-./inc/extensions/task/mode-update.php:43:// @TODO Remove double tabs from all lines
-./inc/extensions/transfer/mode-setup.php:43:// @TODO Remove double tabs from all lines
-./inc/extensions/transfer/mode-update.php:43:// @TODO Remove double tabs from all lines
-./inc/extensions/user/mode-update.php:43:// @TODO Remove double tabs from all lines
-./inc/extensions/user/mode-update.php:559:                             // @TODO Make configurable through web interface
+./inc/extensions/forced/mode-setup.php:38:// @TODO Remove double tabs from all lines
+./inc/extensions-functions.php:2234:                   // @TODO Is this really neccessary?
+./inc/extensions-functions.php:2291:// @TODO This should be rewrittten to allow, more development states, e.g. 'planing','alpha','beta','beta2','stable'
+./inc/extensions-functions.php:434:    // @TODO This redirect is still needed to register sql_patches! Please try to avoid it
+./inc/extensions-functions.php:450:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) )
+./inc/extensions-functions.php:590:            // @TODO Extension is loaded, what next?
+./inc/extensions/grade/mode-setup.php:38:// @TODO Remove double tabs from all lines
+./inc/extensions/html_mail/mode-update.php:38:// @TODO Remove double tabs from all lines
+./inc/extensions/network/mode-setup.php:13: * @TODO ADCocktail: All request parameters, BIDausKAS, WIDausKAS???    *
+./inc/extensions/network/mode-setup.php:14: * @TODO ADCocktail: Zero array element is return code!                 *
+./inc/extensions/network/mode-setup.php:15: * @TODO adgain.de: Textlink-View is a JavaScript URL                   *
+./inc/extensions/network/mode-setup.php:16: * @TODO ADkracher: Textlink-View is a JavaScript URL                   *
+./inc/extensions/network/mode-setup.php:17: * @TODO Admono.de: highforcedbanner, traffic from abroad               *
+./inc/extensions/network/mode-setup.php:18: * @TODO Ads-AbisZ: HighForced banner, mini layer                       *
+./inc/extensions/network/mode-setup.php:19: * @TODO Ads-Im-Netz: All APIs provide URLs/JavaScripts                 *
+./inc/extensions/network/mode-setup.php:20: * @TODO Ads4Clicks: Some has JavaScript as output code, high forced    *
+./inc/extensions/network/mode-setup.php:21: * @TODO Affiliblatt: Layer requires script in head                     *
+./inc/extensions/network/mode-setup.php:22: * @TODO Affiliblatt: Textlinks, popup, popunder, HTML mail, lead       *
+./inc/extensions/network/mode-setup.php:23: * @TODO AllAds4You: Traffic from abroad, High-Forced banner            *
+./inc/extensions/network/mode-setup.php:24: * @TODO Earn4Webbis: HighForced banner, page peel, mini layer          *
+./inc/extensions/network/mode-setup.php:25: * @TODO FuCoExSponsor: Textlink-View is JavaScript!                    *
+./inc/extensions/network/mode-setup.php:26: * @TODO Fusion-Ads: Has click/banner URL in API response               *
+./inc/extensions/network/mode-setup.php:27: * @TODO GeldSponsor.de Requires ID card copy/business reg.             *
+./inc/extensions/network/mode-setup.php:28: * @TODO GolloX: Please add full support                                *
+./inc/extensions/network/mode-setup.php:29: * @TODO LoseAds: HighForced banner, mini layer, all premium            *
+./inc/extensions/network/mode-setup.php:30: * @TODO Paid4Ad: HighForced banner, mini layer                         *
+./inc/extensions/network/mode-setup.php:31: * @TODO Sponsor-Box: HighForced banner, leader board, mini layer       *
+./inc/extensions/network/mode-setup.php:32: * @TODO Paid-4-Webmaster: leader board, mini layer                     *
+./inc/extensions/network/mode-setup.php:33: * @TODO Vario-Ads: HighForced banner, mini layer                       *
+./inc/extensions/network/mode-setup.php:34: * @TODO SuperPromo24: HighForced banner, leader board, mini/page layer *
+./inc/extensions/network/mode-setup.php:35: * @TODO SuperPromo24: Textlink view is a JavaScript                    *
+./inc/extensions/network/mode-setup.php:36: * @TODO Der Werbepartner.cc: Banner click/view is JavaScript!          *
+./inc/extensions/network/mode-setup.php:37: * @TODO Der Werbepartner.cc: Forced textlink not correct               *
+./inc/extensions/network/mode-setup.php:38: * @TODO Der Werbepartner.cc: Layer not correct                         *
+./inc/extensions/network/mode-setup.php:39: * @TODO Der Werbepartner.cc: Sky banner is JavaScript!                 *
+./inc/extensions/network/mode-setup.php:40: * @TODO Der Werbepartner.cc: Surfbar click not correct                 *
+./inc/extensions/network/mode-setup.php:41: * @TODO Der Werbepartner.cc: Textlink not correct                      *
+./inc/extensions/network/mode-setup.php:42: * @TODO Xijide: Lead/Sale (together) unsupported (no target URL)       *
+./inc/extensions/network/mode-setup.php:43: * @TODO Yoo!Media: What is LayerAd compared to Layer click?            *
+./inc/extensions/network/mode-setup.php:89:// @TODO network_type_handler is an internal name and needs documentation
+./inc/extensions/order/mode-update.php:38:// @TODO Remove double-tab from all lines
+./inc/extensions/other/mode-update.php:38:// @TODO Remove double tabs from all lines
+./inc/extensions/payout/mode-update.php:38:// @TODO Remove double tabs from all lines
+./inc/extensions/rallye/mode-update.php:38:// @TODO Remove double tabs from all lines
+./inc/extensions/register/mode-update.php:362:                         // @TODO Make configurable through web interface
+./inc/extensions/register/mode-update.php:38:// @TODO Remove double tabs from all lines
+./inc/extensions/sponsor/mode-setup.php:38:// @TODO Remove double tabs from all lines
+./inc/extensions/sql_patches/mode-update.php:38:// @TODO Remove double tabs from all lines
+./inc/extensions/surfbar/mode-setup.php:38:// @TODO Remove double tabs from all lines
+./inc/extensions/task/mode-update.php:38:// @TODO Remove double tabs from all lines
+./inc/extensions/transfer/mode-setup.php:38:// @TODO Remove double tabs from all lines
+./inc/extensions/transfer/mode-update.php:38:// @TODO Remove double tabs from all lines
+./inc/extensions/user/mode-update.php:38:// @TODO Remove double tabs from all lines
+./inc/extensions/user/mode-update.php:554:                             // @TODO Make configurable through web interface
 ./inc/filter/blacklist_filter.php:105: // @TODO Insert log entry
 ./inc/filter/blacklist_filter.php:116: // @TODO Insert log entry
 ./inc/filter/blacklist_filter.php:127: // @TODO Insert log entry
 ./inc/filter/bonus_filter.php:56:              // @TODO This query isn't right, it will only update if the user was for a longer time away!
 ./inc/filter/forced_filter.php:75:             // @TODO This part is unfinished
-./inc/filter-functions.php:120:        // @TODO Remove this forced removal after a year or so
+./inc/filter-functions.php:115:        // @TODO Remove this forced removal after a year or so
 ./inc/filter/order_filter.php:132:             // @TODO 200 is hard-coded here, swap it out to config + admin_config_order.tpl
-./inc/filters.php:1394:                // @TODO No banner found, output some default banner
+./inc/filters.php:1379:                // @TODO No banner found, output some default banner
 ./inc/filter/user_filter.php:279:// @TODO 0% done
 ./inc/filter/user_filter.php:289:// @TODO 0% done
-./inc/filter/wernis_filter.php:126:// @TODO 0% done
-./inc/filter/wernis_filter.php:136:// @TODO 0% done
+./inc/filter/wernis_filter.php:137:// @TODO 0% done
+./inc/filter/wernis_filter.php:147:// @TODO 0% done
 ./inc/filter/wernis_filter.php:62:// @TODO 10% done
 ./inc/filter/wernis_filter.php:80:// @TODO 10% done
 ./inc/filter/wernis_filter.php:98:// @TODO 10% done
-./inc/functions.php:1231:                      // @TODO Are these convertions still required?
-./inc/functions.php:1252:// @TODO Rewrite this function to use readFromFile() and writeToFile()
-./inc/functions.php:1556:              // @TODO This should be rewritten not to load the cache file for just checking if it is there for save removal.
-./inc/functions.php:1932:      // @TODO Find a way to cache this
-./inc/functions.php:2036:      // @TODO This is still very static, rewrite it somehow
-./inc/functions.php:2252:      // @TODO Rename column data_type to e.g. mail_status
-./inc/functions.php:2602:// @TODO cacheFiles is not yet supported
-./inc/gen_sql_patches.php:98:// @TODO Rewrite this to a filter
-./inc/header.php:66:// @TODO Find a way to not use direct module comparison
-./inc/install-functions.php:107:       // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0);
-./inc/install-functions.php:455:       // @TODO Comparing with DEFAULT_MAIN_TITLE doesn't work
+./inc/functions.php:1229:                      // @TODO Are these convertions still required?
+./inc/functions.php:1250:// @TODO Rewrite this function to use readFromFile() and writeToFile()
+./inc/functions.php:1554:              // @TODO This should be rewritten not to load the cache file for just checking if it is there for save removal.
+./inc/functions.php:1930:      // @TODO Find a way to cache this
+./inc/functions.php:2034:      // @TODO This is still very static, rewrite it somehow
+./inc/functions.php:2213:      // @TODO Rename column data_type to e.g. mail_status
+./inc/functions.php:2563:// @TODO cacheFiles is not yet supported
+./inc/gen_sql_patches.php:93:// @TODO Rewrite this to a filter
+./inc/install-functions.php:102:       // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0);
+./inc/install-functions.php:497:       // @TODO Comparing with DEFAULT_MAIN_TITLE doesn't work
 ./inc/language/de.php:1150:    // @TODO Rewrite these two constants
 ./inc/language/de.php:1166:    // @TODO Rewrite these three constants
 ./inc/language/de.php:46:      // @TODO Please sort these language elements
-./inc/language-functions.php:254:      // @TODO These are all valid languages, again hard-coded
-./inc/language/install_de.php:153:     // @TODO Move this to e.g. ext-smtp
+./inc/language-functions.php:249:      // @TODO These are all valid languages, again hard-coded
+./inc/language/install_de.php:155:     // @TODO Move this to e.g. ext-smtp
 ./inc/language/newsletter_de.php:13: * @TODO This language file is completely out-dated, please do no       *
 ./inc/language/order_de.php:71:        // @TODO Find better text
 ./inc/language/rallye_de.php:13: * @TODO Naming convention not applied for language strings             *
 ./inc/libs/wernis_functions.php:432:// @TODO Unused?
 ./inc/libs/wernis_functions.php:485:                           // @TODO Something more to do here?
 ./inc/libs/yoomedia_functions.php:108: $response = YOOMEDIA_QUERY_API('out_textmail.php', TRUE); // @TODO Ask Yoo!Media for test script
-./inc/load_config.php:75:      // @TODO Rewrite them to avoid this else block
+./inc/load_config.php:70:      // @TODO Rewrite them to avoid this else block
 ./inc/loader/load-extension.php:13: * @TODO Rewrite this whole file                                        *
-./inc/mails/doubler_mails.php:53:// @TODO Can this be rewritten to a filter?
-./inc/module-functions.php:273:                        // @TODO Nothing helped???
-./inc/module-functions.php:314:                        // @TODO Rewrite this to a filter
-./inc/modules/admin/admin-inc.php:1058:// @TODO rawUserId/content is not yet supported
-./inc/modules/admin/admin-inc.php:1083:// @TODO rawUserId/cacheFiles/content is not yet supported
-./inc/modules/admin/admin-inc.php:178:         // @TODO This and the next getCurrentAdminId() call might be moved into the templates?
-./inc/modules/admin/admin-inc.php:251:         // @TODO This can be rewritten into a filter
-./inc/modules/admin/admin-inc.php:536:// @TODO Try to rewrite this to adminAddMenuSelectionBox()
-./inc/modules/admin/admin-inc.php:883:// @TODO cacheFiles is not yet supported
+./inc/mails/doubler_mails.php:48:// @TODO Can this be rewritten to a filter?
+./inc/module-functions.php:268:                        // @TODO Nothing helped???
+./inc/module-functions.php:309:                        // @TODO Rewrite this to a filter
+./inc/modules/admin/admin-inc.php:1060:// @TODO rawUserId/content is not yet supported
+./inc/modules/admin/admin-inc.php:1085:// @TODO rawUserId/cacheFiles/content is not yet supported
+./inc/modules/admin/admin-inc.php:180:         // @TODO This and the next getCurrentAdminId() call might be moved into the templates?
+./inc/modules/admin/admin-inc.php:253:         // @TODO This can be rewritten into a filter
+./inc/modules/admin/admin-inc.php:538:// @TODO Try to rewrite this to adminAddMenuSelectionBox()
+./inc/modules/admin/admin-inc.php:885:// @TODO cacheFiles is not yet supported
 ./inc/modules/admin/overview-inc.php:176:                              // @TODO Rewrite this to a filter
 ./inc/modules/admin/overview-inc.php:285:                              // @TODO Rewrite this to something with include files and/or filter
 ./inc/modules/admin/overview-inc.php:319:                                              // @TODO This may also be rewritten to include files
 ./inc/modules/admin/what-usage.php:89: // @TODO This code is double, see loadTemplate() and loadEmailTemplate() in functions.php
 ./inc/modules/admin/what-usr_online.php:49:    // @TODO Add a filter for sponsor
 ./inc/modules/frametester.php:91:      // @TODO Rewrite this somehow
-./inc/modules/guest/what-beg.php:51:// @TODO No more needed? define('__BEG_USERID_TIMEOUT', createFancyTime(getBegUseridTimeout()));
-./inc/modules/guest/what-mediadata.php:183:// @TODO Rewrite all these if-blocks to filters
-./inc/modules/guest/what-mediadata.php:67:     // @TODO Find a better formular than this one
-./inc/modules/guest/what-rallyes.php:99:       // @TODO Reactivate this: $content['admin'] = '<a href="{%url=modules.php?module=index&amp;what=impressum&amp;id=' . $content['admin_id'] . '%}">' . $content['login'] . '</a>';
-./inc/modules/guest/what-sponsor_reg.php:293:                  // @TODO Maybe a default referral id?
-./inc/modules/guest/what-stats.php:111:                // @TODO This can be somehow rewritten
-./inc/modules/guest/what-stats.php:120:                        // @TODO This doesn't exclude tester accounts
-./inc/modules/guest/what-stats.php:83:// @TODO This can be rewritten in a dynamic include
+./inc/modules/guest/what-beg.php:46:// @TODO No more needed? define('__BEG_USERID_TIMEOUT', createFancyTime(getBegUseridTimeout()));
+./inc/modules/guest/what-mediadata.php:178:// @TODO Rewrite all these if-blocks to filters
+./inc/modules/guest/what-mediadata.php:62:     // @TODO Find a better formular than this one
+./inc/modules/guest/what-rallyes.php:94:       // @TODO Reactivate this: $content['admin'] = '<a href="{%url=modules.php?module=index&amp;what=impressum&amp;id=' . $content['admin_id'] . '%}">' . $content['login'] . '</a>';
+./inc/modules/guest/what-sponsor_reg.php:288:                  // @TODO Maybe a default referral id?
+./inc/modules/guest/what-stats.php:106:                // @TODO This can be somehow rewritten
+./inc/modules/guest/what-stats.php:115:                        // @TODO This doesn't exclude tester accounts
+./inc/modules/guest/what-stats.php:78:// @TODO This can be rewritten in a dynamic include
 ./inc/modules/member/what-beg.php:54:// @TODO Can't this be moved into EL?
 ./inc/modules/member/what-beg.php:63:// @TODO No more needed? define('__BEG_USERID_TIMEOUT', createFancyTime(getBegUseridTimeout()));
 ./inc/modules/member/what-logout.php:17: * @TODO Rewrite the code to a filter                                   *
 ./inc/modules/member/what-unconfirmed.php:235:                 // @TODO cat_id is unused
 ./inc/modules/member/what-unconfirmed.php:238:                         // @TODO This 'userid' cannot be saved because of encapsulated EL code
 ./inc/modules/order.php:71:            // @TODO Unused: timestamp
-./inc/monthly/monthly_beg.php:58:      // @TODO Rewrite these if() blocks to a filter
-./inc/monthly/monthly_bonus.php:57:    // @TODO Rewrite these if() blocks to a filter
-./inc/mysql-manager.php:1518:          // @TODO Rewrite these lines to a filter
-./inc/mysql-manager.php:1542:  // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:1858:                  // @TODO Rewrite this to a filter
-./inc/mysql-manager.php:2026:                          // @TODO If the EL sub-system can support more than one parameter, this call_user_func_array() can be avoided
-./inc/mysql-manager.php:2158:                  // @TODO Used generic 'userid' here
-./inc/mysql-manager.php:2376:// @TODO cacheFiles is not yet supported
-./inc/mysql-manager.php:408:   // @TODO Try to rewrite this to one or more functions
-./inc/mysql-manager.php:44:// @TODO Can we cache this?
-./inc/pool-functions.php:44:// @TODO "Hook" ext-html_mail into this to allow column `html_msg`
-./inc/revision-functions.php:168:// @TODO This function does also set and get in 'cache_array'
-./inc/template-functions.php:1052:                             // @TODO <label for="' . $prefix . '_' . $field . '"></<label> not working here
-./inc/template-functions.php:1107:                     // @TODO Deprecate this thing
-./inc/template-functions.php:1118:                     // @TODO Deprecate this thing
-./inc/template-functions.php:1240:     // @TODO This can be easily moved out after the merge from EL branch to this is complete
-./inc/template-functions.php:1295:             // @TODO Add a little more infos here
-./inc/template-functions.php:1694:// @TODO Lame description for this function
-./inc/template-functions.php:1716:                     // @TODO Move this in a filter
-./inc/template-functions.php:209:       * @TODO On some pages this is buggy
-./inc/template-functions.php:298:      // @TODO Remove these sanity checks if all is fine
-./inc/template-functions.php:751:                      // @TODO $userid is deprecated and should be removed from loadEmailTemplate() and replaced with $content[userid] in all templates
-./inc/wrapper-functions.php:3298:      // @TODO Find a way to not use direct module comparison
-./inc/wrapper-functions.php:583:// @TODO Do some more sanity check here
-./inc/xml-functions.php:240:   // @TODO Handle characters
-./mailid.php:123:              // @TODO Rewrite this to a filter/function
-./mailid.php:160:                                      // @TODO Rewrite this to a filter
-./mailid.php:81:// @TODO Improve check on $data['type'], empty() is not very much ...
+./inc/monthly/monthly_beg.php:53:      // @TODO Rewrite these if() blocks to a filter
+./inc/monthly/monthly_bonus.php:52:    // @TODO Rewrite these if() blocks to a filter
+./inc/mysql-manager.php:1520:          // @TODO Rewrite these lines to a filter
+./inc/mysql-manager.php:1544:  // @TODO Rewrite this to a filter
+./inc/mysql-manager.php:1860:                  // @TODO Rewrite this to a filter
+./inc/mysql-manager.php:2028:                          // @TODO If the EL sub-system can support more than one parameter, this call_user_func_array() can be avoided
+./inc/mysql-manager.php:2160:                  // @TODO Used generic 'userid' here
+./inc/mysql-manager.php:2378:// @TODO cacheFiles is not yet supported
+./inc/mysql-manager.php:39:// @TODO Can we cache this?
+./inc/mysql-manager.php:403:   // @TODO Try to rewrite this to one or more functions
+./inc/pool-functions.php:39:// @TODO "Hook" ext-html_mail into this to allow column `html_msg`
+./inc/template-functions.php:1060:                             // @TODO <label for="' . $prefix . '_' . $field . '"></<label> not working here
+./inc/template-functions.php:1115:                     // @TODO Deprecate this thing
+./inc/template-functions.php:1126:                     // @TODO Deprecate this thing
+./inc/template-functions.php:1248:     // @TODO This can be easily moved out after the merge from EL branch to this is complete
+./inc/template-functions.php:1303:             // @TODO Add a little more infos here
+./inc/template-functions.php:1702:// @TODO Lame description for this function
+./inc/template-functions.php:1724:                     // @TODO Move this in a filter
+./inc/template-functions.php:204:       * @TODO On some pages this is buggy
+./inc/template-functions.php:2501:     // @TODO Find a way to not use direct module comparison
+./inc/template-functions.php:293:      // @TODO Remove these sanity checks if all is fine
+./inc/template-functions.php:752:                      // @TODO $userid is deprecated and should be removed from loadEmailTemplate() and replaced with $content[userid] in all templates
+./inc/wrapper-functions.php:3272:      // @TODO Find a way to not use direct module comparison
+./inc/wrapper-functions.php:578:// @TODO Do some more sanity check here
+./inc/xml-functions.php:235:   // @TODO Handle characters
+./mailid.php:118:              // @TODO Rewrite this to a filter/function
+./mailid.php:155:                                      // @TODO Rewrite this to a filter
+./mailid.php:76:// @TODO Improve check on $data['type'], empty() is not very much ...
 ./templates/de/html/admin/admin_add_country.tpl:24:                    <!-- @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 //-->
 ./templates/de/html/admin/admin_config_rewrite.tpl:4:  <!-- @TODO No title here? //-->
 ./templates/de/html/member/member_list_unconfirmed_nopoints.tpl:20:            <!-- @TODO Nothing to say here? //-->
 ./templates/de/html/surfbar/surfbar_frameset.tpl:4:    // @TODO This redirect kills our own frameset
 ./templates/de/html/surfbar/surfbar_frame_textlinks.tpl:5:             <!-- @TODO These are static lines and should be replaced by a filter (see ext-network/ext-sponsor) //-->
-./js/admin-network-query-api.js:72:// @TODO Add support for checkboxes
-./js/admin-network-query-api.js:73:// @TODO Make progress window working
-./js/ajax-common.js:250:                               // @TODO Need this be secured?
-./js/ajax-common.js:288:                               // @TODO Need this be secured?
-./js/install-common.js:116:    // @TODO Progress bar is out-of-order: + '<div id="progressbar"></div>'
+./js/admin-network-query-api.js:67:// @TODO Add support for checkboxes
+./js/admin-network-query-api.js:68:// @TODO Make progress window working
+./js/ajax-common.js:245:                               // @TODO Need this be secured?
+./js/ajax-common.js:283:                               // @TODO Need this be secured?
+./js/install-common.js:111:    // @TODO Progress bar is out-of-order: + '<div id="progressbar"></div>'
 ./.htaccess:10:        # @TODO When ext-imprint is finished RewriteRule ^modules.php?module=index&what=impressum$ modules.php?module=index&what=imprint [L]
 ./.htaccess:11:        # @TODO When ext-terms is finished RewriteRule ^cms/index/wht/agb$                 modules.php?module=index&what=terms [L]
 ./.htaccess:12:        # @TODO When ext-terms is finished RewriteRule ^modules.php?module=index&what=agb$ modules.php?module=index&what=terms [L]
 ./.htaccess:13:        # @TODO When ext-terms is finished RewriteRule ^agb.php$ modules.php?module=index&what=terms [L]
 ./.htaccess:9: # @TODO When ext-imprint is finished RewriteRule ^cms/index/wht/impressum$                 modules.php?module=index&what=imprint [L]
 ### ### DEPRECATION FOLLOWS: ### ###
-./inc/modules/admin/admin-inc.php:537:// @DEPRECATED
-./inc/template-functions.php:2431:// Removes comments with @DEPRECATED
-./inc/template-functions.php:2439:             // Is there a @DEPRECATED?
-./inc/template-functions.php:2440:             if (isInString('@DEPRECATED', $line)) {
+./contrib/install_svn.php:2:// @DEPRECATED
+./inc/footer.php:2:// @DEPRECATED
+./inc/header.php:2:// @DEPRECATED
+./inc/loader/load-revision.php:2:// @DEPRECATED
+./inc/modules/admin/admin-inc.php:539:// @DEPRECATED
+./inc/revision-functions.php:2:// @DEPRECATED
+./inc/session.php:2:// @DEPRECATED
+./inc/template-functions.php:2439:// Removes comments with @DEPRECATED
+./inc/template-functions.php:2447:             // Is there a @DEPRECATED?
+./inc/template-functions.php:2448:             if (isInString('@DEPRECATED', $line)) {
+./inc/versions.php:2:// @DEPRECATED
index 76b8b4d269c81388947ebc3ab6473cdc0d502dec..08e882be963b15c34d7fb28ae16dd5a0e03b83af 100644 (file)
@@ -63,6 +63,9 @@ loadIncludePool('cache');
 // Init filter system
 initFilterSystem();
 
+// Init session
+initSession();
+
 // Init system here
 runFilterChain('init');
 
index 4a94e8f9b9fee1f1f7017f03b55e353995a7531f..d7e17155c614f4926264d3ba6f5282178509a2c9 100644 (file)
@@ -135,6 +135,8 @@ function ifAdminLoginDataIsValid ($adminLogin, $adminPassword) {
 
 // Only be executed on cookie checking
 function ifAdminCookiesAreValid ($adminLogin, $passHash) {
+       /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'adminLogin=' . $adminLogin . ',passHash=' . $passHash . ' - CALLED!');
+
        // First of all, no admin login is found
        $ret = '404';
 
@@ -145,7 +147,7 @@ function ifAdminCookiesAreValid ($adminLogin, $passHash) {
        if ($adminHash != '-1') {
                // Now, we need to encode the password in the same way the one is encoded in database
                $testHash = encodeHashForCookie($adminHash);
-               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'adminLogin=' . $adminLogin . ',passHash='.$passHash.',adminHash='.$adminHash.',testHash='.$testHash);
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'adminLogin=' . $adminLogin . ',passHash='.$passHash.',adminHash='.$adminHash.',testHash='.$testHash);
 
                // If they both match, the login data is valid
                if ($testHash != $passHash) {
@@ -161,7 +163,7 @@ function ifAdminCookiesAreValid ($adminLogin, $passHash) {
        } // END - if
 
        // Return status
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ret='.$ret);
+       /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ret=' . $ret . ' - EXIT!');
        return $ret;
 }
 
index d3c8afd80de9953d1bb5d211368738cba41b7527..3514b82a4b5cab5e7796fdc1456a14307f497b25 100644 (file)
@@ -110,9 +110,6 @@ if ((!isInstaller()) && (isInstalled())) {
 
        // Initialize SQL link
        initSqlLink();
-
-       // Init session
-       initSession();
 } else {
        // Default output is 'direct' for HTML output
        setConfigEntry('OUTPUT_MODE', 'direct');
index 619b58c9ee068b839b6a038cae059c8a52f56c43..ccda58a7a7ae4fafcdaae85e3a8e4147267c41e2 100644 (file)
@@ -567,16 +567,20 @@ function fetchUserData ($value, $column = 'userid') {
  * login.
  */
 function isAdmin () {
+       //* DIE: */ reportBug(__FUNCTION__, __LINE__, 'CALLED!');
+       /* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'CALLED!');
+
        // Is there cache?
        if (isset($GLOBALS[__FUNCTION__])) {
                // Return it
-               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isAdmin()=' . intval($GLOBALS[__FUNCTION__]));
+               /* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isAdmin()=' . intval($GLOBALS[__FUNCTION__]) . ' - CACHED!');
                return $GLOBALS[__FUNCTION__];
        } // END - if
 
-       // No admin in installation phase!
        if ((isInstaller()) || (!isAdminRegistered())) {
+               // No admin in installation phase!
                $GLOBALS[__FUNCTION__] = FALSE;
+               //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isAdmin()=' . intval($GLOBALS[__FUNCTION__]) . ' - INSTALLER!');
                return FALSE;
        } // END - if
 
@@ -584,20 +588,23 @@ function isAdmin () {
        $ret = FALSE;
        $adminId = '0';
        $passwordFromCookie = '';
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, $adminId);
 
        // If admin login is not given take current from cookies...
+       /* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isSessionVariableSet(admin_id)=' . intval(isSessionVariableSet('admin_id')) . ',isSessionVariableSet(admin_md5)=' . intval(isSessionVariableSet('admin_md5')));
        if ((isSessionVariableSet('admin_id')) && (isSessionVariableSet('admin_md5'))) {
+               // Debug message
+               /* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Getting admin data from session ...');
+
                // Get admin login and password from session/cookies
                $adminId            = getCurrentAdminId();
                $passwordFromCookie = getAdminMd5();
        } // END - if
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'adminId=' . $adminId . ',passwordFromCookie=' . $passwordFromCookie);
+       /* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'adminId=' . $adminId . ',passwordFromCookie=' . $passwordFromCookie);
 
        // Abort if admin id is zero
        if (($adminId == '0') || (empty($passwordFromCookie))) {
                // A very noisy debug message ...
-               //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Current adminId is zero. isSessionVariableSet(admin_id)=' . intval(isSessionVariableSet('admin_id')) . ',isSessionVariableSet(admin_md5)=' . intval(isSessionVariableSet('admin_md5')));
+               /* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Current adminId is zero. isSessionVariableSet(admin_id)=' . intval(isSessionVariableSet('admin_id')) . ',isSessionVariableSet(admin_md5)=' . intval(isSessionVariableSet('admin_md5')));
 
                // Abort here now
                $GLOBALS[__FUNCTION__] = FALSE;
@@ -610,26 +617,26 @@ function isAdmin () {
        // Search in array for entry
        if (isset($GLOBALS['admin_hash'])) {
                // Use cached string
-               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Using admin_hash=' . $GLOBALS['admin_hash'] . ' from cache');
+               /* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Using admin_hash=' . $GLOBALS['admin_hash'] . ' from cache');
        } elseif ((!empty($adminId)) && (!empty($passwordFromCookie)) && (isAdminHashSet($adminId) === TRUE)) {
                // Get admin hash and hash it
                $GLOBALS['admin_hash'] = encodeHashForCookie(getAdminHash($adminId));
-               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'valPass=' . $GLOBALS['admin_hash']);
+               /* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'valPass=' . $GLOBALS['admin_hash']);
 
                // Count cache hits
                incrementStatsEntry('cache_hits');
        } elseif ((!empty($adminId)) && ((!isExtensionActive('cache')) || (isAdminHashSet($adminId) === FALSE))) {
                // Get admin hash and hash it
                $GLOBALS['admin_hash'] = encodeHashForCookie(getAdminHash($adminId));
-               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'valPass=' . $GLOBALS['admin_hash']);
+               /* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'valPass=' . $GLOBALS['admin_hash']);
        }
 
        // Check if password is valid
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, '(' . $GLOBALS['admin_hash'] . '==' . $passwordFromCookie . ')='.intval($GLOBALS['admin_hash'] == $passwordFromCookie));
+       /* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, '(' . $GLOBALS['admin_hash'] . '==' . $passwordFromCookie . ')='.intval($GLOBALS['admin_hash'] == $passwordFromCookie));
        $GLOBALS[__FUNCTION__] = ((!empty($GLOBALS['admin_hash'])) && ($GLOBALS['admin_hash'] == $passwordFromCookie));
 
        // Return result of comparision
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isAdmin()=' . intval($GLOBALS[__FUNCTION__]));
+       /* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isAdmin()=' . intval($GLOBALS[__FUNCTION__]));
        return $GLOBALS[__FUNCTION__];
 }
 
index 8f2ec9e9ec6c8da9a6fa731dff6309d6f74024cf..8feefa3302c17793a901c93630028fd90add42fb 100644 (file)
@@ -39,6 +39,7 @@ if (!defined('__SECURITY')) {
 function setSession ($var, $value) {
        // Abort in CSS mode here
        if (isCssOutputMode()) {
+               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Is CSS mode:' . $var . '=' . $value);
                return TRUE;
        } // END - if
 
@@ -50,7 +51,7 @@ function setSession ($var, $value) {
        if (('' . $value . '' == '') && (isSessionVariableSet($var))) {
                // Remove the session
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'UNSET:' . $var . '=' . getSession($var));
-               unset($GLOBALS['_SESSION'][$var]);
+               unset($_SESSION[$var]);
                if (isPhpVersionEqualNewer('5.3.0')) {
                        // session_unregister() is deprecated as of 5.3.0
                        return TRUE;
@@ -61,7 +62,7 @@ function setSession ($var, $value) {
        } elseif (('' . $value . '' != '') && (!isSessionVariableSet($var))) {
                // Set session
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'SET:' . $var . '=' . $value);
-               $GLOBALS['_SESSION'][$var] = $value;
+               $_SESSION[$var] = $value;
                if (isPhpVersionEqualNewer('5.3.0')) {
                        // session_unregister() is deprecated as of 5.3.0
                        return TRUE;
@@ -72,7 +73,7 @@ function setSession ($var, $value) {
        } elseif (!empty($value)) {
                // Update session
                //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'UPDATE:' . $var . '=' . $value);
-               $GLOBALS['_SESSION'][$var] = $value;
+               $_SESSION[$var] = $value;
                return TRUE;
        }
 
@@ -84,11 +85,12 @@ function setSession ($var, $value) {
 // Check whether a session variable is set
 function isSessionVariableSet ($var) {
        // Warning: DO NOT call logDebugMessage() from here, this will cause an endless loop
-       return (isset($GLOBALS['_SESSION'][$var]));
+       return (isset($_SESSION[$var]));
 }
 
 // Returns whether the value of the session variable or NULL if not set
 function getSession ($var) {
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'var=' . $var . ' - CALLED!');
        // Default is not found ;-)
        $value = NULL;
 
@@ -97,22 +99,22 @@ function getSession ($var) {
                // Then  get it secured!
                if ((isInstaller()) || (!isSqlLinkUp())) {
                        // Secure string without escaping (and compiling)
-                       $value = secureString($GLOBALS['_SESSION'][$var]);
+                       $value = secureString($_SESSION[$var]);
                } else {
                        // Escape string with SQL driver
-                       $value = sqlEscapeString($GLOBALS['_SESSION'][$var]);
+                       $value = sqlEscapeString($_SESSION[$var]);
                }
        } // END - if
 
        // Return the value
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, $var . '=' . $value);
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, $var . '=' . $value . ' - EXIT!');
        return $value;
 }
 
 // Get whole session array
 function getSessionArray () {
        // Simply return it
-       return $GLOBALS['_SESSION'];
+       return $_SESSION;
 }
 
 // Destroy user session
@@ -136,8 +138,8 @@ function destroyAdminSession ($destroy = FALSE) {
        setAdminMd5('');
        setAdminLast(0);
 
-       // Set cache to FALSE
-       $GLOBALS['isAdmin'] = FALSE;
+       // Remove "cache"
+       unset($GLOBALS['isAdmin']);
 
        // Destroy session if requested and return status
        if ($destroy === TRUE) {
@@ -200,8 +202,11 @@ function initSession () {
        // Is a session id there?
        if (!isValidSession()) {
                // Start the session
+               //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Initializing session ...');
                $GLOBALS['valid_session']  = session_start();
                $GLOBALS['isValidSession'] = TRUE;
+
+               //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'session_id=' . session_id());
        } // END - if
 
        //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'EXIT!');
index 9cc88986eb5139d470d09d8fa3e447a8d0f05b9f..a2056a92461246f82e8a23530f7eada900468315 100644 (file)
@@ -999,6 +999,9 @@ function setAdminMd5 ($adminMd5) {
        // Set session
        $status = setSession('admin_md5', $adminMd5);
 
+       // Remove cache to get correct results
+       unset($GLOBALS['isAdmin']);
+
        // Return status
        return $status;
 }