SF patch [2560974] for SF feature request [2560839] Make sitemap directory configurable

git-svn-id: http://scm.dspace.org/svn/repo/branches/dspace-1_5_x@3471 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
Claudia Juergen
2009-02-11 09:54:23 +00:00
parent c76ddaf003
commit 277383c20d
5 changed files with 764 additions and 763 deletions

View File

@@ -186,8 +186,7 @@ public class GenerateSitemaps
String handleURLStem = ConfigurationManager.getProperty("dspace.url") String handleURLStem = ConfigurationManager.getProperty("dspace.url")
+ "/handle/"; + "/handle/";
File outputDir = new File(ConfigurationManager File outputDir = new File(ConfigurationManager.getProperty("sitemap.dir"));
.getProperty("dspace.dir"), "sitemaps");
if (!outputDir.exists()) { if (!outputDir.exists()) {
outputDir.mkdir(); outputDir.mkdir();
} }

View File

@@ -111,8 +111,7 @@ public class SitemapServlet extends DSpaceServlet
HttpServletResponse response, String file, String mimeType, HttpServletResponse response, String file, String mimeType,
boolean compressed) throws ServletException, IOException boolean compressed) throws ServletException, IOException
{ {
File f = new File(ConfigurationManager.getProperty("dspace.dir") File f = new File(ConfigurationManager.getProperty("sitemap.dir"), file);
+ File.separator + "sitemaps", file);
if (!f.exists()) if (!f.exists())
{ {

View File

@@ -158,8 +158,7 @@ public class SitemapReader extends AbstractReader implements Recyclable
private void sendFile(String file, private void sendFile(String file,
boolean compressed) throws IOException, ResourceNotFoundException boolean compressed) throws IOException, ResourceNotFoundException
{ {
File f = new File(ConfigurationManager.getProperty("dspace.dir") File f = new File(ConfigurationManager.getProperty("sitemap.dir"), file);
+ File.separator + "sitemaps", file);
HttpServletResponse httpResponse = (HttpServletResponse) objectModel.get(HttpEnvironment.HTTP_RESPONSE_OBJECT); HttpServletResponse httpResponse = (HttpServletResponse) objectModel.get(HttpEnvironment.HTTP_RESPONSE_OBJECT);

View File

@@ -17,6 +17,7 @@
- [2513300] Fix for bug [1774958] Nested folders do not export correctly - [2513300] Fix for bug [1774958] Nested folders do not export correctly
- Fix for SF bug [2086481] xmlui Administrative log in as another eperson - Fix for SF bug [2086481] xmlui Administrative log in as another eperson
- Fix for SF bug [2155479] Submission verify page handles dc.identifier.* incorrectly - Fix for SF bug [2155479] Submission verify page handles dc.identifier.* incorrectly
- SF patch [2560974] for SF feature request [2560839] Make sitemap directory configurable
(Stuart Lewis / Chris Yates / Flavio Botelho / Alex Barbieri / Reuben Pasquini / Paulo Matos) (Stuart Lewis / Chris Yates / Flavio Botelho / Alex Barbieri / Reuben Pasquini / Paulo Matos)
- [2057378] Hierarchical LDAP support - [2057378] Hierarchical LDAP support

View File

@@ -1044,6 +1044,9 @@ xmlui.content_disposition_threshold = 8388608
#### Sitemap settings ##### #### Sitemap settings #####
# the directory where the generated sitemaps are stored
sitemap.dir = ${dspace.dir}/sitemaps
# #
# Comma-separated list of search engine URLs to 'ping' when a new Sitemap has # Comma-separated list of search engine URLs to 'ping' when a new Sitemap has
# been created. Include everything except the Sitemap URL itself (which will # been created. Include everything except the Sitemap URL itself (which will