mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
Fix + Redesign
Fix some error programing code and redesign special medals, tribe medals, mh medals, taskmaster medals, natars medals, nature medals, protection medals, etc. Add some language code in Profile.php and preference.tpl. Change some description in struct database for Nature and Taskmaster
This commit is contained in:
@@ -219,6 +219,21 @@ class Profile {
|
||||
$form->addError("email", EMAIL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
// Language change
|
||||
if (!empty($post['sprache'])) {
|
||||
// whitelist – pune aici limbile pe care le ai în /lang/
|
||||
$allowed = ['en','ro','de','it','fr','es'];
|
||||
$lang = strtolower(trim($post['sprache']));
|
||||
|
||||
if (in_array($lang, $allowed, true)) {
|
||||
$database->updateUserField($session->uid, "language", $lang, 1);
|
||||
|
||||
// update sesiunea ca să se vadă imediat, fără relog
|
||||
$_SESSION['lang'] = $lang;
|
||||
$session->userinfo['language'] = $lang;
|
||||
}
|
||||
}
|
||||
|
||||
// Delete request cancel
|
||||
if (!empty($post['del_pw']) && !empty($post['del'])) {
|
||||
|
||||
Reference in New Issue
Block a user