View | Details | Raw Unified | Return to bug 17047
Collapse All | Expand All

(-)a/Koha/Report.pm (-13 / +28 lines)
Lines 37-80 Koha::Report - Koha Report Object Class Link Here
37
37
38
=cut
38
=cut
39
39
40
=head3 type
40
=head3 get_search_info
41
41
42
=cut
42
=cut
43
43
44
sub get_search_info {
44
sub get_search_info {
45
    my $self=shift;
45
    my $self = shift;
46
    my $sub_mana_info = { 'query' => shift };
46
    my $sub_mana_info = { 'query' => shift };
47
    return $sub_mana_info;
47
    return $sub_mana_info;
48
}
48
}
49
49
50
sub get_sharable_info{
50
=head3 get_sharable_info
51
    my $self=shift;
51
52
    my $shared_report_id=shift;
52
=cut
53
    my $report = Koha::Reports->find($shared_report_id);
53
54
    my $sub_mana_info = {
54
sub get_sharable_info {
55
        'savedsql' => $report->savedsql,
55
    my $self             = shift;
56
        'report_name' => $report->report_name,
56
    my $shared_report_id = shift;
57
        'notes' => $report->notes,
57
    my $report           = Koha::Reports->find($shared_report_id);
58
    my $sub_mana_info    = {
59
        'savedsql'     => $report->savedsql,
60
        'report_name'  => $report->report_name,
61
        'notes'        => $report->notes,
58
        'report_group' => $report->report_group,
62
        'report_group' => $report->report_group,
59
        'type' => $report->type,
63
        'type'         => $report->type,
60
    };
64
    };
61
    return $sub_mana_info;
65
    return $sub_mana_info;
62
}
66
}
63
67
64
sub new_from_mana{
68
=head3 new_from_mana
69
70
=cut
71
72
sub new_from_mana {
65
    my $self = shift;
73
    my $self = shift;
66
    my $data = shift;
74
    my $data = shift;
75
76
    $data->{mana_id} = $data->{id};
77
67
    delete $data->{exportemail};
78
    delete $data->{exportemail};
68
    delete $data->{kohaversion};
79
    delete $data->{kohaversion};
69
    delete $data->{creationdate};
80
    delete $data->{creationdate};
70
    delete $data->{lastimport};
81
    delete $data->{lastimport};
71
    $data->{mana_id} = $data->{id};
72
    delete $data->{id};
82
    delete $data->{id};
73
    delete $data->{nbofusers};
83
    delete $data->{nbofusers};
74
    delete $data->{language};
84
    delete $data->{language};
85
75
    Koha::Report->new($data)->store;
86
    Koha::Report->new($data)->store;
76
}
87
}
77
88
89
=head3 type
90
91
=cut
92
78
sub _type {
93
sub _type {
79
    return 'SavedSql';
94
    return 'SavedSql';
80
}
95
}
(-)a/Koha/Reports.pm (+4 lines)
Lines 45-50 sub _type { Link Here
45
    return 'SavedSql';
45
    return 'SavedSql';
46
}
46
}
47
47
48
=head3 object_class
49
50
=cut
51
48
sub object_class {
52
sub object_class {
49
    return 'Koha::Report';
53
    return 'Koha::Report';
50
}
54
}
(-)a/Koha/SharedContent.pm (+32 lines)
Lines 28-33 use C4::Context; Link Here
28
28
29
our $MANA_IP = C4::Context->config('mana_config');
29
our $MANA_IP = C4::Context->config('mana_config');
30
30
31
=head1 DESCRIPTION
32
33
Package for accessing shared content via Mana
34
35
=head2 Package Functions
36
37
=cut
38
39
=head3 manaRequest
40
41
=cut
42
31
sub manaRequest {
43
sub manaRequest {
32
    my $mana_request = shift;
44
    my $mana_request = shift;
33
    my $result;
45
    my $result;
Lines 53-58 sub manaRequest { Link Here
53
    return $result ;
65
    return $result ;
54
}
66
}
55
67
68
=head3 manaIncrementRequest
69
70
=cut
71
56
sub manaIncrementRequest {
72
sub manaIncrementRequest {
57
    my $resource = shift;
73
    my $resource = shift;
58
    my $id       = shift;
74
    my $id       = shift;
Lines 71-76 sub manaIncrementRequest { Link Here
71
    return manaRequest($request);
87
    return manaRequest($request);
72
}
88
}
73
89
90
=head3 manaPostRequest
91
92
=cut
93
74
sub manaPostRequest {
94
sub manaPostRequest {
75
    my $resource = shift;
95
    my $resource = shift;
76
    my $content  = shift;
96
    my $content  = shift;
Lines 84-89 sub manaPostRequest { Link Here
84
    return manaRequest($request);
104
    return manaRequest($request);
85
}
105
}
86
106
107
=head3 manaShareInfos
108
109
=cut
110
87
sub manaShareInfos{
111
sub manaShareInfos{
88
    my ($query, $loggedinuser, $ressourceid, $ressourcetype) = @_;
112
    my ($query, $loggedinuser, $ressourceid, $ressourcetype) = @_;
89
    my $mana_language;
113
    my $mana_language;
Lines 132-137 sub manaShareInfos{ Link Here
132
    return $result;
156
    return $result;
133
}
157
}
134
158
159
=head3 manaGetRequestWithId
160
161
=cut
162
135
sub manaGetRequestWithId {
163
sub manaGetRequestWithId {
136
    my $resource = shift;
164
    my $resource = shift;
137
    my $id       = shift;
165
    my $id       = shift;
Lines 142-147 sub manaGetRequestWithId { Link Here
142
    return manaRequest($request);
170
    return manaRequest($request);
143
}
171
}
144
172
173
=head3 manaGetRequest
174
175
=cut
176
145
sub manaGetRequest {
177
sub manaGetRequest {
146
    my $resource   = shift;
178
    my $resource   = shift;
147
    my $parameters = shift;
179
    my $parameters = shift;
(-)a/Koha/Subscription.pm (-1 / +10 lines)
Lines 41-47 Koha::Subscription - Koha Subscription Object class Link Here
41
41
42
=cut
42
=cut
43
43
44
=head3 type
44
=head3 get_search_info
45
45
46
=cut
46
=cut
47
47
Lines 62-67 sub get_search_info { Link Here
62
    return $sub_mana_info;
62
    return $sub_mana_info;
63
}
63
}
64
64
65
=head3 get_sharable_info
66
67
=cut
68
65
sub get_sharable_info {
69
sub get_sharable_info {
66
    my $self = shift;
70
    my $self = shift;
67
    my $shared_sub_id = shift;
71
    my $shared_sub_id = shift;
Lines 108-113 sub get_sharable_info { Link Here
108
    return $sub_mana_info;
112
    return $sub_mana_info;
109
}
113
}
110
114
115
116
=head3 _type
117
118
=cut
119
111
sub _type {
120
sub _type {
112
    return 'Subscription';
121
    return 'Subscription';
113
}
122
}
(-)a/Koha/Subscription/Numberpatterns.pm (-1 / +1 lines)
Lines 32-38 Koha::SubscriptionNumberpatterns - Koha SubscriptionNumberpattern object set cla Link Here
32
32
33
=cut
33
=cut
34
34
35
=head3 uniqeLabel
35
=head3 uniqueLabel
36
36
37
=cut
37
=cut
38
38
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web_services.pref (-1 / +1 lines)
Lines 59-65 Web services: Link Here
59
             - "Security token used to authenticate on mana:"
59
             - "Security token used to authenticate on mana:"
60
             - pref: ManaToken
60
             - pref: ManaToken
61
               class: Text
61
               class: Text
62
             - <br> You need a security token to authenticate on Mana. If this sytem preference is empty, please fill in the following form, you will receive an email to confirm and activate your token. <script src=/intranet-tmpl/lib/jquery/activatemana.js></script> <br> <form> Firstname <input name="firstname" type="text" id="firstname"> <br> Lastname <input name="lastname" type=text id=lastname> <br> email <input name="email" type=text id=email><br> <input type=submit id=activatemana value="Send"></form>
62
             - <br> You need a security token to authenticate on Mana. If this sytem preference is empty, please fill in the following form, you will receive an email to confirm and activate your token. <script src=/intranet-tmpl/lib/jquery/activatemana.js></script> <br> <form> First name <input name="firstname" type="text" id="firstname"> <br> Last name <input name="lastname" type=text id=lastname> <br> Email address <input name="email" type=text id=email><br> <input type=submit id=activatemana value="Send"></form>
63
        -
63
        -
64
            - 'Fields automatically shared with mana'
64
            - 'Fields automatically shared with mana'
65
            - pref: AutoShareWithMana
65
            - pref: AutoShareWithMana
(-)a/serials/serials-collection.pl (-1 / +1 lines)
Lines 82-88 if($op eq 'gennext' && @subscriptionid){ Link Here
82
            ) = GetNextSeq($subscription, $pattern, $frequency, $expected->{publisheddate});
82
            ) = GetNextSeq($subscription, $pattern, $frequency, $expected->{publisheddate});
83
83
84
             ## We generate the next publication date
84
             ## We generate the next publication date
85
             my $frequency = C4::Serials::Frequency::GetSubscriptionFrequency($subscription->{periodicity});
85
             $frequency = C4::Serials::Frequency::GetSubscriptionFrequency($subscription->{periodicity});
86
             my $nextpublisheddate = GetNextDate($subscription, $expected->{publisheddate}, $frequency, 1);
86
             my $nextpublisheddate = GetNextDate($subscription, $expected->{publisheddate}, $frequency, 1);
87
             ## Creating the new issue
87
             ## Creating the new issue
88
             NewIssue( $newserialseq, $subscriptionid, $subscription->{'biblionumber'},
88
             NewIssue( $newserialseq, $subscriptionid, $subscription->{'biblionumber'},
(-)a/t/db_dependent/Serials.t (-2 / +1 lines)
Lines 288-294 my $pattern = C4::Serials::Numberpattern::GetSubscriptionNumberpattern($subscrip Link Here
288
( $total_issues, @serials ) = C4::Serials::GetSerials( $subscriptionid );
288
( $total_issues, @serials ) = C4::Serials::GetSerials( $subscriptionid );
289
my $publisheddate = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 });
289
my $publisheddate = output_pref({ dt => dt_from_string, dateformat => 'iso', dateonly => 1 });
290
( $total_issues, @serials ) = C4::Serials::GetSerials( $subscriptionid );
290
( $total_issues, @serials ) = C4::Serials::GetSerials( $subscriptionid );
291
my $frequency = C4::Serials::Frequency::GetSubscriptionFrequency($subscription->{periodicity});
291
$frequency = C4::Serials::Frequency::GetSubscriptionFrequency($subscription->{periodicity});
292
my $nextpublisheddate = C4::Serials::GetNextDate($subscription, $publisheddate, $frequency, 1);
292
my $nextpublisheddate = C4::Serials::GetNextDate($subscription, $publisheddate, $frequency, 1);
293
my @statuses = qw( 2 2 3 3 3 3 3 4 4 41 42 43 44 5 );
293
my @statuses = qw( 2 2 3 3 3 3 3 4 4 41 42 43 44 5 );
294
# Add 14 serials
294
# Add 14 serials
295
- 

Return to bug 17047