Bugzilla – Attachment 50477 Details for
Bug 16222
Add REST API folder to Makefile.PL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16222: (QA followup) Add /api dir for the API
Bug-16222-QA-followup-Add-api-dir-for-the-API.patch (text/plain), 4.18 KB, created by
Tomás Cohen Arazi (tcohen)
on 2016-04-20 19:27:31 UTC
(
hide
)
Description:
Bug 16222: (QA followup) Add /api dir for the API
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2016-04-20 19:27:31 UTC
Size:
4.18 KB
patch
obsolete
>From 54fe762e2d9ee1773359819acc4cff877e741592 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 20 Apr 2016 15:59:58 -0300 >Subject: [PATCH] Bug 16222: (QA followup) Add /api dir for the API > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Makefile.PL | 6 +++++- > etc/koha-httpd.conf | 10 +++++----- > rewrite-config.PL | 1 + > 3 files changed, 11 insertions(+), 6 deletions(-) > >diff --git a/Makefile.PL b/Makefile.PL >index 200617f..67faac9 100644 >--- a/Makefile.PL >+++ b/Makefile.PL >@@ -260,7 +260,7 @@ my $target_map = { > './about.pl' => 'INTRANET_CGI_DIR', > './acqui' => 'INTRANET_CGI_DIR', > './admin' => 'INTRANET_CGI_DIR', >- './api' => 'INTRANET_CGI_DIR', >+ './api' => 'API_CGI_DIR', > './authorities' => 'INTRANET_CGI_DIR', > './basket' => 'INTRANET_CGI_DIR', > './C4' => 'PERL_MODULE_DIR', >@@ -1219,6 +1219,7 @@ sub get_target_directories { > my %dirmap = (); > my %skipdirs = (); > if ($mode eq 'single') { >+ $dirmap{'API_CGI_DIR'} = File::Spec->catdir(@basedir, $package, 'api'); > $dirmap{'INTRANET_CGI_DIR'} = File::Spec->catdir(@basedir, $package, 'intranet', 'cgi-bin'); > $dirmap{'INTRANET_TMPL_DIR'} = File::Spec->catdir(@basedir, $package, 'intranet', 'htdocs', 'intranet-tmpl'); > $dirmap{'INTRANET_WWW_DIR'} = File::Spec->catdir(@basedir, $package, 'intranet', 'htdocs'); >@@ -1242,6 +1243,8 @@ sub get_target_directories { > $dirmap{'ZEBRA_RUN_DIR'} = File::Spec->catdir(@basedir, $package, 'var', 'run', 'zebradb'); > } elsif ($mode eq 'dev') { > my $curdir = File::Spec->rel2abs(File::Spec->curdir()); >+ $dirmap{'API_CGI_DIR'} = File::Spec->catdir($curdir, 'api'); >+ $skipdirs{'API_CGI_DIR'} = 1; > $dirmap{'INTRANET_CGI_DIR'} = File::Spec->catdir($curdir); > $skipdirs{'INTRANET_CGI_DIR'} = 1; > $dirmap{'INTRANET_TMPL_DIR'} = File::Spec->catdir($curdir, 'koha-tmpl', 'intranet-tmpl'); >@@ -1275,6 +1278,7 @@ sub get_target_directories { > $dirmap{'ZEBRA_RUN_DIR'} = File::Spec->catdir(@basedir, $package, 'var', 'run', 'zebradb'); > } else { > # mode is standard, i.e., 'fhs' >+ $dirmap{'API_CGI_DIR'} = File::Spec->catdir(@basedir, $package, 'api'); > $dirmap{'INTRANET_CGI_DIR'} = File::Spec->catdir(@basedir, $package, 'intranet', 'cgi-bin'); > $dirmap{'INTRANET_TMPL_DIR'} = File::Spec->catdir(@basedir, $package, 'intranet', 'htdocs', 'intranet-tmpl'); > $dirmap{'INTRANET_WWW_DIR'} = File::Spec->catdir(@basedir, $package, 'intranet', 'htdocs'); >diff --git a/etc/koha-httpd.conf b/etc/koha-httpd.conf >index 32cdf0a..1e1e569 100644 >--- a/etc/koha-httpd.conf >+++ b/etc/koha-httpd.conf >@@ -114,8 +114,8 @@ > RewriteRule ^/issn/([^\/]*)/?$ /search?q=issn:$1 [PT] > > # REST API configuration >- Alias "/api" "__OPAC_CGI_DIR__/api" >- <Directory __OPAC_CGI_DIR__/api> >+ Alias "/api" "__API_CGI_DIR__" >+ <Directory __API_CGI_DIR__> > Options +ExecCGI +FollowSymlinks > AddHandler cgi-script .pl > >@@ -233,8 +233,8 @@ > > > # REST API configuration >- Alias "/api" "__INTRANET_CGI_DIR__/api" >- <Directory __INTRANET_CGI_DIR__/api> >+ Alias "/api" "__API_CGI_DIR__" >+ <Directory __API_CGI_DIR__> > Options +ExecCGI +FollowSymlinks > AddHandler cgi-script .pl > >@@ -261,7 +261,7 @@ > # ErrorLog __LOG_DIR__/koha-api-error_log > # > # <IfModule mod_rewrite.c> >-# <Directory __INTRANET_CGI_DIR__/api> >+# <Directory __API_CGI_DIR__> > # Options +ExecCGI +FollowSymlinks > # AddHandler cgi-script .pl > # >diff --git a/rewrite-config.PL b/rewrite-config.PL >index 3239a59..a66b119 100644 >--- a/rewrite-config.PL >+++ b/rewrite-config.PL >@@ -103,6 +103,7 @@ $prefix = $ENV{'INSTALL_BASE'} || "/usr"; > "__ZEBRA_PASS__" => "zebrastripes", > "__ZEBRA_USER__" => "kohauser", > '__BACKUP_DIR__' => "$prefix/var/spool", >+ '__API_CGI_DIR__' => "$prefix/api", > '__INTRANET_CGI_DIR__' => "$prefix/intranet/cgi-bin", > '__INTRANET_TMPL_DIR__' => "$prefix/intranet/templates", > '__INTRANET_WWW_DIR__' => "$prefix/intranet/www", >-- >2.7.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 16222
:
50012
|
50374
|
50383
| 50477