Bugzilla – Attachment 58798 Details for
Bug 17879
Possible to upload images with no image name
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17879: Use image filename if no image name is entered
Bug-17879-Use-image-filename-if-no-image-name-is-e.patch (text/plain), 1.55 KB, created by
Jonathan Druart
on 2017-01-11 08:59:08 UTC
(
hide
)
Description:
Bug 17879: Use image filename if no image name is entered
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-01-11 08:59:08 UTC
Size:
1.55 KB
patch
obsolete
>From 8076c0a06829b767fdee17826aeb6c087266d81e Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Tue, 10 Jan 2017 22:20:40 +0000 >Subject: [PATCH] Bug 17879: Use image filename if no image name is entered > >This patch changes the code to use the filename of the uploaded image if >no specific image name is entered. > >To test: >1) Go to Tools -> Patron card creator -> Manage images >2) Upload an image and leave the image name field empty >3) Notice this works and 'Name' is left empty. >4) Apply patch and refresh page >5) Upload an image and leave the image name field empty >6) Notice the image name is given the filename so that 'Name' is no >longer empty. > >Sponsored-by: Catalyst IT >Signed-off-by: Claire Gravely <claire_gravely@hotmail.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > patroncards/image-manage.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/patroncards/image-manage.pl b/patroncards/image-manage.pl >index 78f0463..ed0302c 100755 >--- a/patroncards/image-manage.pl >+++ b/patroncards/image-manage.pl >@@ -26,8 +26,8 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user({ > debug => 0, > }); > >-my $image_name = $cgi->param('image_name') || ''; > my $file_name = $cgi->param('uploadfile') || ''; >+my $image_name = $cgi->param('image_name') || $file_name; > my $upload_file = $cgi->upload('uploadfile') || ''; > my $op = $cgi->param('op') || 'none'; > my @image_ids = $cgi->multi_param('image_id') if $cgi->param('image_id'); >-- >2.1.4
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 17879
:
58788
|
58795
| 58798