Index: branches/lucene-search-2.1/src/org/wikimedia/lsearch/util/Configure.java |
— | — | @@ -1,6 +1,7 @@ |
2 | 2 | package org.wikimedia.lsearch.util; |
3 | 3 | |
4 | 4 | import java.io.BufferedReader; |
| 5 | +import java.io.File; |
5 | 6 | import java.io.FileInputStream; |
6 | 7 | import java.io.FileNotFoundException; |
7 | 8 | import java.io.FileOutputStream; |
— | — | @@ -39,6 +40,12 @@ |
40 | 41 | if(mediawiki.endsWith(System.getProperty("file.separator"))) |
41 | 42 | mediawiki = mediawiki.substring(0,mediawiki.length()-1); |
42 | 43 | |
| 44 | + if( ! new File(mediawiki+"/LocalSettings.php").exists() ){ |
| 45 | + System.out.println("ERROR: "+mediawiki+" does not appear to contain a MediaWiki installation. "); |
| 46 | + System.out.println("Please give full path to root directory (where LocaliseSettings.php is) of your MediWiki installation. "); |
| 47 | + return; |
| 48 | + } |
| 49 | + |
43 | 50 | String dbname = getVariable(mediawiki,"wgDBname"); |
44 | 51 | String scriptPath = getVariable(mediawiki,"wgScriptPath"); |
45 | 52 | String server = getVariable(mediawiki,"wgServer"); |