Skip to content
Snippets Groups Projects
Commit ba00cb55 authored by Ron Lucke's avatar Ron Lucke
Browse files

fix #1687

Closes #1687

Merge request studip/studip!1102
parent 0a237170
No related branches found
No related tags found
No related merge requests found
...@@ -67,14 +67,16 @@ class Block extends SchemaProvider ...@@ -67,14 +67,16 @@ class Block extends SchemaProvider
self::RELATIONSHIP_DATA => $resource->container, self::RELATIONSHIP_DATA => $resource->container,
]; ];
$relationships[self::REL_OWNER] = [ $relationships[self::REL_OWNER] = $resource->owner
? [
self::RELATIONSHIP_LINKS => [ self::RELATIONSHIP_LINKS => [
Link::RELATED => $this->createLinkToResource($resource->owner), Link::RELATED => $this->createLinkToResource($resource->owner),
], ],
self::RELATIONSHIP_DATA => $resource->owner, self::RELATIONSHIP_DATA => $resource->owner,
]; ]
: [self::RELATIONSHIP_DATA => null];
$relationships[self::REL_EDITOR] = $resource['editor_id'] $relationships[self::REL_EDITOR] = $resource->editor
? [ ? [
self::RELATIONSHIP_LINKS => [ self::RELATIONSHIP_LINKS => [
Link::RELATED => $this->createLinkToResource($resource->editor), Link::RELATED => $this->createLinkToResource($resource->editor),
...@@ -84,7 +86,7 @@ class Block extends SchemaProvider ...@@ -84,7 +86,7 @@ class Block extends SchemaProvider
: [self::RELATIONSHIP_DATA => null]; : [self::RELATIONSHIP_DATA => null];
$relationships[self::REL_EDITBLOCKER] = $resource['edit_blocker_id'] $relationships[self::REL_EDITBLOCKER] = $resource->edit_blocker
? [ ? [
self::RELATIONSHIP_LINKS_SELF => true, self::RELATIONSHIP_LINKS_SELF => true,
self::RELATIONSHIP_LINKS => [ self::RELATIONSHIP_LINKS => [
......
...@@ -50,7 +50,7 @@ class Container extends SchemaProvider ...@@ -50,7 +50,7 @@ class Container extends SchemaProvider
$relationships = []; $relationships = [];
$relationships = $this->addBlocksRelationship($relationships, $resource, $this->shouldInclude($context, self::REL_BLOCKS)); $relationships = $this->addBlocksRelationship($relationships, $resource, $this->shouldInclude($context, self::REL_BLOCKS));
$relationships[self::REL_OWNER] = $resource['owner_id'] $relationships[self::REL_OWNER] = $resource->owner
? [ ? [
self::RELATIONSHIP_LINKS => [ self::RELATIONSHIP_LINKS => [
Link::RELATED => $this->createLinkToResource($resource->owner), Link::RELATED => $this->createLinkToResource($resource->owner),
...@@ -59,7 +59,7 @@ class Container extends SchemaProvider ...@@ -59,7 +59,7 @@ class Container extends SchemaProvider
] ]
: [self::RELATIONSHIP_DATA => $resource->owner]; : [self::RELATIONSHIP_DATA => $resource->owner];
$relationships[self::REL_EDITOR] = $resource['editor_id'] $relationships[self::REL_EDITOR] = $resource->editor
? [ ? [
self::RELATIONSHIP_LINKS => [ self::RELATIONSHIP_LINKS => [
Link::RELATED => $this->createLinkToResource($resource->editor), Link::RELATED => $this->createLinkToResource($resource->editor),
...@@ -68,7 +68,7 @@ class Container extends SchemaProvider ...@@ -68,7 +68,7 @@ class Container extends SchemaProvider
] ]
: [self::RELATIONSHIP_DATA => null]; : [self::RELATIONSHIP_DATA => null];
$relationships[self::REL_EDITBLOCKER] = $resource['edit_blocker_id'] $relationships[self::REL_EDITBLOCKER] = $resource->edit_blocker
? [ ? [
self::RELATIONSHIP_LINKS_SELF => true, self::RELATIONSHIP_LINKS_SELF => true,
self::RELATIONSHIP_LINKS => [ self::RELATIONSHIP_LINKS => [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment