Bugzilla – Attachment 78576 Details for
Bug 10662
Build OAI-PMH Harvesting Client
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Use old style of UUID generation
Use-old-style-of-UUID-generation.patch (text/plain), 2.49 KB, created by
David Cook
on 2018-09-11 19:50:14 UTC
(
hide
)
Description:
Use old style of UUID generation
Filename:
MIME Type:
Creator:
David Cook
Created:
2018-09-11 19:50:14 UTC
Size:
2.49 KB
patch
obsolete
>From 8bf9e036bbd647dd639e7d24088d78c9ee6a12c5 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Thu, 13 Jul 2017 15:22:41 +1000 >Subject: [PATCH] Use old style of UUID generation > >https://bugs.koha-community.org/show_bug.cgi?id=10662 >--- > Koha/OAI/Harvester/Worker/Download/Stream.pm | 7 +++++-- > tools/oai-pmh-harvester/request.pl | 10 ++++++---- > 2 files changed, 11 insertions(+), 6 deletions(-) > >diff --git a/Koha/OAI/Harvester/Worker/Download/Stream.pm b/Koha/OAI/Harvester/Worker/Download/Stream.pm >index 03f64951b7..32276fd9bc 100644 >--- a/Koha/OAI/Harvester/Worker/Download/Stream.pm >+++ b/Koha/OAI/Harvester/Worker/Download/Stream.pm >@@ -19,7 +19,7 @@ package Koha::OAI::Harvester::Worker::Download::Stream; > > use Modern::Perl; > use LWP::UserAgent; >-use UUID qw/uuid/; >+use UUID; > use POE; > use JSON; > use File::Path qw/make_path/; >@@ -134,7 +134,10 @@ sub do_work { > if ( ! -d $spooldir ){ > my $made_spool_directory = make_path($spooldir); > } >- my $file_uuid = uuid(); >+ my ($uuid,$uuid_string); >+ UUID::generate($uuid); >+ UUID::unparse($uuid, $uuid_string); >+ my $file_uuid = $uuid_string; > my $filename = "$spooldir/$file_uuid"; > my $state = $document->toFile($filename, 2); > if ($state){ >diff --git a/tools/oai-pmh-harvester/request.pl b/tools/oai-pmh-harvester/request.pl >index e980074d0e..db0356f745 100755 >--- a/tools/oai-pmh-harvester/request.pl >+++ b/tools/oai-pmh-harvester/request.pl >@@ -18,7 +18,7 @@ > # along with Koha; if not, see <http://www.gnu.org/licenses>. > > use Modern::Perl; >-use UUID qw/uuid/; >+use UUID; > > use C4::Auth; > use C4::Output; >@@ -109,8 +109,10 @@ if ($op eq "new"){ > } > elsif ($op eq "create"){ > if ($save){ >- my $uuid = uuid; >- $request->uuid($uuid); >+ my ($uuid,$uuid_string); >+ UUID::generate($uuid); >+ UUID::unparse($uuid, $uuid_string); >+ $request->uuid($uuid_string); > $request->store; > print $input->redirect('/cgi-bin/koha/tools/oai-pmh-harvester/dashboard.pl#saved_results'); > exit; >@@ -139,4 +141,4 @@ else { > $template->{VARS}->{ op } = $op; > $template->{VARS}->{ oai_pmh_request } = $request; > >-output_html_with_http_headers($input, $cookie, $template->output); >\ No newline at end of file >+output_html_with_http_headers($input, $cookie, $template->output); >-- >2.13.6
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10662
:
20757
|
20758
|
21954
|
42446
|
42447
|
42448
|
44792
|
44793
|
47675
|
48096
|
49832
|
50254
|
50980
|
51510
|
51511
|
51512
|
51514
|
51562
|
51563
|
51564
|
51565
|
51705
|
53258
|
53259
|
53260
|
53361
|
53362
|
64444
|
64445
|
64446
|
64479
|
64480
|
64481
|
65016
|
65017
|
65018
|
65019
|
68508
|
71008
|
71009
|
71010
|
71011
|
71012
|
71013
|
71014
|
71015
|
78569
|
78570
|
78571
|
78572
|
78573
|
78574
|
78575
|
78576
|
78577
|
78583
|
78601
|
78617
|
78754
|
78756
|
78758
|
78760
|
78762
|
78764
|
78767
|
78769
|
78771
|
78859
|
78860
|
78914
|
78956
|
79039
|
79045
|
81783
|
81784
|
81786
|
81789
|
81790
|
81855
|
81856
|
81861
|
81862
|
81863
|
81864
|
81902
|
82219
|
84318
|
84319
|
84320
|
84321
|
84322
|
85152
|
85224
|
85225
|
85226
|
85227
|
85228
|
85229
|
99739
|
99740
|
99741
|
99742
|
99743
|
99744
|
99745