Eliminate use of deprecated 'get_pref()' and 'set_pref()'.

This commit is contained in:
wn_
2024-11-17 22:14:08 +00:00
parent 394d606fe9
commit 154abc61a0
18 changed files with 111 additions and 81 deletions

View File

@@ -363,6 +363,9 @@ class OPML extends Handler_Protected {
}
}
/**
* @todo support passing in $profile so 'update.php --opml-import' can import prefs to a user profile
*/
private function opml_import_preference(DOMNode $node, int $owner_uid, int $nest): void {
$attrs = $node->attributes;
$pref_name = $attrs->getNamedItem('pref-name')->nodeValue;
@@ -373,7 +376,7 @@ class OPML extends Handler_Protected {
$this->opml_notice(T_sprintf("Setting preference key %s to %s",
$pref_name, $pref_value), $nest);
set_pref($pref_name, $pref_value, $owner_uid);
Prefs::set($pref_name, $pref_value, $owner_uid, $_SESSION['profile'] ?? null);
}
}