diff options
| author | wn_ <invalid@email.com> | 2024-11-17 22:14:08 +0000 |
|---|---|---|
| committer | wn_ <invalid@email.com> | 2024-11-18 21:59:45 +0000 |
| commit | 154abc61a0f81bee7757fc57e594f3f4bccc0fdf (patch) | |
| tree | 19deb331e4204003b11b88cc2f1e98cc2440b402 /classes/Sanitizer.php | |
| parent | 394d606fe977a331f733c62e5509469c2eb3ef31 (diff) | |
Eliminate use of deprecated 'get_pref()' and 'set_pref()'.
Diffstat (limited to 'classes/Sanitizer.php')
| -rw-r--r-- | classes/Sanitizer.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/classes/Sanitizer.php b/classes/Sanitizer.php index 0bbb30586..efed9d418 100644 --- a/classes/Sanitizer.php +++ b/classes/Sanitizer.php @@ -68,6 +68,8 @@ class Sanitizer { if (!$owner && isset($_SESSION["uid"])) $owner = $_SESSION["uid"]; + $profile = isset($_SESSION['uid']) && $owner == $_SESSION['uid'] && isset($_SESSION['profile']) ? $_SESSION['profile'] : null; + $res = trim($str); if (!$res) return ''; $doc = new DOMDocument(); @@ -117,8 +119,7 @@ class Sanitizer { } if ($entry->hasAttribute('src') && - ($owner && get_pref(Prefs::STRIP_IMAGES, $owner)) || $force_remove_images || ($_SESSION["bw_limit"] ?? false)) { - + ($owner && Prefs::get(Prefs::STRIP_IMAGES, $owner, $profile)) || $force_remove_images || ($_SESSION['bw_limit'] ?? false)) { $p = $doc->createElement('p'); $a = $doc->createElement('a'); |