From 42b287e9646c61f4f62b3d44c5ab6897c4c6bf06 Mon Sep 17 00:00:00 2001 From: wn_ Date: Sun, 5 Mar 2023 15:30:09 +0000 Subject: [PATCH] Remove unused 'Prefs::_delete()'. Related to dabb85c7dd82d2e97e400e0339d312030d4a1b4b. --- classes/prefs.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/classes/prefs.php b/classes/prefs.php index 92f703b3f..9d68a14b7 100644 --- a/classes/prefs.php +++ b/classes/prefs.php @@ -325,14 +325,6 @@ class Prefs { return self::get_instance()->_set($pref_name, $value, $owner_uid, $profile_id); } - /* private function _delete(string $pref_name, int $owner_uid, ?int $profile_id): bool { - $sth = $this->pdo->prepare("DELETE FROM ttrss_user_prefs2 - WHERE pref_name = :name AND owner_uid = :uid AND - (profile = :profile OR (:profile IS NULL AND profile IS NULL))"); - - return $sth->execute(["uid" => $owner_uid, "profile" => $profile_id, "name" => $pref_name ]); - } */ - /** * @param bool|int|string $value */ @@ -350,10 +342,6 @@ class Prefs { $value = Config::cast_to($value, $type_hint); - // is this a good idea or not? probably not (user-set value remains user-set even if its at default) - //if ($value == $def_val) - // return $this->_delete($pref_name, $owner_uid, $profile_id); - if ($value == $this->_get($pref_name, $owner_uid, $profile_id)) return false;