File tree Expand file tree Collapse file tree 3 files changed +26
-5
lines changed Expand file tree Collapse file tree 3 files changed +26
-5
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
## [ Unreleased]
9
9
10
+ ## [ 0.0.4] - 2019-06-10
11
+
12
+ ### Fixed
13
+ - Fix an issue where 'site-' prefix was unnecessarily added to module directories.
14
+
10
15
## [ 0.0.3] - 2019-06-07
11
16
12
17
### Added
Original file line number Diff line number Diff line change @@ -82,11 +82,6 @@ protected function getName(PackageInterface $package) {
82
82
$ name = $ extra ['installer-name ' ];
83
83
}
84
84
85
- // make sure that the directory name has a site- prefix; if not, add
86
- if (strpos ($ name , 'site- ' ) !== 0 ) {
87
- $ name = 'site- ' . $ name ;
88
- }
89
-
90
85
return $ name ;
91
86
}
92
87
Original file line number Diff line number Diff line change @@ -60,6 +60,27 @@ public function getInstallPath(PackageInterface $package)
60
60
return $ this ->getFullPath ($ package , static ::BASE_PATH );
61
61
}
62
62
63
+ /**
64
+ * Get the directory name from package name
65
+ *
66
+ * Default directory name can be overridden by specifying extra argument
67
+ * "installer-name" in the composer.json of the package in question.
68
+ *
69
+ * @param PackageInterface $package
70
+ * @return string Module or site profile name.
71
+ */
72
+ protected function getName (PackageInterface $ package ) {
73
+ // fetch initial directory name
74
+ $ name = parent ::getName ($ package );
75
+
76
+ // make sure that the directory name has a site- prefix; if not, add
77
+ if (strpos ($ name , 'site- ' ) !== 0 ) {
78
+ $ name = 'site- ' . $ name ;
79
+ }
80
+
81
+ return $ name ;
82
+ }
83
+
63
84
/**
64
85
* Get nested site directory path, or null if none found
65
86
*
You can’t perform that action at this time.
0 commit comments