We always want to try the default site bundle.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@1768 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2006-01-21 21:36:06 +00:00
parent 1cded0f96c
commit ae49badf90
@@ -93,22 +93,16 @@ public class SiteResourceManager extends ResourceManagerImpl
resource.setRuntimeServices(rsvc); resource.setRuntimeServices(rsvc);
resource.setEncoding(encoding); resource.setEncoding(encoding);
// if the resource was requested using a site resource key, we can // first try loading it via the site-specific resource loader
// attempt to load a site-specific version; also make sure the site try {
// we're loading for is not the default site, in which case we want to resource.setName(resourceName);
// skip to the second resource loader directly resolveResource(resource, _siteLoader);
if (skey.siteId != -1 && skey.siteId != SiteIdentifier.DEFAULT_SITE_ID) { } catch (ResourceNotFoundException rnfe) {
// try loading it via the site-specific resource loader // nothing to worry about here
try {
resource.setName(resourceName);
resolveResource(resource, _siteLoader);
} catch (ResourceNotFoundException rnfe) {
// nothing to worry about here
}
} }
// try the servlet context loader if we didn't find a site-specific // then try the servlet context loader if we didn't find a
// resource // site-specific resource
if (resource.getData() == null) { if (resource.getData() == null) {
resource.setName(skey.path); resource.setName(skey.path);
resolveResource(resource, _contextLoader); resolveResource(resource, _contextLoader);