mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-05-04 18:08:46 +03:00
Modules: Improved install command based on testing
- Updated output to be clearer - Added warning and confirmation to local install flow - Adjusted module folder name creation
This commit is contained in:
@@ -44,7 +44,7 @@ class ThemeModuleManager
|
||||
*/
|
||||
public function addFromZip(string $name, ThemeModuleZip $zip): ThemeModule
|
||||
{
|
||||
$baseFolderName = Str::limit(Str::slug($name), 20);
|
||||
$baseFolderName = Str::limit(Str::slug($name), 40, '');
|
||||
$folderName = $baseFolderName;
|
||||
while (!$baseFolderName || file_exists($this->modulesFolderPath . DIRECTORY_SEPARATOR . $folderName)) {
|
||||
$folderName = ($baseFolderName ?: 'mod') . '-' . Str::random(4);
|
||||
|
||||
Reference in New Issue
Block a user