X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fadmin-inc.php;h=28dc8a33f192bbf8fcb2f2eb511ad111df8600e3;hb=a6f5926aeaf7917cb4bca3d29ffd0e8e6290fb4e;hp=0f8382245ef2321f0168b94c15c92d956985d20a;hpb=a1ab2fa4296e58f66a15ac7b568a1454713a61ee;p=mailer.git diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index 0f8382245e..28dc8a33f1 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -197,7 +197,7 @@ function ifAdminLoginDataIsValid ($admin, $password) { // Try to login the admin by setting some session/cookie variables function doAdminLogin ($adminLogin, $passHash) { // Reset failure counter on matching admins version - if ((isExtensionInstalledAndNewer('admins', '0.7.0')) && ((isExtensionOlder('sql_patches', '0.3.6')) || (!isExtensionInstalled('sql_patches')))) { + if ((isExtensionInstalledAndNewer('admins', '0.7.0')) && ((isExtensionInstalledAndOlder('sql_patches', '0.3.6')) || (!isExtensionInstalled('sql_patches')))) { // Reset counter on out-dated sql_patches version 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), __FUNCTION__, __LINE__); @@ -208,7 +208,7 @@ function doAdminLogin ($adminLogin, $passHash) { // Now set all session variables and return the result return (( - setSession('admin_md5', generatePassString($passHash)) + setSession('admin_md5', generatePassString(generateHash($passHash, '', false))) ) && ( setSession('admin_login', $adminLogin) ) && ( @@ -226,7 +226,7 @@ function ifAdminCookiesAreValid ($admin, $password) { $pass = getAdminHash($admin); if ($pass != '-1') $ret = 'pass'; - //* DEBUG: */ outputHtml(__FUNCTION__."(".__LINE__."):".generatePassString($pass).'('.strlen($pass).")/".$password.'('.strlen($password).")
"); + //* DEBUG: */ outputHtml(__FUNCTION__ . '(' . __LINE__."):".generatePassString($pass).'('.strlen($pass).")/".$password.'('.strlen($password).")
"); // Check if password matches if (($ret == 'pass') && ((generatePassString($pass) == $password) || ($pass == $password) || ((strlen($pass) == 32) && (md5($password) == $pass))) && (isAdmin())) { @@ -584,7 +584,7 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement convertSelectionsToTimestamp($postData, $tableData, $id, $skip); // Shall we process this id? It muss not be empty, of course - if (($skip === false) && (!empty($id)) && (!isset($GLOBALS['skip_config'][$id]))) { + if (($skip === false) && (!empty($id)) && ((!isset($GLOBALS['skip_config'][$id]))) || ($tableName != '_config')) { // Translate the value? (comma to dot!) if ((is_array($translateComma)) && (in_array($id, $translateComma))) { // Then do it here... :) @@ -827,7 +827,7 @@ function sendAdminBuildMails ($mode, $table, $content, $id, $subjectPart = '') { } // END - if // Is the raw userid set? - if (postRequestElement('userid_raw', $id) > 0) { + if (postRequestParameter('userid_raw', $id) > 0) { // Generate subject $subjectLine = getMessage('MEMBER_'.strtoupper($subject).'_'.strtoupper($table).'_SUBJECT'); @@ -839,7 +839,7 @@ function sendAdminBuildMails ($mode, $table, $content, $id, $subjectPart = '') { } // Send email out - sendEmail(postRequestElement('userid_raw', $id), $subjectLine, $mail); + sendEmail(postRequestParameter('userid_raw', $id), $subjectLine, $mail); } // END - if // Generate subject @@ -847,9 +847,9 @@ function sendAdminBuildMails ($mode, $table, $content, $id, $subjectPart = '') { // Send admin notification out if (!empty($subjectPart)) { - sendAdminNotification($subjectLine, 'admin_' . $mode . '_' . strtolower($subjectPart) . '_' . $table, $content, postRequestElement('userid_raw', $id)); + sendAdminNotification($subjectLine, 'admin_' . $mode . '_' . strtolower($subjectPart) . '_' . $table, $content, postRequestParameter('userid_raw', $id)); } else { - sendAdminNotification($subjectLine, 'admin_' . $mode . '_' . $table, $content, postRequestElement('userid_raw', $id)); + sendAdminNotification($subjectLine, 'admin_' . $mode . '_' . $table, $content, postRequestParameter('userid_raw', $id)); } } @@ -1007,7 +1007,7 @@ function adminDeleteEntriesConfirm ($IDs, $table, $columns=array(), $filterFunct $idList = ''; foreach ($IDs as $id => $sel) { // Is there a userid? - if (isPostRequestElementSet('userid_raw', $id)) { + if (isPostRequestParameterSet('userid_raw', $id)) { // Load all data from that id $result = SQL_QUERY_ESC("SELECT * FROM `{?_MYSQL_PREFIX?}_%s` WHERE %s=%s LIMIT 1", array($table, $idColumn, $id), __FUNCTION__, __LINE__); @@ -1395,7 +1395,7 @@ function doVerifyExpertSettings () { // Ask for them if (isFormSent()) { // Is the element set, then we need to change the admin - if (isPostRequestElementSet('expert_settings')) { + if (isPostRequestParameterSet('expert_settings')) { // Get it and prepare final post data array $postData['login'][getCurrentAdminId()] = getAdminLogin(getCurrentAdminId()); $postData['expert_warning'][getCurrentAdminId()] = 'N'; @@ -1404,7 +1404,7 @@ function doVerifyExpertSettings () { adminsChangeAdminAccount($postData, 'expert_warning'); // Clear form - unsetPostRequestElement('ok'); + unsetPostRequestParameter('ok'); } // END - if // All fine!