Project

General

Profile

« Previous | Next » 

Revision 4762

Added by daigle about 15 years ago

Only configure skins that are correctly configured in the skins directory.

View differences:

MetaCatAdminServlet.java
40 40

  
41 41
import edu.ucsb.nceas.metacat.MetaCatServlet;
42 42
import edu.ucsb.nceas.metacat.service.PropertyService;
43
import edu.ucsb.nceas.metacat.service.ServiceException;
44
import edu.ucsb.nceas.metacat.service.ServiceService;
45 43
import edu.ucsb.nceas.metacat.service.SessionService;
46 44
import edu.ucsb.nceas.metacat.util.AuthUtil;
47 45
import edu.ucsb.nceas.metacat.util.MetacatUtil;
......
106 104
			}
107 105
			
108 106
			if (!MetacatUtil.isBackupDirConfigured()) {
109
				String discoveredBackupDir = SystemUtil.discoverExternalBaseDir();
110
				if (discoveredBackupDir == null) {
111
					// if the backup dir has not been configured, and the system 
112
					// cannot find a suitable directory, then show the backup 
113
					// directory configuration screen.
114
					processingMessage.add("You must configure the backup directory"
115
							+ " before you can continue with Metacat configuration.");
116
					RequestUtil.setRequestMessage(request, processingMessage);
117
					action = "backup";
118
					logMetacat.debug("Admin action changed to 'backup'");
119
				} else {
120
					// if the backup dir has not been configured, and the system 
121
					// can find a suitable directory, then set the application.backupDir 
122
					// property to the discovered value
123
					PropertyService.setProperty("application.backupDir", discoveredBackupDir);
124
					ServiceService.refreshService("PropertyService");
125
				}
107
				// if the backup dir has not been configured, then show the
108
				// backup directory configuration screen.
109
				processingMessage.add("You must configure the backup directory"
110
						+ " before you can continue with Metacat configuration.");
111
				RequestUtil.setRequestMessage(request, processingMessage);
112
				action = "backup";
113
				logMetacat.debug("Admin action changed to 'backup'");
126 114
			} else if (!AuthUtil.isAuthConfigured()) {
127 115
				// if authentication isn't configured, change the action to auth.  
128 116
				// Authentication needs to be set up before we do anything else
......
210 198
				"Utility problem while handling request: " + ue.getMessage();
211 199
			logMetacat.error(errorMessage);
212 200
			processingErrors.add(errorMessage);
213
		} catch (ServiceException se) {
214
			String errorMessage = 
215
				"Utility problem while handling request: " + se.getMessage();
216
			logMetacat.error(errorMessage);
217
			processingErrors.add(errorMessage);
218 201
		}
219 202
		
220 203
		if (processingErrors.size() > 0) {

Also available in: Unified diff