Skip to content

Commit

Permalink
feat: new folder structure as suggested by adrian
Browse files Browse the repository at this point in the history
  • Loading branch information
BernhardBaumrock committed May 16, 2024
1 parent 8a7f520 commit a46ab0b
Show file tree
Hide file tree
Showing 16 changed files with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RockAdminTweaks.module.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ private function loadTweakArray(): void
'extensions' => ['php'],
]);
foreach ($files as $file) {
$folder = basename(dirname($file));
$name = substr(basename($file), 0, -4);
$folder = basename(dirname(dirname($file)));
$arr["$folder:$name"] = $file;
}
}
Expand Down Expand Up @@ -147,7 +147,7 @@ private function moduleConfigAdd(&$inputfields): void
$tgroup = ucfirst((string)$this->wire->input->post->tgroup);
$tname = ucfirst((string)$this->wire->input->post->tname);
if ($tgroup && $tname) {
$path = $this->tweakPathTemplates . $tgroup;
$path = $this->tweakPathTemplates . "$tgroup/$tname";
$newFile = "$path/$tname.php";
if (is_file($newFile)) {
$this->error("$newFile already exists");
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit a46ab0b

Please sign in to comment.