fix undefined variable in cases 'custom-notes-show' is not set when adding/editing an admin/a customer
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -202,7 +202,10 @@ if ($page == 'admins'
|
||||
$email = $idna_convert->encode(validate($_POST['email'], 'email'));
|
||||
|
||||
$custom_notes = validate(str_replace("\r\n", "\n", $_POST['custom_notes']), 'custom_notes', '/^[^\0]*$/');
|
||||
$custom_notes_show = intval_ressource($_POST['custom_notes_show']);
|
||||
$custom_notes_show = 0;
|
||||
if (isset($_POST['custom_notes_show'])) {
|
||||
$custom_notes_show = intval_ressource($_POST['custom_notes_show']);
|
||||
}
|
||||
|
||||
$loginname = validate($_POST['loginname'], 'loginname');
|
||||
$password = validate($_POST['admin_password'], 'password');
|
||||
@@ -477,7 +480,10 @@ if ($page == 'admins'
|
||||
$email = $idna_convert->encode(validate($_POST['email'], 'email'));
|
||||
|
||||
$custom_notes = validate(str_replace("\r\n", "\n", $_POST['custom_notes']), 'custom_notes', '/^[^\0]*$/');
|
||||
$custom_notes_show = intval_ressource($_POST['custom_notes_show']);
|
||||
$custom_notes_show = $result['custom_notes_show'];
|
||||
if (isset($_POST['custom_notes_show'])) {
|
||||
$custom_notes_show = intval_ressource($_POST['custom_notes_show']);
|
||||
}
|
||||
|
||||
if ($result['adminid'] == $userinfo['userid']) {
|
||||
|
||||
|
||||
@@ -420,7 +420,10 @@ if ($page == 'customers'
|
||||
$gender = intval_ressource($_POST['gender']);
|
||||
|
||||
$custom_notes = validate(str_replace("\r\n", "\n", $_POST['custom_notes']), 'custom_notes', '/^[^\0]*$/');
|
||||
$custom_notes_show = intval_ressource($_POST['custom_notes_show']);
|
||||
$custom_notes_show = 0;
|
||||
if (isset($_POST['custom_notes_show'])) {
|
||||
$custom_notes_show = intval_ressource($_POST['custom_notes_show']);
|
||||
}
|
||||
|
||||
$diskspace = intval_ressource($_POST['diskspace']);
|
||||
if (isset($_POST['diskspace_ul'])) {
|
||||
@@ -1049,7 +1052,10 @@ if ($page == 'customers'
|
||||
$move_to_admin = isset($_POST['move_to_admin']) ? intval_ressource($_POST['move_to_admin']) : 0;
|
||||
|
||||
$custom_notes = validate(str_replace("\r\n", "\n", $_POST['custom_notes']), 'custom_notes', '/^[^\0]*$/');
|
||||
$custom_notes_show = intval_ressource($_POST['custom_notes_show']);
|
||||
$custom_notes_show = $result['custom_notes_show'];
|
||||
if (isset($_POST['custom_notes_show'])) {
|
||||
$custom_notes_show = intval_ressource($_POST['custom_notes_show']);
|
||||
}
|
||||
|
||||
$diskspace = intval_ressource($_POST['diskspace']);
|
||||
if (isset($_POST['diskspace_ul'])) {
|
||||
|
||||
Reference in New Issue
Block a user