getByPK (primary key) lookup for Managed_DataObject instances
This commit is contained in:
@@ -313,16 +313,6 @@ class Notice extends Managed_DataObject
|
||||
return $notice;
|
||||
}
|
||||
|
||||
public static function getById($id)
|
||||
{
|
||||
$notice = new Notice();
|
||||
$notice->id = $id;
|
||||
if (!$notice->find(true)) {
|
||||
throw new NoResultException($notice);
|
||||
}
|
||||
return $notice;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract #hashtags from this notice's content and save them to the database.
|
||||
*/
|
||||
@@ -2761,7 +2751,7 @@ class Notice extends Managed_DataObject
|
||||
if (empty($this->reply_to)) {
|
||||
throw new NoParentNoticeException($this);
|
||||
}
|
||||
return self::getById($this->reply_to);
|
||||
return self::getByID($this->reply_to);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user