Skip to content

Commit a54a9d2

Browse files
committed
Add .htaccess to important files #50
1 parent dd4966e commit a54a9d2

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

src/org/netbeans/modules/php/wordpress/ConfigurationFiles.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ public final class ConfigurationFiles extends FileChangeAdapter implements Impor
6868
// @GuardedBy("this")
6969
private boolean isInitialized = false;
7070
private static final String WP_CONFIG_PHP = "wp-config.php"; // NOI18N
71+
private static final String HTACCESS = ".htaccess"; // NOI18N
72+
private static final String[] CONFIG_FILES = {
73+
WP_CONFIG_PHP,
74+
HTACCESS
75+
};
7176

7277
public ConfigurationFiles(PhpModule phpModule) {
7378
assert phpModule != null;
@@ -79,9 +84,11 @@ public Collection<FileInfo> getFiles() {
7984
FileObject wordPressRoot = getWordPressRoot();
8085
List<FileInfo> files = new ArrayList<>();
8186
if (wordPressRoot != null) {
82-
FileObject config = wordPressRoot.getFileObject(WP_CONFIG_PHP);
83-
if (config != null) {
84-
files.add(new FileInfo(config));
87+
for (String configFile : CONFIG_FILES) {
88+
FileObject config = wordPressRoot.getFileObject(configFile);
89+
if (config != null) {
90+
files.add(new FileInfo(config));
91+
}
8592
}
8693
}
8794
return files;

0 commit comments

Comments
 (0)