$act->actor = $actor->asActivityObject();
$act->target = new ActivityObject(); // We don't save the notice object, as it's supposed to be removed!
$act->target->id = $notice->getUri();
- $act->target->type = $notice->getObjectType();
+ try {
+ $act->target->type = $notice->getObjectType();
+ } catch (NoObjectTypeException $e) {
+ // This could be for example an RSVP which is a verb and carries no object-type
+ $act->target->type = null;
+ }
$act->objects = array(clone($act->target));
$url = $notice->getUrl();
$actobj->title = ActivityUtils::verbToTitle($actobj->verb);
$actor = $this->getActor();
+ // TRANS: Notice HTML content of a deleted notice. %1$s is the
+ // TRANS: actor's URL, %2$s its "fancy name" and %3$s the notice URI.
$actobj->content = sprintf(_m('<a href="%1$s">%2$s</a> deleted notice {{%3$s}}.'),
htmlspecialchars($actor->getUrl()),
- htmlspecialchars($actor->getBestName()),
+ htmlspecialchars($actor->getFancyName()),
htmlspecialchars($this->getUri())
);
echo "\nFound old $table table, upgrading it to add 'act_created' field...";
$schemadef['fields']['act_created'] = array('type' => 'datetime', 'not null' => true, 'description' => 'datetime the notice record was created');
+ $schemadef['fields']['uri']['length'] = 191; // we likely don't have to discover too long keys here
$schema->ensureTable($table, $schemadef);
$deleted = new Deleted_notice();