From 6313e93c8b50e1e5815b60b3c17135b2f85e79b9 Mon Sep 17 00:00:00 2001 From: pero1203 Date: Tue, 19 Jan 2021 10:27:37 +0100 Subject: [PATCH] Odstranjena nastavitev za admine za sistemski jezik, jezik za respondente je pri kreiranju ankete vedno enak jeziku admina --- admin/survey/SurveyAdmin.php | 6 +-- admin/survey/SurveyAdminAjax.php | 17 ++------ admin/survey/SurveyAdminSettings.php | 62 +--------------------------- admin/survey/ajax.php | 1 - 4 files changed, 8 insertions(+), 78 deletions(-) diff --git a/admin/survey/SurveyAdmin.php b/admin/survey/SurveyAdmin.php index f26093fe7..089b69aef 100644 --- a/admin/survey/SurveyAdmin.php +++ b/admin/survey/SurveyAdmin.php @@ -4361,7 +4361,7 @@ class SurveyAdmin /** * @desc ustvari novo anketo */ - function nova_anketa($naslov = null, $intro_opomba = '', $akronim = null, $survey_type = 2, $lang_resp = 1, $skin = '1kaBlue') + function nova_anketa($naslov = null, $intro_opomba = '', $akronim = null, $survey_type = 2, $skin = '1kaBlue') { global $lang; @@ -4396,10 +4396,10 @@ class SurveyAdmin $starts = $_POST['starts'] ? "'" . $_POST['starts'] . "'" : "NOW()"; $expire = $_POST['expire'] ? "'" . $_POST['expire'] . "'" : "NOW() + INTERVAL 3 MONTH "; - #$expire = $_POST['expire'] ? "'" . $_POST['expire'] . "'" : "NOW() + INTERVAL 30 DAY "; - $lang_resp = ((int)$lang_resp > 0) ? $lang_resp : 1; + // Nastavimo jezik - admin in response jezik je vedno enak nastavitvi, ki jo ima uporabnik a default $lang_admin = ((int)$lang_admin > 0) ? $lang_admin : 1; + $lang_resp = $lang_admin; # ali ima uporabnik nastavljeno da je anketa privzeto aktivna: $autoActiveSurvey = (int)UserSetting::getInstance()->getUserSetting('autoActiveSurvey'); diff --git a/admin/survey/SurveyAdminAjax.php b/admin/survey/SurveyAdminAjax.php index 510632775..7fd66c7c9 100644 --- a/admin/survey/SurveyAdminAjax.php +++ b/admin/survey/SurveyAdminAjax.php @@ -597,19 +597,8 @@ class SurveyAdminAjax { if (!$sql) echo mysqli_error($GLOBALS['connect_db']); } - if (isset ($_POST['SurveyLang_admin'])) { - $val = $_POST['SurveyLang_admin']; - $sql = sisplet_query("UPDATE misc SET value='$val' WHERE what = 'SurveyLang_admin'"); - if (!$sql) - echo mysqli_error($GLOBALS['connect_db']); - } - if (isset ($_POST['SurveyLang_resp'])) { - $val = $_POST['SurveyLang_resp']; - $sql = sisplet_query("UPDATE misc SET value='$val' WHERE what = 'SurveyLang_resp'"); - if (!$sql) - echo mysqli_error($GLOBALS['connect_db']); - } - } elseif ($_GET['m'] == 'global_user_settings') { + } + elseif ($_GET['m'] == 'global_user_settings') { if (isset ($_POST['language'])) { $lang = $_POST['language']; @@ -1755,7 +1744,7 @@ class SurveyAdminAjax { if (trim($_POST['survey_type']) == '') { $_POST['survey_type'] = 2; } - $anketa = $this->SurveyAdmin->nova_anketa($naslov, $intro_opomba, $akronim, $_POST['survey_type'], $_POST['lang_resp'], $skin); + $anketa = $this->SurveyAdmin->nova_anketa($naslov, $intro_opomba, $akronim, $_POST['survey_type'], $skin); // Ce imamo pri ustvarjanju doloceno tudi mapo, anketo vstavimo v njo if(isset($_POST['folder']) && $_POST['folder'] > 0){ diff --git a/admin/survey/SurveyAdminSettings.php b/admin/survey/SurveyAdminSettings.php index cdc11da94..79256b7dd 100644 --- a/admin/survey/SurveyAdminSettings.php +++ b/admin/survey/SurveyAdminSettings.php @@ -4836,10 +4836,6 @@ class SurveyAdminSettings { list ($SurveyExport) = mysqli_fetch_row($result); $result = sisplet_query("SELECT value FROM misc WHERE what='SurveyForum'"); list ($SurveyForum) = mysqli_fetch_row($result); - $result = sisplet_query("SELECT value FROM misc WHERE what='SurveyLang_admin'"); - list ($SurveyLang_admin) = mysqli_fetch_row($result); - $result = sisplet_query("SELECT value FROM misc WHERE what='SurveyLang_resp'"); - list ($SurveyLang_resp) = mysqli_fetch_row($result); echo ''; ?> @@ -4888,55 +4884,8 @@ class SurveyAdminSettings { ?> -
- - - -
- - - -
- - '; - + '; echo '' . $lang['srv_edithelp'] . ''; @@ -9247,14 +9196,7 @@ class SurveyAdminSettings { echo ''; echo '
'; - - // Napredni vmesnik (star design za moje ankete) - TEGA NIMAMO VEC (PUSTIMO SAMO KODO V OZADJU, CE BI KDAJ VASJA HOTEL NAZAJ:)) - /*echo ''; - - echo '
';*/ - + // Opcija enklik ustvarjanja ankete (v mojih anketah) echo '