FEATURE: add content id to directory name (only for galleries)
This commit is contained in:
@@ -83,15 +83,13 @@ class Gallery implements AppHandler
|
|||||||
|
|
||||||
// create new directory for images
|
// create new directory for images
|
||||||
$directory = Directory::create([
|
$directory = Directory::create([
|
||||||
'name' => $request->title,
|
'name' => $content->id . '_' . $request->title,
|
||||||
'description' => $request->description,
|
'description' => $request->description,
|
||||||
'parent_id' => $parentDirectoryId
|
'parent_id' => $parentDirectoryId
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// save id into module_config array
|
// save id into module_config array
|
||||||
$settings = [
|
$settings = ['directoryId' => $directory->id];
|
||||||
'directoryId' => $directory->id
|
|
||||||
];
|
|
||||||
|
|
||||||
// save settings
|
// save settings
|
||||||
$content->module_settings = json_encode($settings);
|
$content->module_settings = json_encode($settings);
|
||||||
|
|||||||
Reference in New Issue
Block a user