|
Lines 93-103
Share a Koha entity (i.e subscription or report) to Mana KB.
Link Here
|
| 93 |
=cut |
93 |
=cut |
| 94 |
|
94 |
|
| 95 |
sub send_entity { |
95 |
sub send_entity { |
| 96 |
my ($lang, $loggedinuser, $resourceid, $resourcetype, $content) = @_; |
96 |
my ($lang, $loggedinuser, $resourceid, $resourcetype) = @_; |
| 97 |
|
97 |
|
| 98 |
unless ( $content ) { |
98 |
my $content = prepare_entity_data($lang, $loggedinuser, $resourceid, $resourcetype); |
| 99 |
$content = prepare_entity_data($lang, $loggedinuser, $resourceid, $resourcetype); |
|
|
| 100 |
} |
| 101 |
|
99 |
|
| 102 |
my $result = process_request(build_request('post', $resourcetype, $content)); |
100 |
my $result = process_request(build_request('post', $resourcetype, $content)); |
| 103 |
|
101 |
|
|
Lines 109-114
sub send_entity {
Link Here
|
| 109 |
return $result; |
107 |
return $result; |
| 110 |
} |
108 |
} |
| 111 |
|
109 |
|
|
|
110 |
=head3 comment_entity |
| 111 |
|
| 112 |
my $result = Koha::SharedContent::comment_entity($resource_id, $resource_type, $comment); |
| 113 |
|
| 114 |
Send a comment about a Mana entity. |
| 115 |
|
| 116 |
=cut |
| 117 |
|
| 118 |
sub comment_entity { |
| 119 |
my ($resourceid, $resourcetype, $comment) = @_; |
| 120 |
|
| 121 |
my $result = process_request(build_request('post', 'resource_comment', |
| 122 |
{ resource_id => $resourceid, resource_type => $resourcetype, message => $comment })); |
| 123 |
|
| 124 |
return $result; |
| 125 |
} |
| 126 |
|
| 112 |
=head2 prepare_entity_data |
127 |
=head2 prepare_entity_data |
| 113 |
|
128 |
|
| 114 |
$data = prepare_entity_data($language, $borrowernumber, $mana_entity_id, $entity_type); |
129 |
$data = prepare_entity_data($language, $borrowernumber, $mana_entity_id, $entity_type); |