forked from GNUsocial/gnu-social
Shortcut to Profile_prefs get/set Data in Profile and User
This commit is contained in:
parent
b67a611ca7
commit
b5fd2a048f
@ -1570,4 +1570,12 @@ class Profile extends Managed_DataObject
|
||||
{
|
||||
return $this->getUser()->shortenLinks($text, $always);
|
||||
}
|
||||
|
||||
public function getPref($namespace, $topic, $default=null) {
|
||||
return Profile_prefs::getData($this, $namespace, $topic, $default);
|
||||
}
|
||||
|
||||
public function setPref($namespace, $topic, $data) {
|
||||
return Profile_prefs::setData($this, $namespace, $topic, $data);
|
||||
}
|
||||
}
|
||||
|
@ -1007,4 +1007,14 @@ class User extends Managed_DataObject
|
||||
$service->title);
|
||||
return $act;
|
||||
}
|
||||
|
||||
public function getPref($namespace, $topic, $default=null)
|
||||
{
|
||||
return $this->getProfile()->getPref($namespace, $topic, $default);
|
||||
}
|
||||
|
||||
public function setPref($namespace, $topic, $data)
|
||||
{
|
||||
return $this->getProfile()->setPref($namespace, $topic, $data);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user