X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fadmin-inc.php;h=3039bd9e0724128150e986d8c9c6bcf4d26ecd0b;hb=803b63e8ceff7392a9eae4992dd6e59c1da247cd;hp=b95b6a2523e4e2f4c43634bb6a038a82de585f32;hpb=2e04164985cae54359663633a8796567d71082a7;p=mailer.git diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index b95b6a2523..3039bd9e07 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -99,7 +99,7 @@ function ifAdminLoginDataIsValid ($adminLogin, $adminPassword) { $ret = 'done'; } else { // Set status - $ret = 'pass'; + $ret = 'password'; } } // END - if } // END - if @@ -139,7 +139,7 @@ function ifAdminCookiesAreValid ($adminLogin, $passHash) { $ret = 'done'; } else { // Set status - $ret = 'pass'; + $ret = 'password'; } } // END - if @@ -623,7 +623,7 @@ function adminAddMenuSelectionBox ($menu, $type, $name, $default = '') { // Creates a user-profile link for the admin. This function can also be used for many other purposes function generateUserProfileLink ($userid, $title = '', $what = 'list_user') { - if (($title == '') && ($userid > 0)) { + if (($title == '') && (isValidUserId($userid))) { // Set userid as title $title = $userid; } elseif ($userid == 0) { @@ -739,9 +739,6 @@ function sendAdminBuildMails ($mode, $table, $content, $id, $subjectPart = '', $ // Is the raw userid set? if (postRequestParameter($userid, $id) > 0) { - // Generate subject - $subject = '{--MEMBER_' . strtoupper($subject) . '_' . strtoupper($table) . '_SUBJECT--}'; - // Load email template if (!empty($subjectPart)) { $mail = loadEmailTemplate('member_' . $mode . '_' . strtolower($subjectPart) . '_' . $table, $content); @@ -750,11 +747,11 @@ function sendAdminBuildMails ($mode, $table, $content, $id, $subjectPart = '', $ } // Send email out - sendEmail(postRequestParameter($userid, $id), $subject, $mail); + sendEmail(postRequestParameter($userid, $id), strtoupper('{--MEMBER_' . $subject . '_' . $table . '_SUBJECT--}'), $mail); } // END - if // Generate subject - $subject = '{--ADMIN_' . strtoupper($subject) . '_' . strtoupper($table) . '_SUBJECT--}'; + $subject = strtoupper('{--ADMIN_' . $subject . '_' . $table . '_SUBJECT--}'); // Send admin notification out if (!empty($subjectPart)) { @@ -863,7 +860,7 @@ function adminBuilderStatusHandler ($mode, $IDs, $table, $columns, $filterFuncti } // END - if } elseif (isset($content[$column])) { // Unfinished! - debug_report_bug(__FUNCTION__, __LINE__, ":UNFINISHED: id={$id}/{$column}[".gettype($statusInfo)."] = {$content[$column]}"); + debug_report_bug(__FUNCTION__, __LINE__, ':UNFINISHED: id=' . $id . ',column=' . $column . '[' . gettype($statusInfo) . '] = ' . $content[$column]); } } // END - foreach @@ -1247,7 +1244,7 @@ function setAdminMenuHasEntries ($action, $hasEntries) { // Creates a link to the user's admin-profile function adminCreateUserLink ($userid) { // Is the userid set correctly? - if ($userid > 0) { + if (isValidUserId($userid)) { // Create a link to that profile return '{%url=modules.php?module=admin&what=list_user&userid=' . bigintval($userid) . '%}'; } // END - if