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

(-)a/Koha/Plugins/Method.pm (+44 lines)
Line 0 Link Here
1
package Koha::Plugins::Method;
2
3
# This file is part of Koha.
4
#
5
# Koha is free software; you can redistribute it and/or modify it under the
6
# terms of the GNU General Public License as published by the Free Software
7
# Foundation; either version 3 of the License, or (at your option) any later
8
# version.
9
#
10
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
11
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License along
15
# with Koha; if not, write to the Free Software Foundation, Inc.,
16
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
18
use Modern::Perl;
19
20
use Carp;
21
22
use Koha::Database;
23
24
use base qw(Koha::Object);
25
26
=head1 NAME
27
28
Koha::Plugin::Method - Koha Plugin Method Object class
29
30
=head1 API
31
32
=head2 Class Methods
33
34
=cut
35
36
=head3 type
37
38
=cut
39
40
sub _type {
41
    return 'PluginMethod';
42
}
43
44
1;
(-)a/Koha/Plugins/Methods.pm (+50 lines)
Line 0 Link Here
1
package Koha::Plugins::Methods;
2
3
# This file is part of Koha.
4
#
5
# Koha is free software; you can redistribute it and/or modify it under the
6
# terms of the GNU General Public License as published by the Free Software
7
# Foundation; either version 3 of the License, or (at your option) any later
8
# version.
9
#
10
# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
11
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13
#
14
# You should have received a copy of the GNU General Public License along
15
# with Koha; if not, write to the Free Software Foundation, Inc.,
16
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
18
use Modern::Perl;
19
20
use Carp;
21
22
use Koha::Database;
23
24
use Koha::City;
25
26
use base qw(Koha::Objects);
27
28
=head1 NAME
29
30
Koha::Plugin::Methods - Koha City Object set class
31
32
=head1 API
33
34
=head2 Class Methods
35
36
=cut
37
38
=head3 type
39
40
=cut
41
42
sub _type {
43
    return 'PluginMethod';
44
}
45
46
sub object_class {
47
    return 'Koha::Plugin::Method';
48
}
49
50
1;
(-)a/Koha/Schema/Result/PluginMethod.pm (+67 lines)
Line 0 Link Here
1
use utf8;
2
package Koha::Schema::Result::PluginMethod;
3
4
# Created by DBIx::Class::Schema::Loader
5
# DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7
=head1 NAME
8
9
Koha::Schema::Result::PluginMethod
10
11
=cut
12
13
use strict;
14
use warnings;
15
16
use base 'DBIx::Class::Core';
17
18
=head1 TABLE: C<plugin_methods>
19
20
=cut
21
22
__PACKAGE__->table("plugin_methods");
23
24
=head1 ACCESSORS
25
26
=head2 plugin_class
27
28
  data_type: 'varchar'
29
  is_nullable: 0
30
  size: 255
31
32
=head2 plugin_method
33
34
  data_type: 'varchar'
35
  is_nullable: 0
36
  size: 255
37
38
=cut
39
40
__PACKAGE__->add_columns(
41
  "plugin_class",
42
  { data_type => "varchar", is_nullable => 0, size => 255 },
43
  "plugin_method",
44
  { data_type => "varchar", is_nullable => 0, size => 255 },
45
);
46
47
=head1 PRIMARY KEY
48
49
=over 4
50
51
=item * L</plugin_class>
52
53
=item * L</plugin_method>
54
55
=back
56
57
=cut
58
59
__PACKAGE__->set_primary_key("plugin_class", "plugin_method");
60
61
62
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2018-07-13 12:37:57
63
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:koGk3Dh0wkslqYPUqUcK0w
64
65
66
# You can replace this text with custom code or comments, and it will be preserved on regeneration
67
1;
(-)a/installer/data/mysql/atomicupdate/plugin_methods.perl (+18 lines)
Line 0 Link Here
1
$DBversion = 'XXX';  # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
4
    $dbh->do(q{
5
        CREATE TABLE IF NOT EXISTS plugin_methods (
6
          plugin_class varchar(255) NOT NULL,
7
          plugin_method varchar(255) NOT NULL,
8
          PRIMARY KEY ( `plugin_class` (191), `plugin_method` (191) )
9
        ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
10
    });
11
12
    require Koha::Plugins;
13
    Koha::Plugins->new()->InstallPlugins;
14
15
    # Always end with this (adjust the bug info)
16
    SetVersion( $DBversion );
17
    print "Upgrade to $DBversion done (Bug XXXXX - description)\n";
18
}
(-)a/installer/data/mysql/kohastructure.sql (-1 / +10 lines)
Lines 3534-3539 CREATE TABLE patron_consent ( Link Here
3534
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3534
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3535
3535
3536
--
3536
--
3537
-- Table structure for table 'plugin_data'
3538
--
3539
3540
CREATE TABLE IF NOT EXISTS plugin_methods (
3541
  plugin_class varchar(255) NOT NULL,
3542
  plugin_method varchar(255) NOT NULL,
3543
  PRIMARY KEY ( `plugin_class` (191), `plugin_method` (191) )
3544
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
3545
3546
--
3537
-- Table structure for table `patron_lists`
3547
-- Table structure for table `patron_lists`
3538
--
3548
--
3539
3549
3540
- 

Return to bug 21073