mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Minor improvements (#1398)
* Minor improvements * Update viewtopic.php * Update functions.php * Update functions.php * Update usercp_register.tpl * Update register.php * Update register.php * Update CHANGELOG.md
This commit is contained in:
parent
a63b25f8ba
commit
7c703164d2
6 changed files with 35 additions and 26 deletions
|
@ -159,10 +159,12 @@ if ($submit) {
|
|||
|
||||
// Валидация данных
|
||||
$cur_pass_valid = $adm_edit;
|
||||
$can_edit_tpl = [];
|
||||
|
||||
foreach ($profile_fields as $field => $can_edit) {
|
||||
// Проверка на возможность редактирования
|
||||
if ((bool)$can_edit === false) {
|
||||
$can_edit = (bool)$can_edit;
|
||||
$can_edit_tpl['CAN_EDIT_' . strtoupper($field)] = $can_edit;
|
||||
if ($can_edit === false) {
|
||||
// TODO: При continue; не устанавливаются переменные ($tp_data) шаблона прописанные в case
|
||||
// continue;
|
||||
}
|
||||
|
@ -195,7 +197,6 @@ foreach ($profile_fields as $field => $can_edit) {
|
|||
$db_data['username'] = $username;
|
||||
}
|
||||
}
|
||||
$tp_data['CAN_EDIT_USERNAME'] = $can_edit;
|
||||
$tp_data['USERNAME'] = $pr_data['username'];
|
||||
break;
|
||||
|
||||
|
@ -669,6 +670,7 @@ if ($submit && !$errors) {
|
|||
}
|
||||
}
|
||||
|
||||
$template->assign_vars($can_edit_tpl);
|
||||
$template->assign_vars($tp_data);
|
||||
|
||||
$template->assign_vars([
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue