diff --git a/admin/survey/SurveyAdmin.php b/admin/survey/SurveyAdmin.php index fea29b1c2..08cd8f41f 100644 --- a/admin/survey/SurveyAdmin.php +++ b/admin/survey/SurveyAdmin.php @@ -264,6 +264,7 @@ class SurveyAdmin global $global_user_id; global $lang; global $admin_type; + global $site_domain; $sql = sisplet_query("SELECT email FROM users WHERE id='$global_user_id'"); $row = mysqli_fetch_assoc($sql); @@ -328,11 +329,15 @@ class SurveyAdmin $text = $row['name'] . ' ' . $row['surname']; $text = (strlen($text) > 25) ? substr($text, 0, 25) . '...' : $text; - - echo '
' . $text . ' '; - echo '
'; + + + echo '
' . $text . ' '; + echo '
'; + // Za Arnes.si skrijemo zavihek moj profil, da ne morejo spremijati gesla + if($site_domain != '1ka.arnes.si') { echo '' . $lang['edit_data'] . ''; - + } + // Odjava na nov nacin preko frontend/api echo '
'; echo '' . $lang['logout'] . ''; @@ -906,7 +911,7 @@ class SurveyAdmin } # če je manj kot 20 variabel naj gre default na graf $sql = sisplet_query("SELECT COUNT(*) AS count FROM srv_spremenljivka s, srv_grupa g WHERE s.gru_id=g.id AND g.ank_id='$this->anketa'"); - list($varcount) = mysqli_fetch_array($sql); + [$varcount] = mysqli_fetch_array($sql); if ($varcount < 20) { @@ -1484,7 +1489,7 @@ class SurveyAdmin if ($this->survey_type > 1) { $str_testdata = "SELECT count(*) FROM srv_user WHERE ank_id='" . $this->anketa . "' AND (testdata='1' OR testdata='2') AND deleted='0'"; $query_testdata = sisplet_query($str_testdata); - list($testdata) = mysqli_fetch_row($query_testdata); + [$testdata] = mysqli_fetch_row($query_testdata); if ((int)$testdata > 0) { echo '
    '; @@ -3258,7 +3263,7 @@ class SurveyAdmin * */ function displaySeznamAnket(){ - global $lang, $site_url, $global_user_id, $admin_type; + global $lang, $site_url, $global_user_id, $admin_type, $site_domain; // Pobrisemo vse preview vnose Common::deletePreviewData($this->anketa); @@ -3465,7 +3470,7 @@ class SurveyAdmin $sas = new SurveyAdminSettings(); $sas->globalUserSettings(); } - if ($_GET['m'] == 'global_user_myProfile') { + if ($_GET['m'] == 'global_user_myProfile' && $site_domain != '1ka.arnes.si') { $sas = new SurveyAdminSettings(); $sas->globalUserMyProfile(); } @@ -4167,7 +4172,7 @@ class SurveyAdmin $file = $site_path . 'main/survey/uploads/' . $logo; $fileExt = pathinfo($_FILES['fajl']['name'], PATHINFO_EXTENSION); - list($width, $height) = getimagesize($_FILES['fajl']['tmp_name']); + [$width, $height] = getimagesize($_FILES['fajl']['tmp_name']); // If logo too large resize uploaded logo to max 150px height if($height > 150){ @@ -4365,7 +4370,7 @@ class SurveyAdmin $lang_admin = $row['lang']; $res = sisplet_query("SELECT value FROM misc WHERE what='SurveyCookie'"); - list ($SurveyCookie) = mysqli_fetch_row($res); + [$SurveyCookie] = mysqli_fetch_row($res); $text = ''; $url = $site_url; diff --git a/admin/survey/classes/class.SurveyList.php b/admin/survey/classes/class.SurveyList.php index 8606d6c78..423995214 100644 --- a/admin/survey/classes/class.SurveyList.php +++ b/admin/survey/classes/class.SurveyList.php @@ -231,7 +231,7 @@ class SurveyList { * @desc prikaze zgornjo navigacijo */ function display_sub_tabs () { - global $lang, $global_user_id, $admin_type; + global $lang, $global_user_id, $admin_type, $site_domain; $SLCount = $this->countSurveys(); @@ -464,11 +464,12 @@ class SurveyList { echo '
  • '; // Moj profil - preneseno iz sispleta (sispleta se ne bo uporabljalo vec) - echo '
  • '; - echo ''; - echo $lang['edit_data'].''; - echo '
  • '; + if($site_domain != '1ka.arnes.si') { + echo '
  • '; + echo ''; + echo $lang['edit_data'] . ''; + echo '
  • '; + } echo '
'; } @@ -3218,7 +3219,7 @@ class SurveyList { } $sqlSurveyList = sisplet_query($stringSurveyList); - list($count) = mysqli_fetch_row($sqlSurveyList); + [$count] = mysqli_fetch_row($sqlSurveyList); return (int)$count; }