getByPK (primary key) lookup for Managed_DataObject instances

This commit is contained in:
Mikael Nordfeldth
2015-06-04 22:17:40 +02:00
parent ca19a5cd6d
commit ebdd792b6f
4 changed files with 51 additions and 13 deletions

View File

@@ -50,7 +50,7 @@ class ActivityverbAction extends ManagedAction
throw new ServerException('A verb has not been specified.');
}
$this->notice = Notice::getById($this->trimmed('id'));
$this->notice = Notice::getByID($this->trimmed('id'));
if (!$this->notice->inScope($this->scoped)) {
// TRANS: %1$s is a user nickname, %2$d is a notice ID (number).

View File

@@ -161,7 +161,7 @@ class SharePlugin extends ActivityVerbHandlerPlugin
public function extendActivity(Notice $stored, Activity $act, Profile $scoped=null)
{
// TODO: How to handle repeats of deleted notices?
$target = Notice::getById($stored->repeat_of);
$target = Notice::getByID($stored->repeat_of);
// TRANS: A repeat activity's title. %1$s is repeater's nickname
// and %2$s is the repeated user's nickname.
$act->title = sprintf(_('%1$s repeated a notice by %2$s'),