diff options
Diffstat (limited to '')
-rw-r--r-- | admin/survey/classes/class.SurveyUserSetting.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/admin/survey/classes/class.SurveyUserSetting.php b/admin/survey/classes/class.SurveyUserSetting.php index 0627f2a..f93782e 100644 --- a/admin/survey/classes/class.SurveyUserSetting.php +++ b/admin/survey/classes/class.SurveyUserSetting.php @@ -18,7 +18,7 @@ protected function __construct() {}
- final private function __clone() {}
+ private function __clone() {}
/** Poskrbimo za samo eno instanco razreda
*
@@ -65,10 +65,12 @@ static function getSettings($what) {
- $selectSql = "SELECT value FROM srv_user_setting_for_survey WHERE sid = '".self::$surveyId."' AND uid = '".self::$userId."' AND what = '".$what."'";
+
+ $selectSql = "SELECT value FROM srv_user_setting_for_survey WHERE sid = '".(!is_array(self::$surveyId)?self::$surveyId:self::$surveyId['id'])."' AND uid = '".self::$userId."' AND what = '".$what."'";
$sqlUserSetting = sisplet_query($selectSql);
$rowUserSetting = mysqli_fetch_assoc($sqlUserSetting);
- return $rowUserSetting['value'];
+
+ return $rowUserSetting['value'] ?? null;
}
static function getAll() {
@@ -100,7 +102,7 @@ $delete = sisplet_query($deleteString);
}
- return $insert;
+ return $delete;
}
static function getUserRow () {
|