return $this->getUser()->shortenLinks($text, $always);
}
+ public function delPref($namespace, $topic) {
+ return Profile_prefs::setData($this, $namespace, $topic, null);
+ }
+
public function getPref($namespace, $topic, $default=null) {
- return Profile_prefs::getData($this, $namespace, $topic, $default);
+ // If you want an exception to be thrown, call Profile_prefs::getData directly
+ try {
+ return Profile_prefs::getData($this, $namespace, $topic, $default);
+ } catch (NoResultException $e) {
+ return null;
+ }
}
public function setPref($namespace, $topic, $data) {