From: Roland Häder Date: Sun, 8 Feb 2009 17:49:42 +0000 (+0000) Subject: Some typos fixed X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3608f72d51e8126720024704398cf738e61f890b;p=mailer.git Some typos fixed --- diff --git a/inc/databases.php b/inc/databases.php index 308c476b9b..e5f4fe0c0b 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -97,7 +97,7 @@ define('START_TDAY', MAKE_TIME(0, 0, 0, time())); define('SERVER_URL', "http://www.mxchange.org"); // Current SVN revision -define('CURR_SVN_REVISION', "721"); +define('CURR_SVN_REVISION', "722"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/extensions.php b/inc/extensions.php index 7be85ad111..b6793eacac 100644 --- a/inc/extensions.php +++ b/inc/extensions.php @@ -140,7 +140,7 @@ function EXTENSION_REGISTER ($ext_name, $task_id, $dry_run = false, $logout = tr $NOTES = ""; $INC_POOL = array(); - // By default we have no failtures + // By default we have no failures $EXT_REPORTS_FAILURE = false; // Does this extension exists? @@ -205,7 +205,7 @@ function EXTENSION_REGISTER ($ext_name, $task_id, $dry_run = false, $logout = tr // Switch back to register mode $EXT_LOAD_MODE = "register"; - // Remains true if extension registration reports no failtures + // Remains true if extension registration reports no failures $test = ($test && !$EXT_REPORTS_FAILURE); // Does everthing before wents ok? diff --git a/inc/extensions/ext-admins.php b/inc/extensions/ext-admins.php index 598516e96c..25d50767ae 100644 --- a/inc/extensions/ext-admins.php +++ b/inc/extensions/ext-admins.php @@ -38,13 +38,13 @@ if (!defined('__SECURITY')) { } // Version of this extension -$EXT_VERSION = "0.7.1"; +$EXT_VERSION = "0.7.2"; // Auto-set extension version if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION; // Version history array (add more with , "0.1" and so on) -$EXT_VER_HISTORY = array("0.0", "0.1", "0.2", "0.3", "0.3.1", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5", "0.4.6", "0.4.7", "0.4.8", "0.4.9", "0.5.0", "0.5.1", "0.5.2", "0.5.3", "0.5.4", "0.5.5", "0.5.6", "0.5.7", "0.5.8", "0.5.9", "0.6.0", "0.6.1", "0.6.2", "0.6.3", "0.6.4", "0.6.5", "0.6.6", "0.6.7", "0.6.8", "0.6.9", "0.7.0", "0.7.1"); +$EXT_VER_HISTORY = array("0.0", "0.1", "0.2", "0.3", "0.3.1", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5", "0.4.6", "0.4.7", "0.4.8", "0.4.9", "0.5.0", "0.5.1", "0.5.2", "0.5.3", "0.5.4", "0.5.5", "0.5.6", "0.5.7", "0.5.8", "0.5.9", "0.6.0", "0.6.1", "0.6.2", "0.6.3", "0.6.4", "0.6.5", "0.6.6", "0.6.7", "0.6.8", "0.6.9", "0.7.0", "0.7.1", "0.7.2"); switch ($EXT_LOAD_MODE) { @@ -279,11 +279,8 @@ PRIMARY KEY (id) break; case "0.7.0": // SQL queries for v0.7.0 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins ADD login_failtures BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins ADD last_failture TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'"; - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlgeschlagene Login-Versuche werden nun mitgezählt und der letzte vermerkt."; + $UPDATE_NOTES = "Veraltetes Update."; break; case "0.7.1": // SQL queries for v0.7.1 @@ -296,6 +293,16 @@ PRIMARY KEY (id) // Update notes (these will be set as task text!) $UPDATE_NOTES = "Filter hinzugefügt und ist von sql_patches abhängig."; break; + + case "0.7.2": // SQL queries for v0.7.2 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins DROP login_failtures"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins DROP last_failture"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins ADD login_failures BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins ADD last_failure TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Schreibweise korregiert."; + break; } break; diff --git a/inc/extensions/ext-sql_patches.php b/inc/extensions/ext-sql_patches.php index 92bd67f760..99e1111bd8 100644 --- a/inc/extensions/ext-sql_patches.php +++ b/inc/extensions/ext-sql_patches.php @@ -38,13 +38,13 @@ if (!defined('__SECURITY')) { } // Version number -$EXT_VERSION = "0.6.0"; +$EXT_VERSION = "0.6.1"; // Auto-set extension version if (!isset($EXT_VER)) $EXT_VER = $EXT_VERSION; // Version history array (add more with , "0.1" and so on) -$EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5", "0.4.6", "0.4.7", "0.4.8", "0.4.9", "0.5.0", "0.5.1", "0.5.2", "0.5.3", "0.5.4", "0.5.5", "0.5.6", "0.5.7", "0.5.8", "0.5.9", "0.6.0"); +$EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "0.1.0", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1.5", "0.1.6", "0.1.7", "0.1.8", "0.1.9", "0.2.0", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5", "0.4.6", "0.4.7", "0.4.8", "0.4.9", "0.5.0", "0.5.1", "0.5.2", "0.5.3", "0.5.4", "0.5.5", "0.5.6", "0.5.7", "0.5.8", "0.5.9", "0.6.0", "0.6.1"); switch ($EXT_LOAD_MODE) { @@ -587,11 +587,8 @@ PRIMARY KEY (id) break; case "0.4.7": // SQL queries for v0.4.7 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD login_failtures BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD last_failture TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'"; - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlgeschlagene Login-Versuche werden nun mitgezählt und der letzte vermerkt."; + $UPDATE_NOTES = "Veraltetes Update."; break; case "0.4.8": // SQL queries for v0.4.8 @@ -710,6 +707,16 @@ PRIMARY KEY (`filter_id`) // Update notes (these will be set as task text!) $UPDATE_NOTES = "Benutzungsstatistik eingebaut. Das Zählen der Filterverwendungen sollte ausschliesslich zu Debugging-Zwecken eingesetzt werden."; break; + + case "0.6.1": // SQL queries for v0.6.1 + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` DROP login_failtures"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` DROP last_failture"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD login_failures BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD last_failure TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Falsche Schreibweise korregiert."; + break; } break; diff --git a/inc/filters.php b/inc/filters.php index bd4fd26d06..a1253c107a 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -105,7 +105,7 @@ ORDER BY `filter_id` ASC", __FILE__, __LINE__); // Init filters REGISTER_FILTER('init', 'UPDATE_LOGIN_DATA'); - // Login failtures handler + // Login failures handler REGISTER_FILTER('post_youhere_line', 'CALL_HANDLER_LOGIN_FAILTURES'); // Filters for pre-extension-registration @@ -322,7 +322,7 @@ function FILTER_FLUSH_FILTERS () { RUN_FILTER('run_sqls', array('dry_run' => false, 'sqls' => $SQLs)); } -// Filter for calling the handler for login failtures +// Filter for calling the handler for login failures function FILTER_CALL_HANDLER_LOGIN_FAILTURES ($data) { // Init content $content = $data; @@ -330,7 +330,7 @@ function FILTER_CALL_HANDLER_LOGIN_FAILTURES ($data) { // Handle failed logins here if not in guest //* DEBUG: */ print __FUNCTION__."(".__LINE__."):type={$data['type']},action={$GLOBALS['action']},what={$GLOBALS['what']},lvl={$data['access_level']}
\n"; if ((($data['type'] == "what") || ($data['type'] == "action") && ((!isset($GLOBALS['what'])) || ($GLOBALS['what'] == "overview") || ($GLOBALS['what'] == getConfig('index_home')))) && ($data['access_level'] != "guest") && ((GET_EXT_VERSION("sql_patches") >= "0.4.7") || (GET_EXT_VERSION("admins") >= "0.7.0"))) { - // Handle failture + // Handle failure $content['content'] .= HANDLE_LOGIN_FAILTURES($data['access_level']); } // END - if diff --git a/inc/functions.php b/inc/functions.php index f1af163a8f..3de2ab98b2 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -2601,22 +2601,22 @@ function HANDLE_LOGIN_FAILTURES ($accessLevel) { $OUT = ""; // Is the session data set? - if ((isSessionVariableSet('mxchange_'.$accessLevel.'_failtures')) && (isSessionVariableSet('mxchange_'.$accessLevel.'_last_fail'))) { + if ((isSessionVariableSet('mxchange_'.$accessLevel.'_failures')) && (isSessionVariableSet('mxchange_'.$accessLevel.'_last_fail'))) { // Ignore zero values - if (get_session('mxchange_'.$accessLevel.'_failtures') > 0) { - // Non-guest has login failtures found, get both data and prepare it for template + if (get_session('mxchange_'.$accessLevel.'_failures') > 0) { + // Non-guest has login failures found, get both data and prepare it for template //* DEBUG: */ print __FUNCTION__."(".__LINE__."):accessLevel={$accessLevel}
\n"; $content = array( - 'login_failtures' => get_session('mxchange_'.$accessLevel.'_failtures'), - 'last_failture' => MAKE_DATETIME(get_session('mxchange_'.$accessLevel.'_last_fail'), "2") + 'login_failures' => get_session('mxchange_'.$accessLevel.'_failures'), + 'last_failure' => MAKE_DATETIME(get_session('mxchange_'.$accessLevel.'_last_fail'), "2") ); // Load template - $OUT = LOAD_TEMPLATE("login_failtures", true, $content); + $OUT = LOAD_TEMPLATE("login_failures", true, $content); } // END - if // Reset session data - set_session('mxchange_'.$accessLevel.'_failtures', ""); + set_session('mxchange_'.$accessLevel.'_failures', ""); set_session('mxchange_'.$accessLevel.'_last_fail', ""); } // END - if diff --git a/inc/libs/admins_functions.php b/inc/libs/admins_functions.php index 38169a08c8..d10f3bdc32 100644 --- a/inc/libs/admins_functions.php +++ b/inc/libs/admins_functions.php @@ -402,7 +402,7 @@ function FILTER_ADD_EXTRA_SQL_DATA ($ADD = "") { // Is the admins extension updated? (should be!) if (GET_EXT_VERSION("admins") >= "0.3") $ADD .= ", default_acl AS def_acl"; if (GET_EXT_VERSION("admins") >= "0.6.7") $ADD .= ", la_mode"; - if (GET_EXT_VERSION("admins") >= "0.7.0") $ADD .= ", login_failtures, UNIX_TIMESTAMP(last_failture) AS last_failture"; + if (GET_EXT_VERSION("admins") >= "0.7.2") $ADD .= ", login_failures, UNIX_TIMESTAMP(last_failure) AS last_failure"; // Return it return $ADD; diff --git a/inc/libs/user_functions.php b/inc/libs/user_functions.php index 7592bbc554..1e802cdb4d 100644 --- a/inc/libs/user_functions.php +++ b/inc/libs/user_functions.php @@ -355,9 +355,9 @@ function USER_DO_LOGIN ($uid, $passwd) { // Cookies not setable! $URL = "modules.php?module=index&what=login&login=".CODE_NO_COOKIES; } - } elseif (GET_EXT_VERSION("sql_patches") >= "0.4.7") { + } elseif (GET_EXT_VERSION("sql_patches") >= "0.6.1") { // Update failture counter - SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET login_failtures=login_failtures+1,last_failture=NOW() WHERE userid=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_user_data` SET login_failures=login_failures+1,last_failure=NOW() WHERE userid=%s LIMIT 1", array($uid), __FILE__, __LINE__); // Wrong password! diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index 6ee8681097..3433899312 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -83,8 +83,8 @@ function CHECK_ADMIN_LOGIN ($admin_login, $password) { // Include more admins data? if (GET_EXT_VERSION("admins") >= "0.7.0") { // Load them here - $data['login_failtures'] = $cacheArray['admins']['login_failtures'][$aid]; - $data['last_failture'] = $cacheArray['admins']['last_failture'][$aid]; + $data['login_failures'] = $cacheArray['admins']['login_failures'][$aid]; + $data['last_failure'] = $cacheArray['admins']['last_failure'][$aid]; } // END - if } elseif (!EXT_IS_ACTIVE("cache")) { // Add extra data via filter now @@ -133,14 +133,14 @@ function CHECK_ADMIN_LOGIN ($admin_login, $password) { $data['password'] = generateHash($password); // Do we have 0.7.0 of admins or later? - // Remmeber login failtures if available - if (GET_EXT_VERSION("admins") >= "0.7.0") { + // Remmeber login failures if available + if (GET_EXT_VERSION("admins") >= "0.7.2") { // Store it in session - set_session('mxchange_admin_failtures', $data['login_failtures']); - set_session('mxchange_admin_last_fail', $data['last_failture']); + set_session('mxchange_admin_failures', $data['login_failures']); + set_session('mxchange_admin_last_fail', $data['last_failure']); - // Update password and reset login failtures - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET password='%s',login_failtures=0,last_failture='0000-00-00 00:00:00' WHERE id=%s LIMIT 1", + // Update password and reset login failures + SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET password='%s',login_failures=0,last_failure='0000-00-00 00:00:00' WHERE id=%s LIMIT 1", array($data['password'], $aid), __FILE__, __LINE__); } else { // Update password @@ -170,10 +170,10 @@ function CHECK_ADMIN_LOGIN ($admin_login, $password) { } // END - if } - // Count login failture if admins extension version is 0.7.0+ + // Count login failure if admins extension version is 0.7.0+ if (($ret == "pass") && (GET_EXT_VERSION("admins") >= "0.7.0")) { // Update counter - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET login_failtures=login_failtures+1,last_failture=NOW() WHERE id=%s LIMIT 1", + SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET login_failures=login_failures+1,last_failure=NOW() WHERE id=%s LIMIT 1", array($aid), __FILE__, __LINE__); // Rebuild cache @@ -189,10 +189,10 @@ function CHECK_ADMIN_LOGIN ($admin_login, $password) { function LOGIN_ADMIN ($adminLogin, $passHash) { global $cacheInstance; - // Reset failture counter on matching admins version + // Reset failure counter on matching admins version if ((GET_EXT_VERSION("admins") >= "0.7.0") && ((EXT_VERSION_IS_OLDER("sql_patches", "0.3.6")) || (GET_EXT_VERSION("sql_patches") == ""))) { // Reset counter on out-dated sql_patches version - SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET login_failtures=0,last_failture='0000-00-00 00:00:00' WHERE login='%s' LIMIT 1", + SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_admins SET login_failures=0,last_failure='0000-00-00 00:00:00' WHERE login='%s' LIMIT 1", array($adminLogin), __FILE__, __LINE__); // Rebuild cache diff --git a/inc/modules/chk_login.php b/inc/modules/chk_login.php index 635deeee76..ce282a4c7b 100644 --- a/inc/modules/chk_login.php +++ b/inc/modules/chk_login.php @@ -41,12 +41,12 @@ if (!defined('__SECURITY')) { $MSG = "{!VALIDATING_LOGIN!}"; if (!empty($GLOBALS['userid']) && (isSessionVariableSet('u_hash'))) { - // Login failtures are supported since 0.4.7 + // Login failures are supported since 0.4.7 // Do we have 0.4.7 of sql_patches or later? $ADD = ""; - if (GET_EXT_VERSION("sql_patches") >= "0.4.7") { + if (GET_EXT_VERSION("sql_patches") >= "0.6.1") { // Load them here - $ADD = ", login_failtures, UNIX_TIMESTAMP(last_failture) AS last_failture"; + $ADD = ", login_failures, UNIX_TIMESTAMP(last_failure) AS last_failure"; } // END - if // Get theme from profile @@ -62,18 +62,18 @@ if (!empty($GLOBALS['userid']) && (isSessionVariableSet('u_hash'))) { // Change to new theme set_session('mxchange_theme', $data['curr_theme']); - // Remmeber login failtures if available - if (GET_EXT_VERSION("sql_patches") >= "0.4.7") { - // Reset login failtures + // Remmeber login failures if available + if (GET_EXT_VERSION("sql_patches") >= "0.6.1") { + // Reset login failures SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data -SET login_failtures=0, last_failture='0000-00-00 00:00:00' +SET login_failures=0, last_failure='0000-00-00 00:00:00' WHERE userid=%s LIMIT 1", array($GLOBALS['userid']), __FILE__, __LINE__); // Store it in session - set_session('mxchange_member_failtures', $data['login_failtures']); - set_session('mxchange_member_last_fail', $data['last_failture']); + set_session('mxchange_member_failures', $data['login_failures']); + set_session('mxchange_member_last_fail', $data['last_failure']); } // END - if // Bonus is not given by default ;-) diff --git a/templates/de/html/login_failtures.tpl b/templates/de/html/login_failtures.tpl index e921e4193e..7cce8b08c9 100644 --- a/templates/de/html/login_failtures.tpl +++ b/templates/de/html/login_failtures.tpl @@ -1,9 +1,9 @@
-