From 58d9bc83b173761abb2d15ff6d0e0cb2b06afc2e Mon Sep 17 00:00:00 2001 From: pero1203 Date: Mon, 20 Sep 2021 16:18:54 +0200 Subject: [PATCH] Ciscenje stare kode --- admin/survey/SurveyAdmin.php | 28 --------------- admin/survey/classes/class.Forum.php | 18 +--------- admin/survey/classes/class.SurveyCopy.php | 1 - .../class.SurveyAnalysisArchive.php | 4 --- function/ProfileClass.php | 34 +++++++------------ .../survey/app/Controllers/BodyController.php | 4 +-- 6 files changed, 14 insertions(+), 75 deletions(-) diff --git a/admin/survey/SurveyAdmin.php b/admin/survey/SurveyAdmin.php index ceb802a5e..49ab4b59f 100644 --- a/admin/survey/SurveyAdmin.php +++ b/admin/survey/SurveyAdmin.php @@ -6908,34 +6908,6 @@ class SurveyAdmin echo ''; } - - - # Objava na FB, twitter, .... share pac - if ($row['active'] == 1 && false) { - # NE PRIKAZUJEMO IKONIC - $sqlu = sisplet_query("SELECT email FROM users WHERE id='" . $this->uid() . "'"); - $rowu = mysqli_fetch_array($sqlu); - if ($rowu['email'] == '') { - $sqlm = sisplet_query("SELECT value FROM misc WHERE what = 'AlertFrom'"); - $rowm = mysqli_fetch_array($sqlm); - $rowu['email'] = $rowm['value']; - } - ?> - - - - - - - - - - - "NULL"); $tmp_if_ids = self :: preformCopyTable('srv_if', 'id', $qry_src_if, $pre_set); diff --git a/admin/survey/classes/surveyAnalysis/class.SurveyAnalysisArchive.php b/admin/survey/classes/surveyAnalysis/class.SurveyAnalysisArchive.php index eddcb3dea..04dcbd809 100644 --- a/admin/survey/classes/surveyAnalysis/class.SurveyAnalysisArchive.php +++ b/admin/survey/classes/surveyAnalysis/class.SurveyAnalysisArchive.php @@ -811,10 +811,6 @@ class SurveyAnalysisArchive { static function ViewArchive($aid) { global $site_path, $global_user_id, $lang, $site_url; - #izpišemo osnovni html - $sql = sisplet_query("SELECT * FROM misc WHERE what='name'"); - $row = mysqli_fetch_array($sql); - // nastavimo jezik if (self::$sid > 0) { $sql = sisplet_query("SELECT lang_admin FROM srv_anketa WHERE id = '".self::$sid."'"); diff --git a/function/ProfileClass.php b/function/ProfileClass.php index 71732b151..55ae16364 100644 --- a/function/ProfileClass.php +++ b/function/ProfileClass.php @@ -409,15 +409,13 @@ class Profile { setcookie("unam", base64_encode($r[4].' '.$r[5]),time() + $LifeTime, '/', $cookie_domain); setcookie ("secret", $r[1], time()+$LifeTime, '/', $cookie_domain); - if ($r[2] == "2" || $r[2] == "6") - { + if ($r[2] == "2" || $r[2] == "6"){ setcookie ("P", time(), time()+$LifeTime, '/', $cookie_domain); } $this->ZePrijavljen = true; - if (isset ($_POST['l']) && $_POST['l']!='') - { + if (isset ($_POST['l']) && $_POST['l']!=''){ header ('location: ' .$site_url .str_replace (base64_decode($_POST['l']), $site_url, "")); } @@ -426,33 +424,25 @@ class Profile { $rt = sisplet_query ("SELECT value FROM misc WHERE what='AfterReg'"); $rxx = mysqli_fetch_row ($rt); - if (strlen ($rxx[0]) > 3) - { + if (strlen ($rxx[0]) > 3) { $rxx[0] = str_replace ($originating_domain, $keep_domain, $rxx[0]); header ('location: ' .$rxx[0] .'?&l=1'); - } else { - $CheckCasovnice = sisplet_query ("SELECT * FROM misc WHERE what='TimeTables' AND value='1'"); - if (mysqli_num_rows ($CheckCasovnice) != 0) - { - if (!isset ($_GET['l'])) header('Location: ' .$site_url .'index.php?fl=13'); - else header('Location: ' .base64_decode($_GET['l']) .'&l=1'); - } - else - { - if (!isset ($_GET['l'])) header('Location: ' .$site_url .'?l=1'); - else header('Location: ' .base64_decode($_GET['l']) .'?&l=1'); - } + } + else { + + if (!isset ($_GET['l'])) + header('Location: ' .$site_url .'?l=1'); + else + header('Location: ' .base64_decode($_GET['l']) .'?&l=1'); } } - else - { + else{ // Password prompt header ('location: ' .$site_url .'index.php?fl=8&lact=20&em=' .$this->email .(isset ($_GET['l'])?'&l=' .$_GET['l']:'')); die(); } } - else - { + else{ // Ni kul mail header ('location: ' .$site_url .'index.php?fl=8&lact=10&em=' .$this->email .(isset ($_GET['l'])?'&l=' .$_GET['l']:'')); die(); diff --git a/main/survey/app/Controllers/BodyController.php b/main/survey/app/Controllers/BodyController.php index 67c223fa8..5a53ab888 100644 --- a/main/survey/app/Controllers/BodyController.php +++ b/main/survey/app/Controllers/BodyController.php @@ -1101,9 +1101,7 @@ class BodyController extends Controller if (!get('printPreview')) { $srv_konec = SurveySetting::getInstance()->getSurveyMiscSetting('srvlang_srv_konec' . $_lang); - /*if ($row['text'] != '') // besedilo koncne povezave shranimo v misc setting, da bo konsistentno z ostalimi prevodi - $text = $row['text']; - else*/ + if ($srv_konec != '') $text = $srv_konec; else