Managed_DataObject now has getByUri()
This commit is contained in:
parent
42a62da764
commit
f93f02f424
@ -336,16 +336,6 @@ class Notice extends Managed_DataObject
|
||||
}
|
||||
}
|
||||
|
||||
public static function getByUri($uri)
|
||||
{
|
||||
$notice = new Notice();
|
||||
$notice->uri = $uri;
|
||||
if (!$notice->find(true)) {
|
||||
throw new NoResultException($notice);
|
||||
}
|
||||
return $notice;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract #hashtags from this notice's content and save them to the database.
|
||||
*/
|
||||
|
@ -140,16 +140,6 @@ class User extends Managed_DataObject
|
||||
return $this->uri;
|
||||
}
|
||||
|
||||
static function getByUri($uri)
|
||||
{
|
||||
$user = new User();
|
||||
$user->uri = $uri;
|
||||
if (!$user->find(true)) {
|
||||
throw new NoResultException($user);
|
||||
}
|
||||
return $user;
|
||||
}
|
||||
|
||||
public function getNickname()
|
||||
{
|
||||
return $this->getProfile()->getNickname();
|
||||
|
Loading…
Reference in New Issue
Block a user