]> git.mxchange.org Git - mailer.git/commitdiff
Fix for displayed message strings in chk_login module
authorRoland Häder <roland@mxchange.org>
Wed, 28 Oct 2009 20:52:34 +0000 (20:52 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 28 Oct 2009 20:52:34 +0000 (20:52 +0000)
DOCS/TODOs.txt
inc/functions.php
inc/libs/theme_functions.php
inc/modules/admin/what-theme_edit.php
inc/modules/chk_login.php
inc/modules/member/what-logout.php

index 0e69ce018b25b6d07fcab1c4e75e600ef94f979f..78a6d39130eae5d5a39dfd5cebdafcbf99a7a5f9 100644 (file)
@@ -9,7 +9,7 @@
 ./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');
@@ -54,6 +54,7 @@
 ./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&amp;what=impressum&amp;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
index dbfe8b3674c61462da52e9a6700cb67944d6cb23..de59b2e8e42fc420fb9e402b63ae5f7db49db69d 100644 (file)
@@ -123,7 +123,7 @@ function outputHtml ($htmlCode, $newLine = true) {
                $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 = '';
index 1cac6e877e81a1032208233916d35cfd88170e14..64dbda3d65b4058763a5f26b5be92403f0e144e2 100644 (file)
@@ -215,11 +215,9 @@ function getCurrentThemeName () {
        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');
 
@@ -227,7 +225,7 @@ if ((isPostRequestElementSet('new_theme')) && (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));
index da8e61225e716bde5a7a75eeef389070666c79ee..c768b1eae061f478e1a6b5d52dbf13a93af026da 100644 (file)
@@ -91,7 +91,6 @@ if ($SEL > 0) {
        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
index 526da23c4d86f75eefee601d38d57f1e67494717..bf3ac6071379f57c82e2a86268428c2ce8868075 100644 (file)
@@ -49,6 +49,7 @@ if (isUserIdSet() && (isSessionVariableSet('u_hash'))) {
        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
@@ -71,9 +72,13 @@ if (isUserIdSet() && (isSessionVariableSet('u_hash'))) {
                // 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__);
 
@@ -87,14 +92,18 @@ LIMIT 1",
        $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
index ff32b7155d2eb76102e9b9efcaefa7fe26b536a6..5f3c4ce5637ee987ff98813096b0dd24b65474b4 100644 (file)
@@ -48,7 +48,7 @@ $URL = 'modules.php?module=index&amp;code=';
 
 if (destroyUserSession()) {
        // Remove theme cookie as well
-       setTheme();
+       setTheme('');
 
        // Logout completed
        $URL .= getCode('LOGOUT_DONE');