Skip to content

Commit 91e0214

Browse files
committed
refactor!: Refactored to follow new CSK structure
1 parent 3561a71 commit 91e0214

File tree

7 files changed

+31
-73
lines changed

7 files changed

+31
-73
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,18 @@ jobs:
3434
- name: Prepare ZIP contents
3535
run: |
3636
mkdir "${{ steps.vars.outputs.name }}"
37-
rsync -av --exclude='.git' \
38-
--exclude='.github' \
39-
--exclude='.dev' \
40-
--exclude='.gitignore' \
41-
--exclude='.gitattributes' \
42-
--exclude='.editorconfig' \
43-
--exclude='.gitmodules' \
44-
--exclude='CITATION.cff' \
45-
--exclude='*.todolist' \
46-
--exclude="${{ steps.vars.outputs.name }}" \
47-
./ "${{ steps.vars.outputs.name }}"
37+
38+
# Always include src directory if it exists
39+
if [ -d "src" ]; then
40+
cp -r src "${{ steps.vars.outputs.name }}/"
41+
fi
42+
43+
# Optionally include README and LICENSE if present
44+
for f in README.md LICENSE.md; do
45+
if [ -f "$f" ]; then
46+
cp "$f" "${{ steps.vars.outputs.name }}/"
47+
fi
48+
done
4849
4950
- name: Create ZIP archive
5051
run: |

LICENSE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ By purchasing, downloading, installing, or using this Module, you ("Licensee") a
1010

1111
## 1. Grant of License
1212

13-
You are granted a limited, non-exclusive, non-transferable, non-sublicensable license to use the "Dummy" module **in one CSK-powered project** per license purchased. This license is for commercial or personal use, depending on your purchase.
13+
You are granted a limited, non-exclusive, non-transferable, non-sublicensable license to use the "Dummy" module **in one CSK-powered project** per license purchased. This license is for commercial or personal use, depending on your purchase.
1414

1515
---
1616

@@ -45,7 +45,7 @@ This license is effective until terminated. It will terminate automatically if t
4545

4646
## 6. No Warranty
4747

48-
The Module is provided "as is" without warranty of any kind, express or implied. The author is not liable for any damage, loss, or other issues resulting from its use.
48+
The Module is provided "as is" without warranty of any kind, express or implied. The author is not liable for any damage, loss, or other issues resulting from its use.
4949

5050
---
5151

src/.htaccess

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<IfModule authz_core_module>
2+
Require all denied
3+
</IfModule>
4+
<IfModule !authz_core_module>
5+
Deny from all
6+
</IfModule>

info.php renamed to src/info.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22

3-
defined('BASEPATH') || exit('A moment of silence for your attempt.');
4-
53
/**
64
* Dummy Module Info
75
*

init.php renamed to src/init.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php
22

3-
defined('BASEPATH') || exit('A moment of silence for your attempt.');
4-
53
/**
64
* Dummy Module Init
75
*
@@ -20,7 +18,7 @@
2018
$message = line('The <strong>Dummy Module</strong> is kept to fill dashboard with dummy content, but also to show you how you can add content to it.', 'dummy', false)."<br />";
2119
$message .= line('Action: <code>admin_page_header</code>, so this content is visible at the top of all dashboard pages.', 'dummy', false);
2220

23-
echo app()->theme->js_alert(nl2br($message), 'warning');
21+
echo app()->theme->js_alert($message, 'warning');
2422
});
2523

2624
// --------------------------------------------------------------------
@@ -57,7 +55,6 @@
5755

5856
$content = <<<HTML
5957
<pre class="mt-3 border"><code class="language-php">&lt;?php
60-
defined('BASEPATH') || exit('A moment of silence for your attempt.');
6158
6259
return [
6360
'name' => 'Dummy Module',

src/views/index.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<div class="row mt-3">
2+
<div class="col">
3+
<div class="card card-sm">
4+
<div class="card-body">
5+
<p>The content below is loaded on <code>Dummy Module</code>&nbsp;<strong>init.php</strong> file using the <code>admin_index_content</code> action. Delete the module to remove the action to delete it.</p>
6+
<p>All modules <strong>MUST</strong> contain a <code>info.php</code> file in their root folders. This file should return an array of their info and will be used to list details about the module and make sure to display its links within the dashboard (see example below).</p>
7+
</div><!--/.card-body-->
8+
</div><!--/.card-->
9+
</div><!--/.col-->
10+
</div><!--/.row-->

views/index.php

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)