./inc/extensions/ext-html_mail.php:140: // @TODO Move these arrays into config
./inc/extensions/ext-newsletter.php:215: // @TODO Move these into configuration
./inc/extensions/ext-rallye.php:329: // @TODO Move this code into rallye_functions.php
-./inc/extensions/ext-sql_patches.php:725: // @TODO Rewrite this to a filter!
+./inc/extensions/ext-sql_patches.php:725: // @TODO Rewrite this to a filter
./inc/extensions/ext-sql_patches.php:94: /* @TODO SQL_ALTER_TABLE() should work now properly
./inc/extensions/ext-yoomedia.php:122: // @TODO Can this be moved into a database table?
./inc/extensions/ext-yoomedia.php:55:// @TODO Only deprecated when 'network' is ready! setExtensionDeprecated('Y');
./inc/libs/surfbar_functions.php:954: // @TODO Invalid salt should be refused
./inc/libs/task_functions.php:244: // @TODO These can be rewritten to filter
./inc/libs/task_functions.php:52:// @TODO Move all extension-dependent queries into filters
+./inc/libs/theme_functions.php:218:// @TODO Move this code block into a filter and register it with 'init'
./inc/libs/user_functions.php:137: // @TODO These two constants are no longer used, maybe we reactivate this code?
./inc/libs/user_functions.php:317: // @TODO Make this filter working: $ADDON = runFilterChain('post_login_update', $content);
./inc/libs/user_functions.php:342: // @TODO Make this filter working: $URL = runFilterChain('do_login', array('content' => $content, 'addon' => $ADDON));
./inc/modules/guest/what-mediadata.php:182:// @TODO Rewrite all these if-blocks to filters
./inc/modules/guest/what-mediadata.php:69: // @TODO Find a better formular than this one
./inc/modules/guest/what-rallyes.php:90: // @TODO Reactivate this: $content['admin'] = "<a href=\"{?URL?}/modules.php?module=index&what=impressum&admin=".$adminId."\">".$login."</a>";
-./inc/modules/guest/what-register.php:196: // @TODO Rewrite these all to a single filter
-./inc/modules/guest/what-register.php:274: // @TODO Rewrite this to a filter
-./inc/modules/guest/what-register.php:290: // @TODO Rewrite this to addPointsDirectly()
+./inc/modules/guest/what-register.php:198: // @TODO Rewrite these all to a single filter
+./inc/modules/guest/what-register.php:276: // @TODO Rewrite this to a filter
+./inc/modules/guest/what-register.php:292: // @TODO Rewrite this to addPointsDirectly()
./inc/modules/guest/what-sponsor_infos.php:69: // @TODO Rewritings: conv->conv_rate,name->conv_name in template
./inc/modules/guest/what-sponsor_infos.php:89: // @TODO Rewritings: name->pay_name,min->pay_min_count,min->pay_min_count,curr->pay_currency
./inc/modules/guest/what-sponsor_reg.php:286: // @TODO Swap this HTML code to templates
$cnt = 0;
// Compile and run finished rendered HTML code
- while (((strpos($GLOBALS['output'], '{!') > 0) || (strpos($GLOBALS['output'], '{?') > 0)) && ($cnt < 3)) {
+ while (((strpos($GLOBALS['output'], '{--') > 0) || (strpos($GLOBALS['output'], '{!') > 0) || (strpos($GLOBALS['output'], '{?') > 0)) && ($cnt < 3)) {
// Prepare the content and eval() it...
$content = array();
$newContent = '';
return $name;
}
-// Initialize variables
-$GLOBALS['curr_theme'] = getCurrentTheme();
-
+// @TODO Move this code block into a filter and register it with 'init'
// Check if new theme is selcted
-if ((isPostRequestElementSet('new_theme')) && (postRequestElement('new_theme') != $GLOBALS['curr_theme'])) {
+if ((isPostRequestElementSet('new_theme')) && (postRequestElement('new_theme') != getCurrentTheme())) {
// Set new theme for guests
$newTheme = postRequestElement('new_theme');
setTheme($newTheme);
// Remove current from array
- removeIncludeFromPool('theme', sprintf("theme/%s/theme.php", $GLOBALS['curr_theme']));
+ removeIncludeFromPool('theme', sprintf("theme/%s/theme.php", getCurrentTheme()));
// Add new theme
addIncludeToPool('theme', sprintf("theme/%s/theme.php", $newTheme));
setTheme($postData['default_theme']);
// Set it in config and current theme as well
- $GLOBALS['curr_theme'] = $postData['default_theme'];
setConfigEntry('default_theme', $postData['default_theme']);
// Save theme
if (isExtensionActive('theme')) {
// Login failures are supported since 0.4.7
// Do we have 0.4.7 of sql_patches or later?
+ // @TODO Rewrite this into a filter
$add = '';
if (getExtensionVersion('sql_patches') >= '0.6.1') {
// Load them here
// Remmeber login failures if available
if (getExtensionVersion('sql_patches') >= '0.6.1') {
// Reset login failures
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data`
-SET `login_failures`=0, `last_failure`='0000-00-00 00:00:00'
-WHERE `userid`=%s
+ SQL_QUERY_ESC("UPDATE
+ `{?_MYSQL_PREFIX?}_user_data`
+SET
+ `login_failures`=0,
+ `last_failure`='0000-00-00 00:00:00'
+WHERE
+ `userid`=%s
LIMIT 1",
array(getUserId()), __FILE__, __LINE__);
$bonus = false;
if ((getExtensionVersion('sql_patches') >= '0.2.8') && (getExtensionVersion('bonus') >= '0.2.1') && (getConfig('bonus_login_yn') == 'Y')) {
// Update last login if far enougth away
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data`
-SET `last_login`=UNIX_TIMESTAMP()
-WHERE `userid`=%s AND `last_login` < (UNIX_TIMESTAMP() - %s)
+ SQL_QUERY_ESC("UPDATE
+ `{?_MYSQL_PREFIX?}_user_data`
+SET
+ `last_login`=UNIX_TIMESTAMP()
+WHERE
+ `userid`=%s AND
+ `last_login` < (UNIX_TIMESTAMP() - %s)
LIMIT 1",
- array(
- getUserId(),
- getConfig('login_timeout')
- ), __FILE__, __LINE__
+ array(
+ getUserId(),
+ getConfig('login_timeout')
+ ), __FILE__, __LINE__
);
if (SQL_AFFECTEDROWS() == 1) $bonus = true;
} // END - if
if (destroyUserSession()) {
// Remove theme cookie as well
- setTheme();
+ setTheme('');
// Logout completed
$URL .= getCode('LOGOUT_DONE');