Compare commits

..

119 Commits

Author SHA1 Message Date
gitea-actions[bot] 13a526d6be chore(release): build 01.45.00 [skip ci] 2026-06-28 19:31:21 +00:00
jmiller babdb9e390 ci: add submodules: recursive to checkout (fixes MokoSuiteClient packaging) 2026-06-28 19:30:15 +00:00
jmiller 57c9ea600b ci: add submodules: recursive to checkout (fixes MokoSuiteClient packaging) 2026-06-28 19:25:18 +00:00
jmiller afffef78bd chore: sync issue-branch.yml from Template-Generic [skip ci] 2026-06-28 19:12:12 +00:00
jmiller 720f008050 Merge pull request 'release: promote dev to main (v01.43.37)' (#159) from dev into main 2026-06-28 19:03:51 +00:00
jmiller cd1d3241bd Merge branch 'dev' of https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteBackup into dev
Joomla: Extension CI / Release Readiness Check (pull_request) Failing after 10s
Universal: PR Check / Branch Policy (pull_request) Successful in 2s
Joomla: Extension CI / Lint & Validate (pull_request) Failing after 16s
Generic: Project CI / Lint & Validate (pull_request) Successful in 20s
Universal: PR Check / Validate PR (pull_request) Failing after 8s
Universal: PR Check / Secret Scan (pull_request) Successful in 11s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Generic: Repo Health / Access control (pull_request) Successful in 3s
Branch Cleanup / Delete merged branch (pull_request) Has been skipped
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 16s
Universal: Auto Version Bump / Version Bump (push) Successful in 8s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 20s
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Universal: Build & Release / Build & Release Pipeline (pull_request) Successful in 17s
Universal: Workflow Sync Trigger / Sync workflows to live repos (pull_request) Failing after 29m21s
Generic: Project CI / Tests (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report: Scripts Governance (pull_request) Has been cancelled
Generic: Repo Health / Report: Repository Health (pull_request) Has been cancelled
2026-06-28 14:03:25 -05:00
jmiller e2d88313cf merge: resolve version conflicts (keep dev's 01.43.37)
Claude-Session: https://claude.ai/code/session_01MbEjBtsSjPuTWhqqrMS2wG
2026-06-28 14:02:44 -05:00
gitea-actions[bot] 256d79a270 chore(version): pre-release bump to 01.44.01-dev [skip ci] 2026-06-28 18:57:02 +00:00
gitea-actions[bot] d8d5a1e48e chore(version): auto-bump patch 01.43.38-dev [skip ci] 2026-06-28 18:56:50 +00:00
jmiller 330cfa9dc5 chore: sync issue-branch.yml from Template-Generic [skip ci] 2026-06-28 18:56:20 +00:00
jmiller 8485f24342 docs: update changelog for v01.43.35, add retention to README
Universal: Auto Version Bump / Version Bump (push) Successful in 9s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 21s
Claude-Session: https://claude.ai/code/session_01MbEjBtsSjPuTWhqqrMS2wG
2026-06-28 13:56:17 -05:00
gitea-actions[bot] 51c4db5115 chore: promote changelog [Unreleased] → [01.44.00] 2026-06-28 18:52:14 +00:00
gitea-actions[bot] fd33c86157 chore(release): build 01.44.00 [skip ci] 2026-06-28 18:52:07 +00:00
gitea-actions[bot] ac7673805e chore(version): pre-release bump to 01.43.37-dev [skip ci] 2026-06-28 18:51:38 +00:00
gitea-actions[bot] 428e217b56 chore(version): auto-bump patch 01.43.36-dev [skip ci] 2026-06-28 18:51:13 +00:00
jmiller c0ba29aca8 Merge pull request 'release: promote dev to main (v01.43.x)' (#157) from dev into main 2026-06-28 18:50:58 +00:00
jmiller 81a72d466b merge: resolve workflow file conflicts (take main's v05.02.00)
Universal: Auto Version Bump / Version Bump (push) Successful in 16s
Joomla: Extension CI / Release Readiness Check (pull_request) Failing after 6s
Universal: PR Check / Branch Policy (pull_request) Successful in 2s
Generic: Project CI / Lint & Validate (pull_request) Successful in 1m0s
Universal: PR Check / Secret Scan (pull_request) Successful in 7s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 34s
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Universal: PR Check / Validate PR (pull_request) Failing after 5s
Generic: Repo Health / Access control (pull_request) Successful in 2s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Has been skipped
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 11s
Joomla: Extension CI / Lint & Validate (pull_request) Failing after 1m0s
Universal: Build & Release / Build & Release Pipeline (pull_request) Successful in 29s
Universal: Workflow Sync Trigger / Sync workflows to live repos (pull_request) Failing after 21m34s
Generic: Project CI / Tests (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report: Scripts Governance (pull_request) Has been cancelled
Generic: Repo Health / Report: Repository Health (pull_request) Has been cancelled
Claude-Session: https://claude.ai/code/session_01MbEjBtsSjPuTWhqqrMS2wG
2026-06-28 13:50:24 -05:00
gitea-actions[bot] 942b33f9ce chore(version): pre-release bump to 01.43.35-dev [skip ci] 2026-06-28 18:46:50 +00:00
jmiller 60e04cfd0a Merge pull request 'fix: remove ordering column from profiles table' (#158) from fix/remove-profiles-ordering into dev
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Joomla: Extension CI / Release Readiness Check (pull_request) Failing after 5s
Universal: PR Check / Validate PR (pull_request) Failing after 6s
Universal: PR Check / Secret Scan (pull_request) Successful in 9s
Generic: Repo Health / Access control (pull_request) Successful in 2s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Universal: Auto Version Bump / Version Bump (push) Has been skipped
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 12s
Joomla: Extension CI / Lint & Validate (pull_request) Failing after 44s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 31s
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Universal: Build & Release / Build & Release Pipeline (pull_request) Has been skipped
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
2026-06-28 18:46:09 +00:00
gitea-actions[bot] 672b953ef5 chore(version): pre-release bump to 01.43.34-dev [skip ci]
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Failing after 2s
2026-06-28 18:45:40 +00:00
jmiller 1b481f2e2c fix: remove ordering column from profiles table
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 18s
The ordering column was unused in the profiles UI — profiles sort by ID.
Drops the column via migration, removes all references from model,
config query, importer, and install SQL.

Claude-Session: https://claude.ai/code/session_01MbEjBtsSjPuTWhqqrMS2wG
2026-06-28 13:45:01 -05:00
gitea-actions[bot] 4a027d6245 chore(version): pre-release bump to 01.43.32-dev [skip ci] 2026-06-28 07:49:06 +00:00
jmiller 8af19f875c chore: add SECURITY.md from Template-Joomla
Universal: Auto Version Bump / Version Bump (push) Has been cancelled
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Has been cancelled
2026-06-28 07:25:44 +00:00
jmiller b56e4060bf chore: add SECURITY.md from Template-Joomla
Universal: Auto Version Bump / Version Bump (push) Successful in 14s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 29s
2026-06-28 07:15:34 +00:00
jmiller 9b5d0475f5 chore: sync ci-generic.yml from Template-Generic [skip ci] 2026-06-27 20:45:20 +00:00
jmiller 53e11fe9ad chore: sync rc-revert.yml from Template-Generic [skip ci] 2026-06-27 05:32:40 +00:00
gitea-actions[bot] 9757658c34 chore(version): pre-release bump to 01.43.31-dev [skip ci] 2026-06-27 02:33:25 +00:00
gitea-actions[bot] c82378128a chore(version): auto-bump patch 01.43.30-dev [skip ci] 2026-06-27 02:33:14 +00:00
jmiller f95505704a fix: add submodule checkout to pre-release workflow
Universal: Auto Version Bump / Version Bump (push) Successful in 11s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 13s
The CI checkout step was missing submodules: recursive, causing
MokoSuiteClient to be an empty gitlink during builds. This resulted
in broken MokoSuiteClient.zip and "Install path does not exist" errors.

Claude-Session: https://claude.ai/code/session_01MbEjBtsSjPuTWhqqrMS2wG
2026-06-26 21:32:49 -05:00
gitea-actions[bot] 6cdc9b04d0 chore(version): pre-release bump to 01.43.29-dev [skip ci] 2026-06-27 02:20:50 +00:00
jmiller bad73529ae Merge pull request 'fix: SSH key indicator, schema alignment, MokoSuiteClient bundle' (#155) from fix/ssh-key-indicator into dev
Universal: Auto Version Bump / Version Bump (push) Has been skipped
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 11s
2026-06-27 02:20:30 +00:00
jmiller 288baf41d3 fix: remove duplicate version tags from 8 manifests, align AjaxController to params column
Universal: PR Check / Branch Policy (pull_request) Successful in 2s
Universal: PR Check / Validate PR (pull_request) Failing after 4s
Branch Cleanup / Delete merged branch (pull_request) Successful in 1s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Universal: PR Check / Secret Scan (pull_request) Successful in 5s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 13s
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 30s
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
CI version_bump was creating duplicate <version> lines in all
sub-extension manifests. Also AjaxController still referenced the old
`config` column and removed `keep_local` column on the remotes table.

Claude-Session: https://claude.ai/code/session_01MbEjBtsSjPuTWhqqrMS2wG
2026-06-26 21:19:21 -05:00
gitea-actions[bot] 7d1dcf3e1c chore(version): pre-release bump to 01.43.26-dev [skip ci] 2026-06-26 21:19:20 -05:00
jmiller 2002c1fcad fix: remove stray 't' in package manifest and duplicate version in component manifest
The CI version_bump wrote 't' instead of a tab before <version> in
pkg_mokosuitebackup.xml, and appended a duplicate <version> line in
mokosuitebackup.xml instead of replacing the existing one.

Claude-Session: https://claude.ai/code/session_01MbEjBtsSjPuTWhqqrMS2wG
2026-06-26 21:19:19 -05:00
gitea-actions[bot] 4abe81f916 chore(version): pre-release bump to 01.43.25-dev [skip ci] 2026-06-26 21:19:19 -05:00
jmiller 571b03743f docs: update README with multi-remote, MokoSuiteClient, sub-extension count 2026-06-26 21:19:18 -05:00
gitea-actions[bot] 7fc1cad305 chore(version): pre-release bump to 01.43.24-dev [skip ci] 2026-06-26 21:19:18 -05:00
jmiller 03a1dd75c9 feat: bundle MokoSuiteClient as nested package in release ZIP
- Add MokoSuiteClient as git submodule under source/packages/
- Add pkg_mokosuiteclient entry to pkg_mokosuitebackup.xml
- Fix duplicate <version> tag in package manifest
2026-06-26 21:19:17 -05:00
gitea-actions[bot] 02d8312d1b chore(version): pre-release bump to 01.43.23-dev [skip ci] 2026-06-26 21:19:16 -05:00
jmiller c508fcc8d5 fix: align remotes table schema, add restore_script_name column, profile ordering
- install.mysql.sql: rename `config` → `params` and drop `keep_local` from remotes
  table to match update file 01.41.00 and RemoteTable.php code (fixes Joomla
  database maintenance "one problem")
- install.mysql.sql: fix idx_enabled index to use composite (profile_id, enabled)
- install.mysql.sql: add restore_script_name column to profiles table
- 01.43.22.sql: ALTER TABLE to add restore_script_name for existing installs
- DashboardModel: order profile dropdown by ID instead of ordering column
- SteppedBackupEngine: add stack trace logging around MokoRestore standalone
  generation to debug str_replace FATAL on SFTP profiles
2026-06-26 21:18:47 -05:00
jmiller 3af3708020 chore: sync pre-release.yml from Template-Generic [skip ci] 2026-06-27 00:49:34 +00:00
jmiller 3098b7ad40 chore: sync repo-health.yml from Template-Generic [skip ci] 2026-06-25 19:47:25 +00:00
jmiller d10bda3321 chore: sync pr-check.yml from Template-Generic [skip ci] 2026-06-25 19:47:24 +00:00
jmiller 12214bade1 chore: sync ci-issue-reporter.yml from Template-Generic [skip ci] 2026-06-25 19:47:22 +00:00
gitea-actions[bot] d104b7b936 chore(version): pre-release bump to 01.43.22-dev [skip ci] 2026-06-25 17:18:29 +00:00
jmiller 80110ac111 Merge pull request 'fix: SSH key indicator and missing delete language key' (#154) from fix/ssh-key-indicator into dev
Universal: Auto Version Bump / Version Bump (push) Has been skipped
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 9s
2026-06-25 17:18:21 +00:00
gitea-actions[bot] 3bd1f63833 chore(version): pre-release bump to 01.43.21-dev [skip ci]
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 1s
2026-06-25 17:18:03 +00:00
jmiller 93f0fa0a47 fix: SSH key indicator detection and missing delete language key
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 9s
- SshKeyField: detect base64-encoded keys from DB so the "Key loaded"
  badge displays correctly after initial upload
- Add COM_MOKOJOOMBACKUP_BACKUPS_N_ITEMS_DELETED language keys for
  Joomla's AdminController delete feedback message
2026-06-25 12:17:45 -05:00
jmiller ee1de178b1 chore: sync workflow-sync-trigger.yml from Template-Generic [skip ci] 2026-06-25 17:12:17 +00:00
jmiller 014d659908 chore: sync version-set.yml from Template-Generic [skip ci] 2026-06-25 17:12:17 +00:00
jmiller 113febad3f chore: sync repo-health.yml from Template-Generic [skip ci] 2026-06-25 17:12:16 +00:00
jmiller 18a3a524f2 chore: sync pre-release.yml from Template-Generic [skip ci] 2026-06-25 17:12:16 +00:00
jmiller 659fc6e274 chore: sync pr-check.yml from Template-Generic [skip ci] 2026-06-25 17:12:15 +00:00
jmiller 89af9fa14c chore: sync issue-branch.yml from Template-Generic [skip ci] 2026-06-25 17:12:14 +00:00
jmiller d60535ae64 chore: sync deploy-manual.yml from Template-Generic [skip ci] 2026-06-25 17:12:14 +00:00
jmiller b9ef947feb chore: sync cleanup.yml from Template-Generic [skip ci] 2026-06-25 17:12:13 +00:00
jmiller e7ab83c5fb chore: sync auto-release.yml from Template-Generic [skip ci] 2026-06-25 17:12:12 +00:00
jmiller dc81cd7cc8 chore: sync auto-bump.yml from Template-Generic [skip ci] 2026-06-25 17:12:11 +00:00
gitea-actions[bot] 268b3d54d7 chore(version): pre-release bump to 01.43.20-dev [skip ci] 2026-06-25 16:27:48 +00:00
jmiller 1cfe7c6c6e Merge pull request 'fix: add SQL update file to match manifest version' (#153) from fix/schema-version-file-2 into dev
Universal: Auto Version Bump / Version Bump (push) Has been skipped
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 19s
fix: add SQL update file to match manifest version
2026-06-25 16:26:38 +00:00
jmiller f0da0c02b4 fix: add SQL update file to match manifest version
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Universal: PR Check / Secret Scan (pull_request) Successful in 6s
Universal: PR Check / Validate PR (pull_request) Failing after 4s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 2s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Failing after 7s
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 46s
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Joomla's Database view requires a SQL update file matching the manifest
version. Missing file causes persistent schema version mismatch warning.
2026-06-25 11:25:56 -05:00
gitea-actions[bot] 2f8a65388c chore(version): pre-release bump to 01.43.19-dev [skip ci] 2026-06-25 16:13:23 +00:00
gitea-actions[bot] 9978622960 chore(version): pre-release bump to 01.43.18-dev [skip ci] 2026-06-25 16:13:03 +00:00
jmiller 35e5fc1503 Merge pull request 'fix(db): add 01.43.11 schema update file' (#152) from fix/schema-version-file into dev
Universal: Auto Version Bump / Version Bump (push) Has been skipped
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 23s
2026-06-25 16:12:46 +00:00
gitea-actions[bot] 2338ba5197 chore(version): pre-release bump to 01.43.17-dev [skip ci]
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 2s
2026-06-25 16:12:33 +00:00
jmiller e67eedbc93 fix(db): add 01.43.11 schema update file to resolve version mismatch
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 10s
Joomla's database checker requires a SQL update file matching the manifest
version. Missing file caused schema version to stay at 01.41.00.
2026-06-25 11:12:22 -05:00
gitea-actions[bot] d812aca832 chore(version): pre-release bump to 01.43.15-dev [skip ci] 2026-06-25 16:00:54 +00:00
gitea-actions[bot] 4315f36c6a chore(version): pre-release bump to 01.43.14-dev [skip ci] 2026-06-25 15:59:41 +00:00
jmiller 10467835ac Merge pull request 'fix: UI cleanup, custom restore script name, version bump 01.43.11-dev' (#150) from fix/ui-cleanup-restore-name into dev
Universal: Auto Version Bump / Version Bump (push) Has been skipped
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 10s
2026-06-25 15:59:30 +00:00
gitea-actions[bot] f26d58504e chore(version): pre-release bump to 01.43.13-dev [skip ci]
Branch Cleanup / Delete merged branch (pull_request) Successful in 1s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
2026-06-25 15:58:38 +00:00
jmiller 07fb4dcc24 fix: remove run/backup buttons, move actions to detail view, custom restore script name, version bump 01.43.11-dev
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 10s
- Remove Run Backup / Backup Now buttons from profiles list, profile edit toolbar, and backup records view
- Move download, browse archive, and view log from backup list rows into individual backup record detail view
- Add download button to backup detail toolbar
- Link profile column in backup records list to profile edit
- Complete restore script filename customization across BackupEngine, SteppedBackupEngine, and MokoRestore
- Remove ordering field from profiles, default sort by ID ascending
- Fix untranslated JFIELD language keys
- Bump all manifests to 01.43.11-dev
2026-06-25 10:54:35 -05:00
gitea-actions[bot] 21a4352b3b chore(version): pre-release bump to 01.43.10-dev [skip ci] 2026-06-25 15:02:09 +00:00
gitea-actions[bot] 9d26f59f98 chore(version): pre-release bump to 01.43.09-dev [skip ci] 2026-06-25 15:01:45 +00:00
jmiller 3488434f28 Merge pull request 'fix(mokorestore): Joomla detection, multi-zip selector, standalone backup scan' (#148) from fix/mokorestore-improvements into dev
Universal: Auto Version Bump / Version Bump (push) Has been skipped
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 18s
2026-06-25 15:01:14 +00:00
gitea-actions[bot] f97cd30c95 chore(version): pre-release bump to 01.43.08-dev [skip ci]
Branch Cleanup / Delete merged branch (pull_request) Successful in 2s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
2026-06-25 15:00:33 +00:00
jmiller 836d1bc8b7 fix(mokorestore): add Joomla detection warning, multi-zip selector, and standalone backup scan
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 13s
- Preflight now detects existing Joomla installation (configuration.php / Version.php)
  and shows a yellow warning — does not block, but alerts the user
- Standalone mode: backup archive check scans for all ZIPs instead of hardcoded name
- Multi-zip selector integrated into extract step with radio buttons
- Selected backup file passed through to extract action
- Added warn-style CSS class (yellow) for preflight warnings
2026-06-25 10:00:07 -05:00
gitea-actions[bot] 79b3caa35a chore(version): pre-release bump to 01.43.05-dev [skip ci] 2026-06-25 13:39:28 +00:00
gitea-actions[bot] 6102c8f590 chore(version): pre-release bump to 01.43.04-dev [skip ci] 2026-06-25 13:39:01 +00:00
jmiller 88e53c5698 Merge pull request 'fix: Bootstrap 5 modals, language keys, ntfy default, MokoRestore error handling' (#146) from fix/bootstrap-modals into dev
Universal: Auto Version Bump / Version Bump (push) Has been skipped
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 18s
2026-06-25 13:38:43 +00:00
gitea-actions[bot] ec1c3486c5 chore(version): pre-release bump to 01.43.03-dev [skip ci]
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 1s
2026-06-25 13:38:28 +00:00
jmiller 3742477aef fix: convert inline modals to Bootstrap 5, fix language keys, ntfy default, and MokoRestore error handling
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Universal: PR Check / Validate PR (pull_request) Failing after 5s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 19s
Universal: PR Check / Secret Scan (pull_request) Successful in 9s
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 29s
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
- Convert 10 inline CSS modals to Bootstrap 5 (backups: 7, snapshots: 3)
- Replace style.display show/hide with Bootstrap Modal API
- Fix JFIELD_ORDERING_LABEL_ASC → JFIELD_ORDERING_ASC in profile filter
- Add COM_MOKOJOOMBACKUP_CONFIGURATION key for Options page title
- Change ntfy default server to ntfy.mokoconsulting.tech
- Add profile ID to dropdown labels across backups, dashboard, cpanel module
- Add error handling to MokoRestore post() and runPreflight() to prevent UI stalling
- Remove outdated SSH auth pattern references from field descriptions
2026-06-25 08:35:40 -05:00
jmiller 1c256bba7a chore: sync version-set.yml from Template-Generic [skip ci] 2026-06-24 11:51:45 +00:00
jmiller cd4dc6efd2 chore: sync repo-health.yml from Template-Generic [skip ci] 2026-06-24 11:51:44 +00:00
jmiller 2e6b71ac97 chore: sync pr-check.yml from Template-Generic [skip ci] 2026-06-24 11:51:41 +00:00
jmiller 5b4f84bad7 chore: sync issue-branch.yml from Template-Generic [skip ci] 2026-06-24 11:51:39 +00:00
jmiller 847bb9bd0f chore: sync deploy-manual.yml from Template-Generic [skip ci] 2026-06-24 11:51:37 +00:00
jmiller ebcaf44b63 chore: sync auto-release.yml from Template-Generic [skip ci] 2026-06-24 11:51:32 +00:00
jmiller 17b05f9a13 chore: sync auto-bump.yml from Template-Generic [skip ci] 2026-06-24 11:51:30 +00:00
gitea-actions[bot] bb8e4a258a chore(version): pre-release bump to 01.43.02-dev [skip ci] 2026-06-24 11:49:56 +00:00
gitea-actions[bot] e6d646011a chore(version): auto-bump patch 01.43.01-dev [skip ci] 2026-06-24 11:49:37 +00:00
jmiller 726291995c chore: sync main into dev (#145)
Universal: Auto Version Bump / Version Bump (push) Successful in 16s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 19s
2026-06-24 11:49:19 +00:00
gitea-actions[bot] 2ac4923d74 chore: promote changelog [Unreleased] → [01.43.00]
Universal: PR Check / Branch Policy (pull_request) Successful in 2s
Branch Cleanup / Delete merged branch (pull_request) Has been skipped
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Universal: PR Check / Validate PR (pull_request) Failing after 4s
Universal: PR Check / Secret Scan (pull_request) Successful in 6s
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 43s
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
2026-06-24 11:49:15 +00:00
gitea-actions[bot] adc4935587 chore(release): build 01.43.00 [skip ci] 2026-06-24 11:49:12 +00:00
jmiller 8f7b747c59 fix: add missing module entry point for cpanel module install (#144)
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Universal: PR Check / Validate PR (pull_request) Failing after 5s
Universal: PR Check / Secret Scan (pull_request) Successful in 8s
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 47s
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
2026-06-24 11:49:01 +00:00
gitea-actions[bot] 42b7503d7b chore(version): pre-release bump to 01.42.04-dev [skip ci]
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Has been skipped
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Universal: Build & Release / Build & Release Pipeline (pull_request) Successful in 17s
Universal: Workflow Sync Trigger / Sync workflows to live repos (pull_request) Failing after 4m51s
2026-06-24 00:05:44 +00:00
jmiller 9ac8757a8c Merge pull request 'fix: add missing module entry point for cpanel module install' (#143) from fix/cpanel-module-install into dev
Universal: Auto Version Bump / Version Bump (push) Has been skipped
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 12s
fix: add missing module entry point for cpanel module install (#143)
2026-06-24 00:05:30 +00:00
gitea-actions[bot] ef3fde1c39 chore(version): pre-release bump to 01.42.03-dev [skip ci]
Branch Cleanup / Delete merged branch (pull_request) Successful in 1s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
2026-06-23 23:53:35 +00:00
Jonathan Miller 5750e71d15 fix: add missing module entry point for cpanel module install
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 15s
Joomla's module installer requires a <filename module="..."> element
in the manifest's <files> section. Without it, installation fails with
"No module file specified." Added the stub PHP file and manifest entry.
2026-06-23 18:53:00 -05:00
gitea-actions[bot] c8e022d46b chore(version): pre-release bump to 01.42.02-dev [skip ci] 2026-06-23 23:06:28 +00:00
jmiller 21f2ba0eff Merge pull request 'chore: sync main into dev (preserves dev-only changes)' (#142) from chore/sync-main-to-dev into dev
Universal: Auto Version Bump / Version Bump (push) Has been skipped
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 15s
2026-06-23 23:06:15 +00:00
gitea-actions[bot] 821c4bae11 chore(version): pre-release bump to 01.42.01-dev [skip ci]
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 1s
2026-06-23 23:05:52 +00:00
Jonathan Miller e86c104276 Merge remote-tracking branch 'origin/main' into chore/sync-main-to-dev
Universal: PR Check / Branch Policy (pull_request) Successful in 2s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 16s
Universal: PR Check / Validate PR (pull_request) Failing after 6s
Universal: PR Check / Secret Scan (pull_request) Successful in 7s
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 41s
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
2026-06-23 18:05:20 -05:00
gitea-actions[bot] af2a1a2dae chore: promote changelog [Unreleased] → [01.42.00]
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Universal: PR Check / Validate PR (pull_request) Failing after 4s
Universal: PR Check / Secret Scan (pull_request) Successful in 7s
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 36s
Branch Cleanup / Delete merged branch (pull_request) Has been skipped
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
2026-06-23 23:00:23 +00:00
gitea-actions[bot] c88b163de0 chore(release): build 01.42.00 [skip ci] 2026-06-23 23:00:20 +00:00
jmiller 358a7eb68a Merge pull request 'docs: Comprehensive CHANGELOG consolidation + wiki update + testing parameters' (#140) from chore/changelog-wiki-testing into main 2026-06-23 23:00:08 +00:00
Jonathan Miller 898520d1db chore: sync auto-release.yml from Template-Generic [skip ci]
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 2s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Universal: Workflow Sync Trigger / Sync workflows to live repos (pull_request) Failing after 3s
Universal: Build & Release / Build & Release Pipeline (pull_request) Successful in 18s
2026-06-23 17:58:49 -05:00
gitea-actions[bot] e633d0cc0a chore(version): pre-release bump to 01.41.03-dev [skip ci] 2026-06-23 22:20:21 +00:00
Jonathan Miller ff7418721d fix: review findings — key desc, missing changelog, [HOST] domain resolution
Universal: PR Check / Branch Policy (pull_request) Successful in 1s
Generic: Repo Health / Access control (pull_request) Successful in 2s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Joomla: Extension CI / Release Readiness Check (pull_request) Failing after 4s
Joomla: Extension CI / Lint & Validate (pull_request) Failing after 7s
Universal: PR Check / Validate PR (pull_request) Failing after 6s
Universal: PR Check / Secret Scan (pull_request) Successful in 8s
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 11s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 14s
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
- Language: "encrypted" → "base64-encoded" for SSH key description
- CHANGELOG: added 3 missing bug fix entries (fields_values scope, CSRF
  token on Run Backup, SFTP showon/required)
- [HOST] placeholder: resolve domain from Joomla live_site config when
  HTTP_HOST is unavailable (CLI), instead of falling back to system
  hostname (joomla.invalid). Applied to both PlaceholderResolver and
  FolderPickerField.
2026-06-23 17:20:05 -05:00
gitea-actions[bot] 0b2b885163 chore(version): pre-release bump to 01.41.02-dev [skip ci] 2026-06-23 22:10:35 +00:00
Jonathan Miller 6c47838b30 fix: clean up wordy field descriptions — shorter, punchier text
Joomla: Extension CI / Release Readiness Check (pull_request) Failing after 5s
Universal: PR Check / Branch Policy (pull_request) Successful in 2s
Universal: PR Check / Secret Scan (pull_request) Successful in 7s
Universal: PR Check / Validate PR (pull_request) Failing after 4s
Generic: Repo Health / Access control (pull_request) Successful in 1s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 13s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 18s
Joomla: Extension CI / Lint & Validate (pull_request) Failing after 48s
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
Backup dir, archive name, MokoRestore, SFTP key, sanitization,
encryption descriptions all shortened. Removed redundant placeholder
lists (now handled by clickable pills and help modal).
2026-06-23 17:09:59 -05:00
gitea-actions[bot] 0f95cb6e9f chore(version): pre-release bump to 01.41.01-dev [skip ci] 2026-06-23 22:01:24 +00:00
Jonathan Miller 1da2fdb856 docs: comprehensive CHANGELOG consolidation for v01.41.00
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 12s
Consolidated all fragmented changelog entries from the session into
a single clean v01.41.00 release entry organized by feature area.
Covers: multi-remote, snapshots, SFTP, MokoRestore, sanitization,
engine improvements, admin UI, CLI/API, notifications, security.
2026-06-23 17:01:11 -05:00
gitea-actions[bot] 4df70531e2 chore(version): pre-release bump to 01.39.02-dev [skip ci]
Publish to Composer / Publish Package (release) Failing after 7s
2026-06-23 18:13:45 +00:00
gitea-actions[bot] 845b856cda chore(version): auto-bump patch 01.28.03-dev [skip ci] 2026-06-23 18:12:45 +00:00
jmiller 633e9b7f1e chore: remove security-audit.yml -- handled by MokoGitea
Universal: Auto Version Bump / Version Bump (push) Successful in 20s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 43s
2026-06-23 18:05:04 +00:00
gitea-actions[bot] ec0b7eb8a4 chore(version): auto-bump patch 01.28.02-dev [skip ci] 2026-06-23 18:04:50 +00:00
jmiller 7d119565da chore: remove deploy-manual.yml -- no longer needed
Universal: Auto Version Bump / Version Bump (push) Successful in 14s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Failing after 21s
2026-06-23 17:59:42 +00:00
gitea-actions[bot] 9db7331a72 chore(version): pre-release bump to 01.28.01-dev [skip ci]
Publish to Composer / Publish Package (release) Failing after 5s
2026-06-21 23:58:07 +00:00
gitea-actions[bot] 32931c1e37 chore(version): auto-bump patch 01.27.04-dev [skip ci] 2026-06-21 23:57:56 +00:00
75 changed files with 1282 additions and 849 deletions
+3
View File
@@ -0,0 +1,3 @@
[submodule "source/packages/MokoSuiteClient"]
path = source/packages/MokoSuiteClient
url = https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteClient.git
+1 -1
View File
@@ -22,7 +22,7 @@ on:
env: env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
permissions: permissions:
contents: write contents: write
+15 -12
View File
@@ -7,7 +7,7 @@
# INGROUP: mokocli.Release # INGROUP: mokocli.Release
# REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/mokocli # REPO: https://git.mokoconsulting.tech/mokoconsulting-tech/mokocli
# PATH: /templates/workflows/universal/auto-release.yml.template # PATH: /templates/workflows/universal/auto-release.yml.template
# VERSION: 05.00.00 # VERSION: 05.01.00
# BRIEF: Universal build & release detects platform from manifest.xml # BRIEF: Universal build & release detects platform from manifest.xml
# #
# +=======================================================================+ # +=======================================================================+
@@ -27,7 +27,7 @@ name: "Universal: Build & Release"
on: on:
pull_request: pull_request:
types: [opened, closed] types: [opened, synchronize, closed]
branches: branches:
- main - main
paths-ignore: paths-ignore:
@@ -52,7 +52,7 @@ on:
env: env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
GITEA_ORG: ${{ vars.GITEA_ORG || github.repository_owner }} GITEA_ORG: ${{ vars.GITEA_ORG || github.repository_owner }}
GITEA_REPO: ${{ vars.GITEA_REPO || github.event.repository.name }} GITEA_REPO: ${{ vars.GITEA_REPO || github.event.repository.name }}
@@ -66,6 +66,7 @@ jobs:
runs-on: release runs-on: release
if: >- if: >-
(github.event.action == 'opened' && github.event.pull_request.merged != true) || (github.event.action == 'opened' && github.event.pull_request.merged != true) ||
(github.event.action == 'synchronize' && github.event.pull_request.merged != true) ||
(github.event_name == 'workflow_dispatch' && inputs.action == 'promote-rc') (github.event_name == 'workflow_dispatch' && inputs.action == 'promote-rc')
steps: steps:
@@ -74,6 +75,7 @@ jobs:
with: with:
token: ${{ secrets.MOKOGITEA_TOKEN }} token: ${{ secrets.MOKOGITEA_TOKEN }}
fetch-depth: 1 fetch-depth: 1
submodules: recursive
- name: Setup mokocli tools - name: Setup mokocli tools
env: env:
@@ -101,7 +103,7 @@ jobs:
php ${MOKO_CLI}/branch_rename.php \ php ${MOKO_CLI}/branch_rename.php \
--from "${{ github.event.pull_request.head.ref || 'dev' }}" --to rc \ --from "${{ github.event.pull_request.head.ref || 'dev' }}" --to rc \
--token "${{ secrets.MOKOGITEA_TOKEN }}" \ --token "${{ secrets.MOKOGITEA_TOKEN }}" \
--api-base "${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" \ --api-base "${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" \
--pr "${{ github.event.pull_request.number }}" --pr "${{ github.event.pull_request.number }}"
- name: Checkout rc and configure git - name: Checkout rc and configure git
@@ -120,7 +122,7 @@ jobs:
- name: Update RC release notes from CHANGELOG.md - name: Update RC release notes from CHANGELOG.md
run: | run: |
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" API_BASE="${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}" TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
# Extract [Unreleased] section from changelog # Extract [Unreleased] section from changelog
@@ -172,6 +174,7 @@ jobs:
with: with:
token: ${{ secrets.MOKOGITEA_TOKEN }} token: ${{ secrets.MOKOGITEA_TOKEN }}
fetch-depth: 0 fetch-depth: 0
submodules: recursive
- name: Configure git for bot pushes - name: Configure git for bot pushes
run: | run: |
@@ -268,7 +271,7 @@ jobs:
!startsWith(steps.platform.outputs.platform, 'joomla') !startsWith(steps.platform.outputs.platform, 'joomla')
run: | run: |
VERSION="${{ steps.version.outputs.version }}" VERSION="${{ steps.version.outputs.version }}"
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" API_BASE="${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}" TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
SEMVER_TAG="v${VERSION}" SEMVER_TAG="v${VERSION}"
@@ -293,7 +296,7 @@ jobs:
- name: Update release notes and promote changelog - name: Update release notes and promote changelog
run: | run: |
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" API_BASE="${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}" TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
# Get the stable release info (version and ID) # Get the stable release info (version and ID)
@@ -362,7 +365,7 @@ jobs:
VERSION="${{ steps.bump.outputs.version || steps.version.outputs.version }}" VERSION="${{ steps.bump.outputs.version || steps.version.outputs.version }}"
RELEASE_TAG="${{ steps.version.outputs.release_tag }}" RELEASE_TAG="${{ steps.version.outputs.release_tag }}"
GH_REPO="${{ vars.GH_MIRROR_REPO || github.repository }}" GH_REPO="${{ vars.GH_MIRROR_REPO || github.repository }}"
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" API_BASE="${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
php ${MOKO_CLI}/release_mirror.php \ php ${MOKO_CLI}/release_mirror.php \
--version "$VERSION" --tag "$RELEASE_TAG" \ --version "$VERSION" --tag "$RELEASE_TAG" \
--token "${{ secrets.MOKOGITEA_TOKEN }}" --api-base "$API_BASE" \ --token "${{ secrets.MOKOGITEA_TOKEN }}" --api-base "$API_BASE" \
@@ -391,7 +394,7 @@ jobs:
if: steps.version.outputs.skip != 'true' if: steps.version.outputs.skip != 'true'
continue-on-error: true continue-on-error: true
run: | run: |
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" API_BASE="${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}" TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
# Delete rc branch (ephemeral — created by promote-rc) # Delete rc branch (ephemeral — created by promote-rc)
@@ -415,7 +418,7 @@ jobs:
if: steps.version.outputs.skip != 'true' if: steps.version.outputs.skip != 'true'
continue-on-error: true continue-on-error: true
run: | run: |
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" API_BASE="${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}" TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
VERSION="${{ steps.bump.outputs.version || steps.version.outputs.version }}" VERSION="${{ steps.bump.outputs.version || steps.version.outputs.version }}"
BRANCH_NAME="version/${VERSION}" BRANCH_NAME="version/${VERSION}"
@@ -436,7 +439,7 @@ jobs:
if: steps.version.outputs.skip != 'true' if: steps.version.outputs.skip != 'true'
continue-on-error: true continue-on-error: true
run: | run: |
API_BASE="${GITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" API_BASE="${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
php ${MOKO_CLI}/version_reset_dev.php \ php ${MOKO_CLI}/version_reset_dev.php \
--token "${{ secrets.MOKOGITEA_TOKEN }}" --api-base "${API_BASE}" \ --token "${{ secrets.MOKOGITEA_TOKEN }}" --api-base "${API_BASE}" \
--branch dev --path . 2>&1 || true --branch dev --path . 2>&1 || true
@@ -462,5 +465,5 @@ jobs:
echo "| Version | \`${VERSION}\` |" >> $GITHUB_STEP_SUMMARY echo "| Version | \`${VERSION}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Branch | \`${{ steps.version.outputs.branch }}\` |" >> $GITHUB_STEP_SUMMARY echo "| Branch | \`${{ steps.version.outputs.branch }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Tag | \`${{ steps.version.outputs.tag }}\` |" >> $GITHUB_STEP_SUMMARY echo "| Tag | \`${{ steps.version.outputs.tag }}\` |" >> $GITHUB_STEP_SUMMARY
echo "| Release | [View](${GITEA_URL}/${GITEA_ORG}/${GITEA_REPO}/releases/tag/${{ steps.version.outputs.tag }}) |" >> $GITHUB_STEP_SUMMARY echo "| Release | [View](${MOKOGITEA_URL}/${GITEA_ORG}/${GITEA_REPO}/releases/tag/${{ steps.version.outputs.tag }}) |" >> $GITHUB_STEP_SUMMARY
fi fi
+6
View File
@@ -13,6 +13,12 @@
name: "Generic: Project CI" name: "Generic: Project CI"
on: on:
pull_request:
branches:
- main
- dev
- dev/**
- rc/**
workflow_dispatch: workflow_dispatch:
permissions: permissions:
@@ -0,0 +1,68 @@
# Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
# FILE INFORMATION
# DEFGROUP: Gitea.Workflow
# INGROUP: mokocli.Universal
# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
# PATH: /.mokogitea/workflows/ci-issue-reporter.yml
# VERSION: 01.00.00
# BRIEF: Reusable workflow — creates/updates a Gitea issue when a CI gate fails.
# Clones MokoCLI and runs cli/ci_issue_reporter.sh.
name: "Universal: CI Issue Reporter"
on:
workflow_call:
inputs:
gate:
description: "CI gate name (e.g. PR Validation, Repository Health)"
required: true
type: string
details:
description: "Human-readable failure description"
required: true
type: string
severity:
description: "error or warning"
required: false
type: string
default: "error"
workflow:
description: "Workflow name for the issue title"
required: false
type: string
default: ""
secrets:
MOKOGITEA_TOKEN:
required: true
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
report:
name: "Report: ${{ inputs.gate }}"
runs-on: ubuntu-latest
steps:
- name: Clone MokoCLI
env:
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
run: |
MOKOGITEA_URL="${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}"
git clone --depth 1 --filter=blob:none --sparse "${MOKOGITEA_URL}/MokoConsulting/MokoCLI.git" /tmp/mokocli
cd /tmp/mokocli && git sparse-checkout set cli/ci_issue_reporter.sh
- name: Report CI failure
env:
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
run: |
chmod +x /tmp/mokocli/cli/ci_issue_reporter.sh
/tmp/mokocli/cli/ci_issue_reporter.sh \
--gate "${{ inputs.gate }}" \
--details "${{ inputs.details }}" \
--severity "${{ inputs.severity }}" \
--workflow "${{ inputs.workflow }}"
+10 -10
View File
@@ -21,7 +21,7 @@ permissions:
contents: write contents: write
env: env:
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
jobs: jobs:
cleanup: cleanup:
@@ -33,17 +33,17 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
token: ${{ secrets.GA_TOKEN }} token: ${{ secrets.MOKOGITEA_TOKEN }}
- name: Delete merged branches - name: Delete merged branches
env: env:
GA_TOKEN: ${{ secrets.GA_TOKEN }} MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
run: | run: |
echo "=== Merged Branch Cleanup ===" echo "=== Merged Branch Cleanup ==="
API="${GITEA_URL}/api/v1/repos/${{ github.repository }}" API="${MOKOGITEA_URL}/api/v1/repos/${{ github.repository }}"
# List branches via API # List branches via API
BRANCHES=$(curl -sS -H "Authorization: token ${GA_TOKEN}" \ BRANCHES=$(curl -sS -H "Authorization: token ${MOKOGITEA_TOKEN}" \
"${API}/branches?limit=50" | jq -r '.[].name') "${API}/branches?limit=50" | jq -r '.[].name')
DELETED=0 DELETED=0
@@ -56,7 +56,7 @@ jobs:
# Check if branch is merged into main # Check if branch is merged into main
if git merge-base --is-ancestor "origin/${BRANCH}" origin/main 2>/dev/null; then if git merge-base --is-ancestor "origin/${BRANCH}" origin/main 2>/dev/null; then
echo " Deleting merged branch: ${BRANCH}" echo " Deleting merged branch: ${BRANCH}"
curl -sS -X DELETE -H "Authorization: token ${GA_TOKEN}" \ curl -sS -X DELETE -H "Authorization: token ${MOKOGITEA_TOKEN}" \
"${API}/branches/${BRANCH}" 2>/dev/null || true "${API}/branches/${BRANCH}" 2>/dev/null || true
DELETED=$((DELETED + 1)) DELETED=$((DELETED + 1))
fi fi
@@ -66,20 +66,20 @@ jobs:
- name: Clean old workflow runs - name: Clean old workflow runs
env: env:
GA_TOKEN: ${{ secrets.GA_TOKEN }} MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
run: | run: |
echo "=== Workflow Run Cleanup ===" echo "=== Workflow Run Cleanup ==="
API="${GITEA_URL}/api/v1/repos/${{ github.repository }}" API="${MOKOGITEA_URL}/api/v1/repos/${{ github.repository }}"
CUTOFF=$(date -d "30 days ago" +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -v-30d +%Y-%m-%dT%H:%M:%SZ) CUTOFF=$(date -d "30 days ago" +%Y-%m-%dT%H:%M:%SZ 2>/dev/null || date -v-30d +%Y-%m-%dT%H:%M:%SZ)
# Get old completed runs # Get old completed runs
RUNS=$(curl -sS -H "Authorization: token ${GA_TOKEN}" \ RUNS=$(curl -sS -H "Authorization: token ${MOKOGITEA_TOKEN}" \
"${API}/actions/runs?status=completed&limit=50" | \ "${API}/actions/runs?status=completed&limit=50" | \
jq -r ".workflow_runs[] | select(.created_at < \"${CUTOFF}\") | .id" 2>/dev/null) jq -r ".workflow_runs[] | select(.created_at < \"${CUTOFF}\") | .id" 2>/dev/null)
DELETED=0 DELETED=0
for RUN_ID in $RUNS; do for RUN_ID in $RUNS; do
curl -sS -X DELETE -H "Authorization: token ${GA_TOKEN}" \ curl -sS -X DELETE -H "Authorization: token ${MOKOGITEA_TOKEN}" \
"${API}/actions/runs/${RUN_ID}" 2>/dev/null || true "${API}/actions/runs/${RUN_ID}" 2>/dev/null || true
DELETED=$((DELETED + 1)) DELETED=$((DELETED + 1))
done done
+4 -4
View File
@@ -42,10 +42,10 @@ jobs:
- name: Setup MokoStandards tools - name: Setup MokoStandards tools
env: env:
GA_TOKEN: ${{ secrets.GA_TOKEN || secrets.GA_TOKEN || github.token }} MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN || github.token }}
MOKO_CLONE_TOKEN: ${{ secrets.GA_TOKEN || secrets.GA_TOKEN || github.token }} MOKO_CLONE_TOKEN: ${{ secrets.MOKOGITEA_TOKEN || github.token }}
MOKO_CLONE_HOST: ${{ secrets.GA_TOKEN && 'git.mokoconsulting.tech/MokoConsulting' || 'github.com/mokoconsulting-tech' }} MOKO_CLONE_HOST: ${{ secrets.MOKOGITEA_TOKEN && 'git.mokoconsulting.tech/MokoConsulting' || 'github.com/mokoconsulting-tech' }}
COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.GA_TOKEN || github.token }}"}}' COMPOSER_AUTH: '{"github-oauth":{"github.com":"${{ secrets.MOKOGITEA_TOKEN || github.token }}"}}'
run: | run: |
git clone --depth 1 --branch main --quiet \ git clone --depth 1 --branch main --quiet \
"https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoStandards-API.git" \ "https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoStandards-API.git" \
+5 -5
View File
@@ -5,7 +5,7 @@
# FILE INFORMATION # FILE INFORMATION
# DEFGROUP: Gitea.Workflow # DEFGROUP: Gitea.Workflow
# INGROUP: mokocli.Automation # INGROUP: mokocli.Automation
# VERSION: 01.41.00 # VERSION: 01.45.00
# BRIEF: Auto-create feature branch when an issue is opened # BRIEF: Auto-create feature branch when an issue is opened
name: "Universal: Issue Branch" name: "Universal: Issue Branch"
@@ -19,7 +19,7 @@ permissions:
issues: write issues: write
env: env:
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
jobs: jobs:
create-branch: create-branch:
@@ -28,8 +28,8 @@ jobs:
steps: steps:
- name: Create branch and comment - name: Create branch and comment
run: | run: |
TOKEN="${{ secrets.GA_TOKEN }}" TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
API="${GITEA_URL}/api/v1/repos/${{ github.repository }}" API="${MOKOGITEA_URL}/api/v1/repos/${{ github.repository }}"
ISSUE_NUM="${{ github.event.issue.number }}" ISSUE_NUM="${{ github.event.issue.number }}"
ISSUE_TITLE="${{ github.event.issue.title }}" ISSUE_TITLE="${{ github.event.issue.title }}"
@@ -58,7 +58,7 @@ jobs:
echo "Created branch: ${BRANCH}" echo "Created branch: ${BRANCH}"
# Comment on issue with branch link # Comment on issue with branch link
REPO_URL="${GITEA_URL}/${{ github.repository }}" REPO_URL="${MOKOGITEA_URL}/${{ github.repository }}"
BODY="Branch created: [\`${BRANCH}\`](${REPO_URL}/src/branch/${BRANCH})\n\n\`\`\`bash\ngit fetch origin\ngit checkout ${BRANCH}\n\`\`\`" BODY="Branch created: [\`${BRANCH}\`](${REPO_URL}/src/branch/${BRANCH})\n\n\`\`\`bash\ngit fetch origin\ngit checkout ${BRANCH}\n\`\`\`"
curl -sf -X POST \ curl -sf -X POST \
+10 -23
View File
@@ -496,39 +496,26 @@ jobs:
steps: steps:
- name: Trigger RC pre-release - name: Trigger RC pre-release
env: env:
GA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
REPO: ${{ github.repository }} REPO: ${{ github.repository }}
BRANCH: ${{ github.head_ref }} BRANCH: ${{ github.head_ref }}
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} MOKOGITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
run: | run: |
curl -s -X POST "${GITEA_URL}/api/v1/repos/${REPO}/actions/workflows/pre-release.yml/dispatches" -H "Authorization: token ${GITEA_TOKEN}" -H "Content-Type: application/json" -d "{\"ref\":\"${BRANCH}\",\"inputs\":{\"stability\":\"release-candidate\"}}" curl -s -X POST "${MOKOGITEA_URL}/api/v1/repos/${REPO}/actions/workflows/pre-release.yml/dispatches" -H "Authorization: token ${MOKOGITEA_TOKEN}" -H "Content-Type: application/json" -d "{\"ref\":\"${BRANCH}\",\"inputs\":{\"stability\":\"release-candidate\"}}"
echo "### Pre-Release" >> $GITHUB_STEP_SUMMARY echo "### Pre-Release" >> $GITHUB_STEP_SUMMARY
echo "Triggered RC build on branch \`${BRANCH}\`" >> $GITHUB_STEP_SUMMARY echo "Triggered RC build on branch \`${BRANCH}\`" >> $GITHUB_STEP_SUMMARY
# ── Issue Reporter ────────────────────────────────────────────────────── # ── Issue Reporter ──────────────────────────────────────────────────────
report-issues: report-issues:
name: Report Issues name: Report Issues
runs-on: ubuntu-latest
needs: [branch-policy, validate] needs: [branch-policy, validate]
if: >- if: >-
always() && always() &&
needs.validate.result == 'failure' needs.validate.result == 'failure'
uses: ./.mokogitea/workflows/ci-issue-reporter.yml
steps: with:
- name: Checkout gate: "PR Validation"
uses: actions/checkout@v4 workflow: "PR Check"
with: severity: error
sparse-checkout: automation/ci-issue-reporter.sh details: "PR validation failed (syntax, manifest, changelog, or source checks). See the CI run for the specific check that failed."
sparse-checkout-cone-mode: false secrets: inherit
- name: "File issue for PR validation failure"
env:
GITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
run: |
chmod +x automation/ci-issue-reporter.sh
./automation/ci-issue-reporter.sh \
--gate "PR Validation" \
--workflow "PR Check" \
--severity error \
--details "PR validation failed (syntax, manifest, changelog, or source checks). See the CI run for the specific check that failed."
+6 -1
View File
@@ -7,7 +7,7 @@
# INGROUP: mokocli.Release # INGROUP: mokocli.Release
# REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli # REPO: https://git.mokoconsulting.tech/MokoConsulting/mokocli
# PATH: /templates/workflows/universal/pre-release.yml.template # PATH: /templates/workflows/universal/pre-release.yml.template
# VERSION: 05.01.00 # VERSION: 05.02.00
# BRIEF: Auto pre-release on push to dev/alpha/beta/rc branches # BRIEF: Auto pre-release on push to dev/alpha/beta/rc branches
name: "Universal: Pre-Release" name: "Universal: Pre-Release"
@@ -59,6 +59,11 @@ jobs:
fetch-depth: 0 fetch-depth: 0
token: ${{ secrets.MOKOGITEA_TOKEN }} token: ${{ secrets.MOKOGITEA_TOKEN }}
ref: ${{ github.ref_name }} ref: ${{ github.ref_name }}
submodules: recursive
- name: Update submodules to main
run: |
git submodule foreach --quiet 'git checkout main && git pull --quiet origin main' 2>/dev/null || true
- name: Setup mokocli tools - name: Setup mokocli tools
env: env:
+18 -13
View File
@@ -29,12 +29,20 @@ jobs:
steps: steps:
- name: Rename branch - name: Rename branch
env:
BRANCH: ${{ github.event.pull_request.head.ref }}
REPO: ${{ github.repository }}
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}
TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
run: | run: |
BRANCH="${{ github.event.pull_request.head.ref }}" set -euo pipefail
# BRANCH is attacker-controlled (PR head ref). Strict allowlist before ANY use.
if ! printf '%s' "$BRANCH" | grep -Eq '^rc/[A-Za-z0-9._/-]+$'; then
echo "::error::Refusing unsafe branch name: $BRANCH"; exit 1
fi
SUFFIX="${BRANCH#rc/}" SUFFIX="${BRANCH#rc/}"
DEV_BRANCH="dev/${SUFFIX}" DEV_BRANCH="dev/${SUFFIX}"
API="${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}/api/v1/repos/${{ github.repository }}/branches" API="${GITEA_URL}/api/v1/repos/${REPO}/branches"
TOKEN="${{ secrets.MOKOGITEA_TOKEN }}"
# Create dev/ branch from rc/ branch # Create dev/ branch from rc/ branch
STATUS=$(curl -sf -o /dev/null -w "%{http_code}" -X POST \ STATUS=$(curl -sf -o /dev/null -w "%{http_code}" -X POST \
@@ -42,25 +50,22 @@ jobs:
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
-d "{\"new_branch_name\": \"${DEV_BRANCH}\", \"old_branch_name\": \"${BRANCH}\"}" \ -d "{\"new_branch_name\": \"${DEV_BRANCH}\", \"old_branch_name\": \"${BRANCH}\"}" \
"${API}" 2>/dev/null || true) "${API}" 2>/dev/null || true)
if [ "$STATUS" = "201" ]; then if [ "$STATUS" = "201" ]; then
echo "Created branch: ${DEV_BRANCH}" >> $GITHUB_STEP_SUMMARY echo "Created branch: ${DEV_BRANCH}" >> "$GITHUB_STEP_SUMMARY"
else else
echo "::error::Failed to create ${DEV_BRANCH} from ${BRANCH} (HTTP ${STATUS})" echo "::error::Failed to create ${DEV_BRANCH} from ${BRANCH} (HTTP ${STATUS})"; exit 1
exit 1
fi fi
# Delete rc/ branch # Read BRANCH from the environment inside PHP (getenv, no string interpolation -> no PHP injection)
ENCODED=$(php -r "echo rawurlencode('${BRANCH}');") ENCODED=$(php -r 'echo rawurlencode(getenv("BRANCH"));')
STATUS=$(curl -sf -o /dev/null -w "%{http_code}" -X DELETE \ STATUS=$(curl -sf -o /dev/null -w "%{http_code}" -X DELETE \
-H "Authorization: token ${TOKEN}" \ -H "Authorization: token ${TOKEN}" \
"${API}/${ENCODED}" 2>/dev/null || true) "${API}/${ENCODED}" 2>/dev/null || true)
if [ "$STATUS" = "204" ]; then if [ "$STATUS" = "204" ]; then
echo "Deleted branch: ${BRANCH}" >> $GITHUB_STEP_SUMMARY echo "Deleted branch: ${BRANCH}" >> "$GITHUB_STEP_SUMMARY"
else else
echo "::warning::Failed to delete ${BRANCH} (HTTP ${STATUS})" echo "::warning::Failed to delete ${BRANCH} (HTTP ${STATUS})"
fi fi
echo "### RC Reverted" >> $GITHUB_STEP_SUMMARY echo "### RC Reverted" >> "$GITHUB_STEP_SUMMARY"
echo "${BRANCH} → ${DEV_BRANCH}" >> $GITHUB_STEP_SUMMARY echo "${BRANCH} → ${DEV_BRANCH}" >> "$GITHUB_STEP_SUMMARY"
+25 -37
View File
@@ -77,7 +77,7 @@ jobs:
- name: Check actor permission (admin only) - name: Check actor permission (admin only)
id: perm id: perm
env: env:
TOKEN: ${{ secrets.MOKOGITEA_TOKEN || secrets.MOKOGITEA_TOKEN || github.token }} TOKEN: ${{ secrets.MOKOGITEA_TOKEN || github.token }}
REPO: ${{ github.repository }} REPO: ${{ github.repository }}
ACTOR: ${{ github.actor }} ACTOR: ${{ github.actor }}
run: | run: |
@@ -671,42 +671,30 @@ jobs:
# ═══════════════════════════════════════════════════════════════════════ # ═══════════════════════════════════════════════════════════════════════
# Issue Reporter — file issues for failed gates # Issue Reporter — file issues for failed gates
# ═══════════════════════════════════════════════════════════════════════ # ═══════════════════════════════════════════════════════════════════════
report-issues: report-scripts:
name: "Report Issues" name: "Report: Scripts Governance"
runs-on: ubuntu-latest needs: [access_check, scripts_governance]
needs: [access_check, scripts_governance, repo_health]
if: >- if: >-
always() && always() &&
(needs.scripts_governance.result == 'failure' || needs.scripts_governance.result == 'failure'
needs.repo_health.result == 'failure') uses: ./.mokogitea/workflows/ci-issue-reporter.yml
with:
gate: "Scripts Governance"
workflow: "Repo Health"
severity: error
details: "Scripts directory policy violations detected. Review required and allowed directories."
secrets: inherit
steps: report-health:
- name: Checkout name: "Report: Repository Health"
uses: actions/checkout@v4 needs: [access_check, repo_health]
with: if: >-
sparse-checkout: automation/ci-issue-reporter.sh always() &&
sparse-checkout-cone-mode: false needs.repo_health.result == 'failure'
uses: ./.mokogitea/workflows/ci-issue-reporter.yml
- name: "File issues for failed gates" with:
env: gate: "Repository Health"
GITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} workflow: "Repo Health"
GITEA_URL: ${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }} severity: error
run: | details: "Repository health checks failed — missing required artifacts, disallowed files, or content warnings. Check the CI run summary."
chmod +x automation/ci-issue-reporter.sh secrets: inherit
REPORTER="./automation/ci-issue-reporter.sh"
WF="Repo Health"
report_gate() {
local gate="$1" result="$2" details="$3"
if [ "$result" = "failure" ]; then
"$REPORTER" --gate "$gate" --details "$details" --workflow "$WF" --severity error
fi
}
report_gate "Scripts Governance" \
"${{ needs.scripts_governance.result }}" \
"Scripts directory policy violations detected. Review required and allowed directories."
report_gate "Repository Health" \
"${{ needs.repo_health.result }}" \
"Repository health checks failed — missing required artifacts, disallowed files, or content warnings. Check the CI run summary."
+130
View File
@@ -0,0 +1,130 @@
# Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
# FILE INFORMATION
# DEFGROUP: Gitea.Workflow.Template
# INGROUP: MokoStandards.CI
# REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Joomla
# PATH: /.mokogitea/workflows/version-set.yml
# VERSION: 01.00.00
# BRIEF: Set or reset the extension version across all version-bearing files
name: "Joomla: Set Version"
on:
workflow_dispatch:
inputs:
version:
description: "Version number (e.g. 01.00.00)"
required: true
type: string
branch:
description: "Branch to update (default: current)"
required: false
type: string
permissions:
contents: write
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
set-version:
name: Set Version to ${{ inputs.version }}
runs-on: ubuntu-latest
steps:
- name: Validate version format
run: |
VERSION="${{ inputs.version }}"
if ! echo "$VERSION" | grep -qP '^\d{2}\.\d{2}\.\d{2}$'; then
echo "::error::Invalid version format '${VERSION}' — expected XX.YY.ZZ (e.g. 01.00.00)"
exit 1
fi
echo "VERSION=${VERSION}" >> "$GITHUB_ENV"
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.MOKOGITEA_TOKEN || github.token }}
ref: ${{ inputs.branch || github.ref }}
fetch-depth: 1
- name: Update manifest version
run: |
MANIFEST=""
for XML_FILE in $(find . -maxdepth 3 -name "*.xml" -not -path "./.git/*" -not -path "./vendor/*"); do
if grep -q "<extension" "$XML_FILE" 2>/dev/null; then
MANIFEST="$XML_FILE"
break
fi
done
if [ -z "$MANIFEST" ]; then
echo "::warning::No Joomla extension manifest found — skipping manifest update"
else
OLD_VER=$(grep -oP '<version>\K[^<]+' "$MANIFEST" | head -1)
sed -i "s|<version>${OLD_VER}</version>|<version>${VERSION}</version>|" "$MANIFEST"
echo "Manifest: ${OLD_VER} → ${VERSION} (${MANIFEST})"
fi
- name: Update README.md version
run: |
if [ -f "README.md" ]; then
if grep -qP '^\s*VERSION:\s*\d' README.md; then
sed -i -E "s/(VERSION:\s*)[0-9]{2}\.[0-9]{2}\.[0-9]{2}/\1${VERSION}/" README.md
echo "README.md version updated to ${VERSION}"
else
echo "::warning::No VERSION line found in README.md — skipping"
fi
fi
- name: Update CHANGELOG.md
run: |
if [ -f "CHANGELOG.md" ]; then
DATE=$(date +%Y-%m-%d)
# Check if this version already has an entry
if grep -q "^\#\# \[${VERSION}\]" CHANGELOG.md; then
echo "CHANGELOG.md already has entry for ${VERSION} — skipping"
else
# Insert new version entry after [Unreleased] or at the top after header
if grep -q '^\#\# \[Unreleased\]' CHANGELOG.md; then
sed -i "/^\#\# \[Unreleased\]/a\\\\n## [${VERSION}] --- ${DATE}" CHANGELOG.md
else
sed -i "/^\# Changelog/a\\\\n## [Unreleased]\n\n## [${VERSION}] --- ${DATE}" CHANGELOG.md
fi
echo "CHANGELOG.md: added entry for ${VERSION}"
fi
else
echo "::warning::No CHANGELOG.md found — skipping"
fi
- name: Update FILE INFORMATION blocks
run: |
# Update VERSION in file header blocks (# VERSION: XX.YY.ZZ)
find . -maxdepth 1 -type f \( -name "*.yml" -o -name "*.yaml" -o -name "*.php" -o -name "*.md" \) \
-not -path "./.git/*" -not -path "./vendor/*" -print0 2>/dev/null | \
while IFS= read -r -d '' FILE; do
if head -20 "$FILE" | grep -qP '^\s*#?\s*VERSION:\s*\d{2}\.\d{2}\.\d{2}'; then
sed -i -E "s/(#?\s*VERSION:\s*)[0-9]{2}\.[0-9]{2}\.[0-9]{2}/\1${VERSION}/" "$FILE"
echo "Updated FILE INFORMATION VERSION in ${FILE}"
fi
done
- name: Commit and push
run: |
git config user.name "Moko Consulting [bot]"
git config user.email "hello@mokoconsulting.tech"
git add -A
if git diff --cached --quiet; then
echo "No version changes detected — nothing to commit"
else
git commit -m "chore: set version to ${VERSION} [skip bump]
Authored-by: Moko Consulting"
git push
echo "### Version Set" >> $GITHUB_STEP_SUMMARY
echo "Version updated to \`${VERSION}\` on branch \`${GITHUB_REF_NAME}\`" >> $GITHUB_STEP_SUMMARY
fi
+12 -4
View File
@@ -13,6 +13,7 @@
name: "Universal: Workflow Sync Trigger" name: "Universal: Workflow Sync Trigger"
on: on:
workflow_dispatch:
pull_request: pull_request:
types: [closed] types: [closed]
branches: branches:
@@ -26,8 +27,9 @@ jobs:
name: Sync workflows to live repos name: Sync workflows to live repos
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: >- if: >-
github.event.pull_request.merged == true && github.event_name == 'workflow_dispatch' ||
!contains(github.event.pull_request.title, '[skip sync]') (github.event.pull_request.merged == true &&
!contains(github.event.pull_request.title, '[skip sync]'))
steps: steps:
- name: Determine platform from repo name - name: Determine platform from repo name
@@ -49,8 +51,14 @@ jobs:
env: env:
MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }} MOKOGITEA_TOKEN: ${{ secrets.MOKOGITEA_TOKEN }}
run: | run: |
GITEA_URL="${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}" MOKOGITEA_URL="${{ vars.GITEA_URL || 'https://git.mokoconsulting.tech' }}"
git clone --depth 1 "${GITEA_URL}/MokoConsulting/mokocli.git" /tmp/mokocli git clone --depth 1 "${MOKOGITEA_URL}/MokoConsulting/mokocli.git" /tmp/mokocli
- name: Install PHP
run: |
if ! command -v php &> /dev/null; then
apt-get update -qq && apt-get install -y -qq php-cli php-json php-curl > /dev/null 2>&1
fi
- name: Install dependencies - name: Install dependencies
run: | run: |
+28 -29
View File
@@ -1,38 +1,37 @@
# Changelog # Changelog
## [Unreleased] ## [Unreleased]
## [01.41.00] --- 2026-06-23
## [01.41.00] --- 2026-06-23 ## [01.45.00] --- 2026-06-28
## [01.43.35] --- 2026-06-28
### Added ### Added
- Multi-remote storage: new `#__mokosuitebackup_remotes` table for multiple destinations per profile (#97) - Customizable restore script filename per backup profile (reduces discoverability on remote servers)
- Remote destinations UI: AJAX-driven add/edit/delete/toggle modal on profile edit view - MokoRestore standalone mode: multi-ZIP selector when multiple backup archives are present
- Engine integration: BackupEngine and SteppedBackupEngine upload to all enabled destinations - MokoRestore preflight: Joomla installation detection warning before overwriting an existing site
- Migration SQL: auto-migrates existing SFTP/S3/GDrive/FTP configs to new table - MokoRestore error handling: try/catch on fetch calls, HTTP status checks, JSON parse recovery
- Backward compatibility: falls back to legacy single-remote columns if remotes table is empty - Download button on individual backup record detail toolbar
- Secrets masked in API responses, merged from DB on save to prevent leakage - Profile column in backup records list links to the profile edit view
## [01.40.00] --- 2026-06-23 ### Changed
- Moved download, browse archive, and view log actions from backup list rows into the individual backup record view
- Removed "Run Backup" / "Backup Now" buttons from profiles list, profile edit toolbar, and backup records view (backups are triggered from the dashboard only)
## [01.40.00] --- 2026-06-23 - Removed ordering field from profiles; default sort is now by ID ascending
- MokoRestore cleanup and security messages now reference the actual script filename instead of hardcoded "restore.php"
## [01.39.01] --- 2026-06-23
## [01.39.01] --- 2026-06-23
### Added
- MokoRestore: post-restore reset options — passwords, hits, versions, sessions, cache (#131)
- MokoRestore: per-table conflict resolution — replace, skip, merge, data-only per table (#132)
- MokoRestore: preset buttons — "All Replace", "All Skip", "Everything except users"
- MokoRestore: auto-detect sanitized passwords and prompt for reset
- Data sanitization: passwords, emails, sessions in backup profile settings (#129)
- Manual purge: delete all backups older than a selected date with count preview (#119)
- CPanel admin dashboard module with backup status, quick actions, and profile buttons (#105)
- 7z archive format via system 7za/7z binary with optional password encryption (#122)
- SFTP remote file browser: browse remote server directories to select backup path (#98)
### Fixed ### Fixed
- MokoRestore: data-only mode now uses REPLACE INTO to handle existing rows - SSH key indicator detection and missing delete language key
- MokoRestore: temporary password is now randomly generated (not hardcoded "changeme") - Bootstrap 5 modal conversion for snapshots view (data-bs-dismiss, modal-footer, getOrCreateInstance)
- ntfy default URL changed from ntfy.sh to ntfy.mokoconsulting.tech
- Untranslated JFIELD_ORDERING_ASC / JFIELD_ORDERING_LABEL language keys replaced with component-specific keys
- Options page title now shows "MokoSuiteBackup Options" instead of raw language key
- Profile dropdown IDs in backup records and dashboard show "#ID — Title (type)" format
- MokoRestore stalling: unhandled promise rejections from network errors or non-JSON responses left UI in loading state
## [01.43.00] --- 2026-06-24
## [01.42.00] --- 2026-06-23
## [01.42.00] --- 2026-06-23
+8 -2
View File
@@ -5,7 +5,7 @@ Full-site backup and restore for Joomla — database, files, and configuration.
| Field | Value | | Field | Value |
|---|---| |---|---|
| **Package** | `pkg_mokosuitebackup` | | **Package** | `pkg_mokosuitebackup` |
| **Type** | Joomla Package (8 sub-extensions) | | **Type** | Joomla Package (9 sub-extensions + MokoSuiteClient) |
| **Joomla** | 6.x+ | | **Joomla** | 6.x+ |
| **PHP** | 8.1+ | | **PHP** | 8.1+ |
| **License** | GPL-3.0-or-later | | **License** | GPL-3.0-or-later |
@@ -19,6 +19,7 @@ Full-site backup and restore for Joomla — database, files, and configuration.
- Stepped AJAX engine prevents timeout on shared hosting - Stepped AJAX engine prevents timeout on shared hosting
- AES-256 ZIP encryption with configurable password - AES-256 ZIP encryption with configurable password
- Configurable archive naming with placeholders ([HOST], [DATE], [SITE_NAME], etc.) - Configurable archive naming with placeholders ([HOST], [DATE], [SITE_NAME], etc.)
- Per-profile retention — configure max backup count and max age (days) per profile, with global defaults
- Data sanitization — optionally clear user passwords, emails, and sessions in backup - Data sanitization — optionally clear user passwords, emails, and sessions in backup
### Content Snapshots ### Content Snapshots
@@ -30,7 +31,8 @@ Full-site backup and restore for Joomla — database, files, and configuration.
- Scheduled snapshot task via com_scheduler - Scheduled snapshot task via com_scheduler
### Remote Storage ### Remote Storage
- SFTP with SSH key file authentication (key stored base64-encoded in database) - Multi-remote — upload to multiple destinations per profile simultaneously
- SFTP with SSH key file auth + remote directory browser
- Amazon S3 and S3-compatible (DigitalOcean Spaces, Wasabi, MinIO) - Amazon S3 and S3-compatible (DigitalOcean Spaces, Wasabi, MinIO)
- Google Drive with OAuth2 and resumable uploads - Google Drive with OAuth2 and resumable uploads
- Graceful degradation — local backup preserved if upload fails - Graceful degradation — local backup preserved if upload fails
@@ -66,6 +68,10 @@ Full-site backup and restore for Joomla — database, files, and configuration.
- Snapshots: create, list, restore, delete, download - Snapshots: create, list, restore, delete, download
- Profile credentials masked in API responses - Profile credentials masked in API responses
### Bundled: MokoSuiteClient
- Full MokoSuiteClient package installed automatically alongside MokoSuiteBackup
- Provides admin dashboard, security firewall, tenant management, and developer tools
## Installation ## Installation
1. Download from [Releases](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteBackup/releases) 1. Download from [Releases](https://git.mokoconsulting.tech/MokoConsulting/MokoSuiteBackup/releases)
+241
View File
@@ -0,0 +1,241 @@
<!--
Copyright (C) 2026 Moko Consulting <hello@mokoconsulting.tech>
This file is part of a Moko Consulting project.
SPDX-License-Identifier: GPL-3.0-or-later
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
# FILE INFORMATION
DEFGROUP: Template-Joomla
INGROUP: Template-Joomla.Documentation
REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Joomla
PATH: /SECURITY.md
VERSION: 01.45.00
BRIEF: Security vulnerability reporting and handling policy
-->
# Security Policy
## Purpose and Scope
This document defines the security vulnerability reporting, response, and disclosure policy for this Joomla Plugin template repository. It establishes the authoritative process for responsible disclosure, assessment, remediation, and communication of security issues.
## Supported Versions
Security updates are provided for the following versions:
| Version | Supported |
| ------- | ------------------ |
| 01.x.x | :white_check_mark: |
| < 01.0 | :x: |
Only the current major version receives security updates. Users should upgrade to the latest supported version to receive security patches.
## Reporting a Vulnerability
### Where to Report
**DO NOT** create public GitHub issues for security vulnerabilities.
Report security vulnerabilities privately to:
**Email**: `security@mokoconsulting.tech`
**Subject Line**: `[SECURITY] Template-Joomla - Brief Description`
### What to Include
A complete vulnerability report should include:
1. **Description**: Clear explanation of the vulnerability
2. **Impact**: Potential security impact and severity assessment
3. **Affected Versions**: Which versions are vulnerable
4. **Reproduction Steps**: Detailed steps to reproduce the issue
5. **Proof of Concept**: Code, configuration, or demonstration (if applicable)
6. **Suggested Fix**: Proposed remediation (if known)
7. **Disclosure Timeline**: Your expectations for public disclosure
### Response Timeline
* **Initial Response**: Within 3 business days
* **Assessment Complete**: Within 7 business days
* **Fix Timeline**: Depends on severity (see below)
* **Disclosure**: Coordinated with reporter
## Severity Classification
Vulnerabilities are classified using the following severity levels:
### Critical
* Remote code execution
* Authentication bypass
* Data breach or exposure of sensitive information
* **Fix Timeline**: 7 days
### High
* Privilege escalation
* SQL injection or command injection
* Cross-site scripting (XSS) with significant impact
* **Fix Timeline**: 14 days
### Medium
* Information disclosure (limited scope)
* Denial of service
* Security misconfigurations with moderate impact
* **Fix Timeline**: 30 days
### Low
* Security best practice violations
* Minor information leaks
* Issues requiring user interaction or complex preconditions
* **Fix Timeline**: 60 days or next release
## Remediation Process
1. **Acknowledgment**: Security team confirms receipt and begins investigation
2. **Assessment**: Vulnerability is validated, severity assigned, and impact analyzed
3. **Development**: Security patch is developed and tested
4. **Review**: Patch undergoes security review and validation
5. **Release**: Fixed version is released with security advisory
6. **Disclosure**: Public disclosure follows coordinated timeline
## Security Advisories
Security advisories are published via:
* GitHub Security Advisories
* Release notes and CHANGELOG.md
* Email notification to project users (if mailing list is established)
Advisories include:
* CVE identifier (if applicable)
* Severity rating
* Affected versions
* Fixed versions
* Mitigation steps
* Attribution (with reporter consent)
## Security Best Practices
For projects using this template:
### Required Controls
* Enable GitHub security features (Dependabot, code scanning)
* Implement branch protection on `main`
* Require code review for all changes
* Enforce signed commits (recommended)
* Use secrets management (never commit credentials)
* Maintain security documentation
* Follow secure coding standards defined in MokoStandards
### Joomla Plugin Security
* Follow Joomla security best practices
* Validate and sanitize all user input
* Use Joomla's database API to prevent SQL injection
* Properly escape output to prevent XSS
* Implement proper access control checks
* Use Joomla's session and authentication APIs
* Keep Joomla and dependencies up to date
### CI/CD Security
* Validate all inputs
* Sanitize outputs
* Use least privilege access
* Pin dependencies with hash verification
* Scan for vulnerabilities in dependencies
* Audit third-party actions and tools
#### Automated Security Scanning
All repositories SHOULD implement:
**CodeQL Analysis**:
* Enabled for PHP and other supported languages
* Runs on: push to main, pull requests, weekly schedule
* Query sets: `security-extended` and `security-and-quality`
* Configuration: `.github/workflows/codeql-analysis.yml`
**Dependabot Security Updates**:
* Weekly scans for vulnerable dependencies
* Automated pull requests for security patches
* Configuration: `.github/dependabot.yml`
**Secret Scanning**:
* Enabled by default with push protection
* Prevents accidental credential commits
### Dependency Management
* Keep dependencies up to date
* Monitor security advisories for dependencies
* Remove unused dependencies
* Audit new dependencies before adoption
* Document security-critical dependencies
## Compliance and Governance
This security policy is aligned with MokoStandards. Deviations require documented justification.
Security policies are reviewed and updated at least annually or following significant security incidents.
## Attribution and Recognition
We acknowledge and appreciate responsible disclosure. With your permission, we will:
* Credit you in security advisories
* List you in CHANGELOG.md for the fix release
* Recognize your contribution publicly (if desired)
## Contact and Escalation
* **Security Team**: security@mokoconsulting.tech
* **Primary Contact**: hello@mokoconsulting.tech
* **Escalation**: For urgent matters requiring immediate attention, contact the maintainer directly via GitHub
## Out of Scope
The following are explicitly out of scope:
* Issues in third-party dependencies (report directly to maintainers)
* Social engineering attacks
* Physical security issues
* Denial of service via resource exhaustion without amplification
* Issues requiring physical access to systems
* Theoretical vulnerabilities without proof of exploitability
---
## Metadata
| Field | Value |
| ------------ | ------------------------------------------------------------------------------------------------------------ |
| Document | Security Policy |
| Path | /SECURITY.md |
| Repository | [https://github.com/mokoconsulting-tech/Template-Joomla](https://github.com/mokoconsulting-tech/Template-Joomla) |
| Owner | Moko Consulting |
| Scope | Security vulnerability handling |
| Status | Active |
| Effective | 2026-01-16 |
## Revision History
| Date | Change Description | Author |
| ---------- | ------------------------------------------------- | --------------- |
| 2026-01-16 | Initial creation for template repository | Moko Consulting |
@@ -21,7 +21,7 @@
type="sql" type="sql"
label="COM_MOKOJOOMBACKUP_CONFIG_DEFAULT_PROFILE" label="COM_MOKOJOOMBACKUP_CONFIG_DEFAULT_PROFILE"
description="COM_MOKOJOOMBACKUP_CONFIG_DEFAULT_PROFILE_DESC" description="COM_MOKOJOOMBACKUP_CONFIG_DEFAULT_PROFILE_DESC"
query="SELECT id AS value, CONCAT(title, ' (#', id, ')') AS text FROM #__mokosuitebackup_profiles WHERE published = 1 ORDER BY ordering ASC" query="SELECT id AS value, CONCAT(title, ' (#', id, ')') AS text FROM #__mokosuitebackup_profiles WHERE published = 1 ORDER BY id ASC"
default="1" default="1"
> >
<option value="1">Default Backup Profile (#1)</option> <option value="1">Default Backup Profile (#1)</option>
@@ -245,7 +245,7 @@
type="text" type="text"
label="COM_MOKOJOOMBACKUP_CONFIG_NTFY_SERVER" label="COM_MOKOJOOMBACKUP_CONFIG_NTFY_SERVER"
description="COM_MOKOJOOMBACKUP_CONFIG_NTFY_SERVER_DESC" description="COM_MOKOJOOMBACKUP_CONFIG_NTFY_SERVER_DESC"
default="https://ntfy.sh" default="https://ntfy.mokoconsulting.tech"
filter="url" filter="url"
/> />
<field <field
@@ -24,10 +24,9 @@
name="fullordering" name="fullordering"
type="list" type="list"
label="JGLOBAL_SORT_BY" label="JGLOBAL_SORT_BY"
default="a.ordering ASC" default="a.id ASC"
onchange="this.form.submit();" onchange="this.form.submit();"
> >
<option value="a.ordering ASC">JFIELD_ORDERING_LABEL_ASC</option>
<option value="a.title ASC">COM_MOKOJOOMBACKUP_HEADING_TITLE_ASC</option> <option value="a.title ASC">COM_MOKOJOOMBACKUP_HEADING_TITLE_ASC</option>
<option value="a.title DESC">COM_MOKOJOOMBACKUP_HEADING_TITLE_DESC</option> <option value="a.title DESC">COM_MOKOJOOMBACKUP_HEADING_TITLE_DESC</option>
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option> <option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
@@ -93,6 +93,16 @@
<option value="1">COM_MOKOJOOMBACKUP_MOKORESTORE_WRAPPED</option> <option value="1">COM_MOKOJOOMBACKUP_MOKORESTORE_WRAPPED</option>
<option value="standalone">COM_MOKOJOOMBACKUP_MOKORESTORE_STANDALONE</option> <option value="standalone">COM_MOKOJOOMBACKUP_MOKORESTORE_STANDALONE</option>
</field> </field>
<field
name="restore_script_name"
type="text"
label="COM_MOKOJOOMBACKUP_FIELD_RESTORE_SCRIPT_NAME"
description="COM_MOKOJOOMBACKUP_FIELD_RESTORE_SCRIPT_NAME_DESC"
default="restore.php"
maxlength="128"
filter="string"
showon="include_mokorestore!:0"
/>
<field <field
name="encryption_password" name="encryption_password"
type="password" type="password"
@@ -164,12 +174,6 @@
<option value="1">JPUBLISHED</option> <option value="1">JPUBLISHED</option>
<option value="0">JUNPUBLISHED</option> <option value="0">JUNPUBLISHED</option>
</field> </field>
<field
name="ordering"
type="number"
label="JFIELD_ORDERING_LABEL"
default="0"
/>
</fieldset> </fieldset>
<fieldset name="filters" label="COM_MOKOJOOMBACKUP_FIELDSET_FILTERS"> <fieldset name="filters" label="COM_MOKOJOOMBACKUP_FIELDSET_FILTERS">
@@ -5,6 +5,7 @@
; @license GPL-3.0-or-later ; @license GPL-3.0-or-later
COM_MOKOJOOMBACKUP="MokoSuiteBackup" COM_MOKOJOOMBACKUP="MokoSuiteBackup"
COM_MOKOJOOMBACKUP_CONFIGURATION="MokoSuiteBackup Options"
COM_MOKOJOOMBACKUP_DESCRIPTION="Full-site backup and restore for Joomla" COM_MOKOJOOMBACKUP_DESCRIPTION="Full-site backup and restore for Joomla"
; Submenu ; Submenu
@@ -41,6 +42,8 @@ COM_MOKOJOOMBACKUP_DASHBOARD_STORAGE_BREAKDOWN="Storage by Profile"
COM_MOKOJOOMBACKUP_DASHBOARD_BACKUP_TREND="Backup Trend (30 days)" COM_MOKOJOOMBACKUP_DASHBOARD_BACKUP_TREND="Backup Trend (30 days)"
; Backups view ; Backups view
COM_MOKOJOOMBACKUP_BACKUPS_N_ITEMS_DELETED="%d backup records deleted."
COM_MOKOJOOMBACKUP_BACKUPS_N_ITEMS_DELETED_1="%d backup record deleted."
COM_MOKOJOOMBACKUP_BACKUPS_TITLE="Backup Records" COM_MOKOJOOMBACKUP_BACKUPS_TITLE="Backup Records"
COM_MOKOJOOMBACKUP_BACKUPS_TABLE_CAPTION="Table of backup records" COM_MOKOJOOMBACKUP_BACKUPS_TABLE_CAPTION="Table of backup records"
COM_MOKOJOOMBACKUP_NO_BACKUPS="No backups found. Click 'Backup Now' to create your first backup." COM_MOKOJOOMBACKUP_NO_BACKUPS="No backups found. Click 'Backup Now' to create your first backup."
@@ -127,29 +130,31 @@ COM_MOKOJOOMBACKUP_COMPRESSION_FASTEST="Low (fast)"
COM_MOKOJOOMBACKUP_COMPRESSION_NORMAL="Normal (balanced)" COM_MOKOJOOMBACKUP_COMPRESSION_NORMAL="Normal (balanced)"
COM_MOKOJOOMBACKUP_COMPRESSION_BEST="Maximum (smallest)" COM_MOKOJOOMBACKUP_COMPRESSION_BEST="Maximum (smallest)"
COM_MOKOJOOMBACKUP_FIELD_ENCRYPTION_PASSWORD="Encryption Password" COM_MOKOJOOMBACKUP_FIELD_ENCRYPTION_PASSWORD="Encryption Password"
COM_MOKOJOOMBACKUP_FIELD_ENCRYPTION_PASSWORD_DESC="Set a password to encrypt the backup archive with AES-256. Leave blank for no encryption. Required to restore encrypted backups." COM_MOKOJOOMBACKUP_FIELD_ENCRYPTION_PASSWORD_DESC="AES-256 encryption password. Leave blank for no encryption. Required to restore."
COM_MOKOJOOMBACKUP_FIELD_SPLIT_SIZE="Split Size (MB)" COM_MOKOJOOMBACKUP_FIELD_SPLIT_SIZE="Split Size (MB)"
COM_MOKOJOOMBACKUP_FIELD_SPLIT_SIZE_DESC="Split archive into parts of this size in MB. 0 = no splitting." COM_MOKOJOOMBACKUP_FIELD_SPLIT_SIZE_DESC="Split archive into parts of this size in MB. 0 = no splitting."
COM_MOKOJOOMBACKUP_FIELD_BACKUP_DIR="Backup Directory" COM_MOKOJOOMBACKUP_FIELD_BACKUP_DIR="Backup Directory"
COM_MOKOJOOMBACKUP_FIELD_BACKUP_DIR_DESC="Directory where backup archives are stored. Supports placeholders: [HOME] (user home directory), [HOST], [DATE], [YEAR], [MONTH], [DAY], [PROFILE_NAME], [SITE_NAME], [TYPE]. Use [HOME]/backups to store outside the web root. Absolute paths (starting with /) are used as-is; relative paths resolve from the Joomla root." COM_MOKOJOOMBACKUP_FIELD_BACKUP_DIR_DESC="Where backups are stored. Use placeholders like [HOME]/backups for portability. Click the ? icon for full documentation."
COM_MOKOJOOMBACKUP_FIELD_ARCHIVE_NAME_FORMAT="Archive Name Format" COM_MOKOJOOMBACKUP_FIELD_ARCHIVE_NAME_FORMAT="Archive Name Format"
COM_MOKOJOOMBACKUP_FIELD_ARCHIVE_NAME_FORMAT_DESC="Filename template for backup archives (without extension). Placeholders: [HOST] hostname, [DATE] Ymd, [TIME] His, [DATETIME] Ymd_His, [YEAR] [MONTH] [DAY] [HOUR] [MINUTE] [SECOND], [PROFILE_ID], [PROFILE_NAME], [SITE_NAME], [TYPE], [RANDOM]." COM_MOKOJOOMBACKUP_FIELD_ARCHIVE_NAME_FORMAT_DESC="Filename template (without extension). Click the placeholder buttons below to insert tokens."
COM_MOKOJOOMBACKUP_FIELD_INCLUDE_MOKORESTORE="MokoRestore Script" COM_MOKOJOOMBACKUP_FIELD_INCLUDE_MOKORESTORE="MokoRestore Script"
COM_MOKOJOOMBACKUP_FIELD_INCLUDE_MOKORESTORE_DESC="Include the MokoRestore standalone restore wizard. 'Wrapped' bundles it inside the backup ZIP. 'Standalone' generates a separate restore.php that scans for backup ZIPs in its directory — ideal for remote servers." COM_MOKOJOOMBACKUP_FIELD_INCLUDE_MOKORESTORE_DESC="None: no restore script. Wrapped: bundled inside the ZIP. Standalone: separate restore.php file (ideal for remote servers)."
COM_MOKOJOOMBACKUP_MOKORESTORE_NONE="None" COM_MOKOJOOMBACKUP_MOKORESTORE_NONE="None"
COM_MOKOJOOMBACKUP_MOKORESTORE_WRAPPED="Wrapped (inside backup ZIP)" COM_MOKOJOOMBACKUP_MOKORESTORE_WRAPPED="Wrapped (inside backup ZIP)"
COM_MOKOJOOMBACKUP_MOKORESTORE_STANDALONE="Standalone (separate restore.php)" COM_MOKOJOOMBACKUP_MOKORESTORE_STANDALONE="Standalone (separate restore.php)"
COM_MOKOJOOMBACKUP_FIELD_RESTORE_SCRIPT_NAME="Restore Script Filename"
COM_MOKOJOOMBACKUP_FIELD_RESTORE_SCRIPT_NAME_DESC="Custom filename for the restore script. Must end in .php. Use a non-obvious name to reduce discoverability on remote servers (e.g. moko-install-xyz.php)."
; Data Sanitization ; Data Sanitization
COM_MOKOJOOMBACKUP_FIELDSET_SANITIZATION="Data Sanitization" COM_MOKOJOOMBACKUP_FIELDSET_SANITIZATION="Data Sanitization"
COM_MOKOJOOMBACKUP_FIELD_SANITIZE_PASSWORDS="Sanitize User Passwords" COM_MOKOJOOMBACKUP_FIELD_SANITIZE_PASSWORDS="Sanitize User Passwords"
COM_MOKOJOOMBACKUP_FIELD_SANITIZE_PASSWORDS_DESC="Replace all user password hashes with an invalid value. Users will not be able to log in with the restored backup without resetting their password. Ideal for sharing backups, creating demo/staging sites, or GDPR compliance." COM_MOKOJOOMBACKUP_FIELD_SANITIZE_PASSWORDS_DESC="Replace password hashes with invalid values. Users must reset passwords after restore. For demos, staging, or GDPR."
COM_MOKOJOOMBACKUP_FIELD_PRESERVE_SUPER_ADMIN="Preserve Super Admin Password" COM_MOKOJOOMBACKUP_FIELD_PRESERVE_SUPER_ADMIN="Preserve Super Admin Password"
COM_MOKOJOOMBACKUP_FIELD_PRESERVE_SUPER_ADMIN_DESC="Keep the password for Super Users (group ID 8) intact. You will still be able to log in as a Super Admin after restoring." COM_MOKOJOOMBACKUP_FIELD_PRESERVE_SUPER_ADMIN_DESC="Keep the password for Super Users (group ID 8) intact. You will still be able to log in as a Super Admin after restoring."
COM_MOKOJOOMBACKUP_FIELD_SANITIZE_EMAILS="Sanitize User Emails" COM_MOKOJOOMBACKUP_FIELD_SANITIZE_EMAILS="Sanitize User Emails"
COM_MOKOJOOMBACKUP_FIELD_SANITIZE_EMAILS_DESC="Replace all user email addresses with dummy values (user123@sanitized.example.com). Prevents accidental emails being sent to real users from a cloned/staging site. Super admin emails are preserved if 'Preserve Super Admin' is enabled." COM_MOKOJOOMBACKUP_FIELD_SANITIZE_EMAILS_DESC="Replace emails with dummy values. Prevents accidental emails from cloned sites. Super admin preserved if enabled above."
COM_MOKOJOOMBACKUP_FIELD_SANITIZE_SESSIONS="Clear Session Data" COM_MOKOJOOMBACKUP_FIELD_SANITIZE_SESSIONS="Clear Session Data"
COM_MOKOJOOMBACKUP_FIELD_SANITIZE_SESSIONS_DESC="Exclude active session data from the backup. This logs out all users and prevents session hijacking when the backup is restored on another server. Enabled by default." COM_MOKOJOOMBACKUP_FIELD_SANITIZE_SESSIONS_DESC="Exclude session data. Logs out all users on restore, prevents session hijacking. Enabled by default."
; Exclusion filter fields ; Exclusion filter fields
COM_MOKOJOOMBACKUP_FIELD_EXCLUDE_DIRS="Exclude Directories" COM_MOKOJOOMBACKUP_FIELD_EXCLUDE_DIRS="Exclude Directories"
@@ -275,9 +280,9 @@ COM_MOKOJOOMBACKUP_FIELD_SFTP_PORT_DESC="SSH port (default: 22)"
COM_MOKOJOOMBACKUP_FIELD_SFTP_USERNAME="SSH Username" COM_MOKOJOOMBACKUP_FIELD_SFTP_USERNAME="SSH Username"
COM_MOKOJOOMBACKUP_FIELD_SFTP_USERNAME_DESC="Username for SSH authentication" COM_MOKOJOOMBACKUP_FIELD_SFTP_USERNAME_DESC="Username for SSH authentication"
COM_MOKOJOOMBACKUP_FIELD_SFTP_PASSWORD="SSH Password" COM_MOKOJOOMBACKUP_FIELD_SFTP_PASSWORD="SSH Password"
COM_MOKOJOOMBACKUP_FIELD_SFTP_PASSWORD_DESC="Password for SSH authentication. Leave blank if using a key file." COM_MOKOJOOMBACKUP_FIELD_SFTP_PASSWORD_DESC="Password for SSH authentication."
COM_MOKOJOOMBACKUP_FIELD_SFTP_KEY="SSH Private Key" COM_MOKOJOOMBACKUP_FIELD_SFTP_KEY="SSH Private Key"
COM_MOKOJOOMBACKUP_FIELD_SFTP_KEY_DESC="Upload or paste your SSH private key (e.g. id_rsa or id_ed25519). The key is stored securely in the database and written to a temp file with 0600 permissions only during upload, then deleted. Leave blank to use password authentication." COM_MOKOJOOMBACKUP_FIELD_SFTP_KEY_DESC="Upload your SSH private key (id_rsa, id_ed25519). Stored base64-encoded in DB, written to temp file during upload only."
COM_MOKOJOOMBACKUP_FIELD_SFTP_KEY_UPLOAD="Upload Key File" COM_MOKOJOOMBACKUP_FIELD_SFTP_KEY_UPLOAD="Upload Key File"
COM_MOKOJOOMBACKUP_FIELD_SFTP_KEY_REPLACE="Replace Key" COM_MOKOJOOMBACKUP_FIELD_SFTP_KEY_REPLACE="Replace Key"
COM_MOKOJOOMBACKUP_FIELD_SFTP_KEY_LOADED="Key loaded" COM_MOKOJOOMBACKUP_FIELD_SFTP_KEY_LOADED="Key loaded"
@@ -7,7 +7,7 @@
--> -->
<extension type="component" method="upgrade"> <extension type="component" method="upgrade">
<name>MokoSuiteBackup</name> <name>MokoSuiteBackup</name>
<version>01.41.00</version> <version>01.45.00</version>
<creationDate>2026-06-02</creationDate> <creationDate>2026-06-02</creationDate>
<author>Moko Consulting</author> <author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail> <authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -40,6 +40,7 @@ CREATE TABLE IF NOT EXISTS `#__mokosuitebackup_profiles` (
`remote_keep_local` TINYINT(1) NOT NULL DEFAULT 1 COMMENT 'Keep local copy after upload', `remote_keep_local` TINYINT(1) NOT NULL DEFAULT 1 COMMENT 'Keep local copy after upload',
`encryption_password` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'AES-256 archive encryption password (blank = no encryption)', `encryption_password` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'AES-256 archive encryption password (blank = no encryption)',
`include_mokorestore` VARCHAR(20) NOT NULL DEFAULT '0' COMMENT 'MokoRestore mode: 0=none, 1=wrapped, standalone', `include_mokorestore` VARCHAR(20) NOT NULL DEFAULT '0' COMMENT 'MokoRestore mode: 0=none, 1=wrapped, standalone',
`restore_script_name` VARCHAR(100) NOT NULL DEFAULT 'restore.php' COMMENT 'Custom restore script filename',
`sanitize_passwords` TINYINT(1) NOT NULL DEFAULT 0 COMMENT 'Replace user password hashes with invalid value', `sanitize_passwords` TINYINT(1) NOT NULL DEFAULT 0 COMMENT 'Replace user password hashes with invalid value',
`preserve_super_admin` TINYINT(1) NOT NULL DEFAULT 1 COMMENT 'Keep super admin password when sanitizing', `preserve_super_admin` TINYINT(1) NOT NULL DEFAULT 1 COMMENT 'Keep super admin password when sanitizing',
`sanitize_emails` TINYINT(1) NOT NULL DEFAULT 0 COMMENT 'Replace user emails with dummy values', `sanitize_emails` TINYINT(1) NOT NULL DEFAULT 0 COMMENT 'Replace user emails with dummy values',
@@ -54,7 +55,6 @@ CREATE TABLE IF NOT EXISTS `#__mokosuitebackup_profiles` (
`ntfy_server` VARCHAR(512) NOT NULL DEFAULT 'https://ntfy.sh' COMMENT 'ntfy server URL', `ntfy_server` VARCHAR(512) NOT NULL DEFAULT 'https://ntfy.sh' COMMENT 'ntfy server URL',
`ntfy_token` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'ntfy access token (optional)', `ntfy_token` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'ntfy access token (optional)',
`published` TINYINT(1) NOT NULL DEFAULT 1, `published` TINYINT(1) NOT NULL DEFAULT 1,
`ordering` INT(11) NOT NULL DEFAULT 0,
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
@@ -113,14 +113,13 @@ CREATE TABLE IF NOT EXISTS `#__mokosuitebackup_remotes` (
`title` VARCHAR(255) NOT NULL DEFAULT '', `title` VARCHAR(255) NOT NULL DEFAULT '',
`type` VARCHAR(20) NOT NULL DEFAULT 'sftp' COMMENT 'sftp, s3, google_drive', `type` VARCHAR(20) NOT NULL DEFAULT 'sftp' COMMENT 'sftp, s3, google_drive',
`enabled` TINYINT(1) NOT NULL DEFAULT 1, `enabled` TINYINT(1) NOT NULL DEFAULT 1,
`keep_local` TINYINT(1) NOT NULL DEFAULT 1 COMMENT 'Keep local copy after upload', `params` MEDIUMTEXT COMMENT 'JSON: type-specific settings',
`config` MEDIUMTEXT NOT NULL COMMENT 'JSON — type-specific settings',
`ordering` INT(11) NOT NULL DEFAULT 0, `ordering` INT(11) NOT NULL DEFAULT 0,
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `modified` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `idx_profile` (`profile_id`), KEY `idx_profile` (`profile_id`),
KEY `idx_enabled` (`enabled`) KEY `idx_enabled` (`profile_id`, `enabled`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
-- Insert default backup profile (IGNORE prevents duplicate key error on update) -- Insert default backup profile (IGNORE prevents duplicate key error on update)
@@ -128,12 +127,12 @@ INSERT IGNORE INTO `#__mokosuitebackup_profiles` (
`id`, `title`, `description`, `backup_type`, `id`, `title`, `description`, `backup_type`,
`archive_format`, `compression_level`, `split_size`, `backup_dir`, `archive_format`, `compression_level`, `split_size`, `backup_dir`,
`exclude_dirs`, `exclude_files`, `exclude_tables`, `exclude_dirs`, `exclude_files`, `exclude_tables`,
`published`, `ordering`, `created`, `modified` `published`, `created`, `modified`
) VALUES ( ) VALUES (
1, 'Default Backup Profile', 'Full site backup with default settings', 'full', 1, 'Default Backup Profile', 'Full site backup with default settings', 'full',
'zip', 5, 0, '[DEFAULT_DIR]', 'zip', 5, 0, '[DEFAULT_DIR]',
'administrator/components/com_mokosuitebackup/backups\ntmp\ncache\nlogs\nadministrator/logs', 'administrator/components/com_mokosuitebackup/backups\ntmp\ncache\nlogs\nadministrator/logs',
'.gitignore\n.htaccess.bak', '.gitignore\n.htaccess.bak',
'#__session', '#__session',
1, 1, NOW(), NOW() 1, NOW(), NOW()
); );
@@ -0,0 +1 @@
/* 01.43.11 — no schema changes */
@@ -0,0 +1 @@
/* 01.43.19 — no schema changes */
@@ -0,0 +1 @@
/* 01.43.20 — no schema changes */
@@ -0,0 +1 @@
/* 01.43.21 — no schema changes */
@@ -0,0 +1,5 @@
-- 01.43.22 — Add restore_script_name to profiles, align remotes schema
ALTER TABLE `#__mokosuitebackup_profiles`
ADD COLUMN `restore_script_name` VARCHAR(100) NOT NULL DEFAULT 'restore.php' COMMENT 'Custom restore script filename'
AFTER `include_mokorestore`;
@@ -0,0 +1 @@
/* 01.43.23 — no schema changes */
@@ -0,0 +1 @@
/* 01.43.24 — no schema changes */
@@ -0,0 +1 @@
/* 01.43.25 — no schema changes */
@@ -0,0 +1 @@
/* 01.43.26 — no schema changes */
@@ -0,0 +1 @@
/* 01.43.29 — no schema changes */
@@ -0,0 +1 @@
/* 01.43.30 — no schema changes */
@@ -0,0 +1 @@
/* 01.43.31 — no schema changes */
@@ -0,0 +1 @@
/* 01.43.32 — no schema changes */
@@ -0,0 +1 @@
ALTER TABLE `#__mokosuitebackup_profiles` DROP COLUMN `ordering`;
@@ -0,0 +1 @@
/* 01.43.34 — no schema changes */
@@ -0,0 +1 @@
/* 01.43.35 — no schema changes */
@@ -0,0 +1 @@
/* 01.43.36 — no schema changes */
@@ -0,0 +1 @@
/* 01.43.37 — no schema changes */
@@ -0,0 +1 @@
/* 01.43.38 — no schema changes */
@@ -0,0 +1 @@
/* 01.44.00 — no schema changes */
@@ -0,0 +1 @@
/* 01.44.01 — no schema changes */
@@ -0,0 +1 @@
/* 01.45.00 — no schema changes */
@@ -924,11 +924,11 @@ class AjaxController extends BaseController
return; return;
} }
// Decode JSON config and mask secrets // Decode JSON params and mask secrets
$items = []; $items = [];
foreach ($rows as $row) { foreach ($rows as $row) {
$config = json_decode($row->config, true) ?: []; $config = json_decode($row->params, true) ?: [];
// Mask sensitive fields so they never leave the server in list views // Mask sensitive fields so they never leave the server in list views
$masked = $this->maskSecrets($config, $row->type); $masked = $this->maskSecrets($config, $row->type);
@@ -939,8 +939,7 @@ class AjaxController extends BaseController
'title' => $row->title, 'title' => $row->title,
'type' => $row->type, 'type' => $row->type,
'enabled' => (int) $row->enabled, 'enabled' => (int) $row->enabled,
'keep_local' => (int) $row->keep_local, 'params' => $masked,
'config' => $masked,
'ordering' => (int) $row->ordering, 'ordering' => (int) $row->ordering,
]; ];
} }
@@ -971,7 +970,6 @@ class AjaxController extends BaseController
$title = trim($this->input->getString('remote_title', '')); $title = trim($this->input->getString('remote_title', ''));
$type = $this->input->getCmd('remote_type', 'sftp'); $type = $this->input->getCmd('remote_type', 'sftp');
$enabled = $this->input->getInt('remote_enabled', 1); $enabled = $this->input->getInt('remote_enabled', 1);
$keepLocal = $this->input->getInt('remote_keep_local', 1);
$configRaw = $this->input->getString('remote_config', '{}'); $configRaw = $this->input->getString('remote_config', '{}');
if (!$profileId) { if (!$profileId) {
@@ -1019,9 +1017,7 @@ class AjaxController extends BaseController
$table->title = $title; $table->title = $title;
$table->type = $type; $table->type = $type;
$table->enabled = $enabled ? 1 : 0; $table->enabled = $enabled ? 1 : 0;
$table->keep_local = $keepLocal ? 1 : 0; $table->params = json_encode($config);
$table->config = json_encode($config);
if (!$table->check() || !$table->store()) { if (!$table->check() || !$table->store()) {
$this->sendJson(['error' => true, 'message' => $table->getError() ?: 'Save failed']); $this->sendJson(['error' => true, 'message' => $table->getError() ?: 'Save failed']);
@@ -1190,7 +1186,7 @@ class AjaxController extends BaseController
try { try {
$db = Factory::getDbo(); $db = Factory::getDbo();
$query = $db->getQuery(true) $query = $db->getQuery(true)
->select($db->quoteName('config')) ->select($db->quoteName('params'))
->from($db->quoteName('#__mokosuitebackup_remotes')) ->from($db->quoteName('#__mokosuitebackup_remotes'))
->where($db->quoteName('id') . ' = ' . $id); ->where($db->quoteName('id') . ' = ' . $id);
$db->setQuery($query); $db->setQuery($query);
@@ -249,7 +249,6 @@ class AkeebaImporter
'remote_keep_local' => 1, 'remote_keep_local' => 1,
'include_mokorestore' => (int) (($config['akeeba.advanced.embedded_installer'] ?? 'none') !== 'none'), 'include_mokorestore' => (int) (($config['akeeba.advanced.embedded_installer'] ?? 'none') !== 'none'),
'published' => 1, 'published' => 1,
'ordering' => (int) $akProfile->id,
'created' => $now, 'created' => $now,
'modified' => $now, 'modified' => $now,
]; ];
@@ -259,14 +259,14 @@ class BackupEngine
// Step 2.5: MokoRestore script (if enabled) // Step 2.5: MokoRestore script (if enabled)
$mokoRestoreMode = $profile->include_mokorestore ?? '0'; $mokoRestoreMode = $profile->include_mokorestore ?? '0';
$restoreScriptName = $profile->restore_script_name ?? 'restore.php';
$restoreScriptPath = ''; $restoreScriptPath = '';
if ($mokoRestoreMode === '1') { if ($mokoRestoreMode === '1') {
// Wrapped mode: backup ZIP inside an outer ZIP with restore.php
$this->log('Wrapping with MokoRestore script...'); $this->log('Wrapping with MokoRestore script...');
$mokoRestoreName = str_replace('.zip', '-mokorestore.zip', $archiveName); $mokoRestoreName = str_replace('.zip', '-mokorestore.zip', $archiveName);
$mokoRestorePath = $this->backupDir . '/' . $mokoRestoreName; $mokoRestorePath = $this->backupDir . '/' . $mokoRestoreName;
MokoRestore::wrap($archivePath, $mokoRestorePath); MokoRestore::wrap($archivePath, $mokoRestorePath, $restoreScriptName);
if (is_file($archivePath) && !unlink($archivePath)) { if (is_file($archivePath) && !unlink($archivePath)) {
$this->log('WARNING: Could not remove pre-wrap archive'); $this->log('WARNING: Could not remove pre-wrap archive');
@@ -278,11 +278,11 @@ class BackupEngine
$this->log('MokoRestore archive created: ' . $sizeHuman); $this->log('MokoRestore archive created: ' . $sizeHuman);
$this->log('SHA-256 (wrapped): ' . $checksum); $this->log('SHA-256 (wrapped): ' . $checksum);
} elseif ($mokoRestoreMode === 'standalone') { } elseif ($mokoRestoreMode === 'standalone') {
// Standalone mode: restore.php as a separate file next to the backup ZIP $restoreScriptName = MokoRestore::sanitizeScriptName($restoreScriptName);
$this->log('Generating standalone restore.php...'); $this->log('Generating standalone ' . $restoreScriptName . '...');
$restoreScriptPath = $this->backupDir . '/restore.php'; $restoreScriptPath = $this->backupDir . '/' . $restoreScriptName;
MokoRestore::generateStandalone($restoreScriptPath); MokoRestore::generateStandalone($restoreScriptPath);
$this->log('Standalone restore.php generated (' . number_format(filesize($restoreScriptPath)) . ' bytes)'); $this->log('Standalone ' . $restoreScriptName . ' generated (' . number_format(filesize($restoreScriptPath)) . ' bytes)');
} }
$remoteFilename = ''; $remoteFilename = '';
@@ -303,9 +303,8 @@ class BackupEngine
$remoteFilename = $result['remote_path'] ?? $archiveName; $remoteFilename = $result['remote_path'] ?? $archiveName;
$this->log(' Upload complete: ' . $result['message']); $this->log(' Upload complete: ' . $result['message']);
/* Upload standalone restore.php if in standalone mode */
if (!empty($restoreScriptPath) && is_file($restoreScriptPath)) { if (!empty($restoreScriptPath) && is_file($restoreScriptPath)) {
$uploader->upload($restoreScriptPath, 'restore.php'); $uploader->upload($restoreScriptPath, basename($restoreScriptPath));
} }
} else { } else {
$uploadFailed = true; $uploadFailed = true;
@@ -336,15 +335,15 @@ class BackupEngine
$remoteFilename = $uploadResult['remote_path'] ?? $archiveName; $remoteFilename = $uploadResult['remote_path'] ?? $archiveName;
$this->log('Remote upload complete: ' . $uploadResult['message']); $this->log('Remote upload complete: ' . $uploadResult['message']);
// Upload standalone restore.php alongside the backup if in standalone mode
if (!empty($restoreScriptPath) && is_file($restoreScriptPath)) { if (!empty($restoreScriptPath) && is_file($restoreScriptPath)) {
$this->log('Uploading standalone restore.php...'); $restoreBasename = basename($restoreScriptPath);
$restoreUpload = $uploader->upload($restoreScriptPath, 'restore.php'); $this->log('Uploading standalone ' . $restoreBasename . '...');
$restoreUpload = $uploader->upload($restoreScriptPath, $restoreBasename);
if ($restoreUpload['success']) { if ($restoreUpload['success']) {
$this->log('Standalone restore.php uploaded'); $this->log('Standalone ' . $restoreBasename . ' uploaded');
} else { } else {
$this->log('WARNING: restore.php upload failed: ' . $restoreUpload['message']); $this->log('WARNING: ' . $restoreBasename . ' upload failed: ' . $restoreUpload['message']);
} }
} }
@@ -35,25 +35,36 @@ class MokoRestore
* *
* @return string Path to the wrapped archive * @return string Path to the wrapped archive
*/ */
public static function wrap(string $backupArchive, string $outputPath): string public static function wrap(string $backupArchive, string $outputPath, string $scriptName = 'restore.php'): string
{ {
$scriptName = self::sanitizeScriptName($scriptName);
$zip = new \ZipArchive(); $zip = new \ZipArchive();
if ($zip->open($outputPath, \ZipArchive::CREATE | \ZipArchive::OVERWRITE) !== true) { if ($zip->open($outputPath, \ZipArchive::CREATE | \ZipArchive::OVERWRITE) !== true) {
throw new \RuntimeException('Cannot create MokoRestore archive: ' . $outputPath); throw new \RuntimeException('Cannot create MokoRestore archive: ' . $outputPath);
} }
// Add the standalone restore script $zip->addFromString($scriptName, self::generateRestoreScript());
$zip->addFromString('restore.php', self::generateRestoreScript());
// Add the original backup as a nested ZIP
$zip->addFile($backupArchive, 'site-backup.zip'); $zip->addFile($backupArchive, 'site-backup.zip');
$zip->close(); $zip->close();
return $outputPath; return $outputPath;
} }
public static function sanitizeScriptName(string $name): string
{
$name = basename(trim($name));
if ($name === '' || !str_ends_with(strtolower($name), '.php')) {
$name = 'restore.php';
}
$name = preg_replace('/[^a-zA-Z0-9._-]/', '', $name);
return $name ?: 'restore.php';
}
/** /**
* Generate the standalone restore.php script as a separate file. * Generate the standalone restore.php script as a separate file.
* *
@@ -165,7 +176,38 @@ SCANNER;
$php $php
); );
/* Modify the pre-checks to use getSelectedBackupFile() */ /* Replace the backup archive check with one that scans for ZIPs
(must run BEFORE the blanket file_exists replacement below) */
$php = str_replace(
<<<'ORIG'
$checks[] = [
'label' => 'Backup Archive',
'value' => file_exists(BACKUP_FILE) ? number_format(filesize(BACKUP_FILE) / 1048576, 2) . ' MB' : 'Not found',
'ok' => file_exists(BACKUP_FILE),
'hint' => 'site-backup.zip must be in the same directory as ' . basename($_SERVER['SCRIPT_NAME']),
];
ORIG,
<<<'REPL'
$availableBackups = scanForBackups();
$backupCount = count($availableBackups);
$selectedFile = getSelectedBackupFile();
if ($selectedFile && file_exists($selectedFile)) {
$archiveValue = basename($selectedFile) . ' (' . number_format(filesize($selectedFile) / 1048576, 2) . ' MB)';
} elseif ($backupCount > 0) {
$archiveValue = $backupCount . ' ZIP file(s) found';
} else {
$archiveValue = 'No ZIP files found';
}
$checks[] = [
'label' => 'Backup Archive',
'value' => $archiveValue,
'ok' => $backupCount > 0,
'hint' => 'Place one or more backup ZIP files in the same directory as ' . basename($_SERVER['SCRIPT_NAME']),
];
REPL
);
/* Modify remaining pre-checks to use getSelectedBackupFile() */
$php = str_replace( $php = str_replace(
"file_exists(BACKUP_FILE)", "file_exists(BACKUP_FILE)",
"(getSelectedBackupFile() !== '' || file_exists(BACKUP_FILE))", "(getSelectedBackupFile() !== '' || file_exists(BACKUP_FILE))",
@@ -174,65 +216,83 @@ SCANNER;
$html = self::generateFrontend(); $html = self::generateFrontend();
/* Add backup file selector to the frontend before the extract step */ /* Inject backup file selector into the extract step (panel2) */
$selectorHtml = <<<'SELECTOR' $selectorHtml = <<<'SELECTOR'
<!-- Backup File Selector (standalone mode) --> <div id="mr-backup-selector" class="mb-3">
<div id="mr-step-select" class="mr-step" style="display:none;"> <label class="mr-field-label" style="font-weight:600;margin-bottom:8px;display:block;">Backup Archive</label>
<h2 class="mr-step-title">Select Backup File</h2> <div id="mr-backup-list"></div>
<p class="mr-desc">Choose which backup archive to restore from.</p> <input type="hidden" name="backup_file" id="mr-backup-file" value="">
<div id="mr-backup-list"></div> </div>
<input type="hidden" name="backup_file" id="mr-backup-file" value=""> <script>
</div> (function() {
<script> var backups = <?php echo json_encode(scanForBackups()); ?>;
(function() { var list = document.getElementById('mr-backup-list');
var backups = <?php echo json_encode(scanForBackups()); ?>; var hiddenInput = document.getElementById('mr-backup-file');
var list = document.getElementById('mr-backup-list');
var hiddenInput = document.getElementById('mr-backup-file');
if (backups.length === 0) { if (backups.length === 0) {
var alert = document.createElement('div'); var alert = document.createElement('div');
alert.className = 'mr-alert mr-alert-danger'; alert.style.cssText = 'padding:12px;background:#fef2f2;border:1px solid #fecaca;border-radius:6px;color:#dc2626;';
alert.textContent = 'No ZIP files found in this directory. Upload a backup archive first.'; alert.textContent = 'No ZIP files found in this directory. Upload a backup archive first.';
list.appendChild(alert); list.appendChild(alert);
} else if (backups.length === 1) { } else if (backups.length === 1) {
hiddenInput.value = backups[0].name; hiddenInput.value = backups[0].name;
var found = document.createElement('div'); var found = document.createElement('div');
found.className = 'mr-alert mr-alert-success'; found.style.cssText = 'padding:12px;background:#dcfce7;border:1px solid #bbf7d0;border-radius:6px;color:#16a34a;';
var strong = document.createElement('strong'); var strong = document.createElement('strong');
strong.textContent = backups[0].name; strong.textContent = backups[0].name;
found.appendChild(document.createTextNode('Found: ')); found.appendChild(document.createTextNode('Found: '));
found.appendChild(strong); found.appendChild(strong);
found.appendChild(document.createTextNode(' (' + (backups[0].size / 1048576).toFixed(1) + ' MB)')); found.appendChild(document.createTextNode(' (' + (backups[0].size / 1048576).toFixed(1) + ' MB)'));
list.appendChild(found); list.appendChild(found);
} else { } else {
var group = document.createElement('div'); var hint = document.createElement('div');
group.className = 'mr-field-group'; hint.style.cssText = 'padding:8px 12px;background:#eff6ff;border:1px solid #bfdbfe;border-radius:6px;color:#1d4ed8;margin-bottom:8px;font-size:0.9em;';
backups.forEach(function(b) { hint.textContent = 'Multiple backup archives found \u2014 select which one to restore:';
var label = document.createElement('label'); list.appendChild(hint);
label.style.cssText = 'display:block; padding:8px; margin:4px 0; border:1px solid #ddd; border-radius:4px; cursor:pointer;'; backups.forEach(function(b, i) {
var radio = document.createElement('input'); var label = document.createElement('label');
radio.type = 'radio'; label.style.cssText = 'display:flex;align-items:center;padding:10px 12px;margin:4px 0;border:1px solid #e2e8f0;border-radius:6px;cursor:pointer;transition:background 0.15s;';
radio.name = 'backup_choice'; label.onmouseover = function() { this.style.background = '#f8fafc'; };
radio.value = b.name; label.onmouseout = function() { this.style.background = ''; };
radio.style.marginRight = '8px'; var radio = document.createElement('input');
radio.addEventListener('change', function() { hiddenInput.value = this.value; }); radio.type = 'radio';
label.appendChild(radio); radio.name = 'backup_choice';
var nameStrong = document.createElement('strong'); radio.value = b.name;
nameStrong.textContent = b.name; radio.style.marginRight = '10px';
label.appendChild(nameStrong); if (i === 0) { radio.checked = true; hiddenInput.value = b.name; }
label.appendChild(document.createTextNode(' \u2014 ' + (b.size / 1048576).toFixed(1) + ' MB \u2014 ' + b.date)); radio.addEventListener('change', function() { hiddenInput.value = this.value; });
group.appendChild(label); label.appendChild(radio);
}); var info = document.createElement('div');
list.appendChild(group); var nameStrong = document.createElement('strong');
} nameStrong.textContent = b.name;
})(); info.appendChild(nameStrong);
</script> var meta = document.createElement('div');
meta.style.cssText = 'font-size:0.85em;color:#64748b;margin-top:2px;';
meta.textContent = (b.size / 1048576).toFixed(1) + ' MB \u2014 ' + b.date;
info.appendChild(meta);
label.appendChild(info);
list.appendChild(label);
});
}
})();
</script>
SELECTOR; SELECTOR;
/* Insert the selector before the extract step in the HTML */ /* Insert the selector into the extract panel */
$html = str_replace( $html = str_replace(
'<!-- Step: Extract -->', '<p class="mr-desc">Extract site-backup.zip into the current directory.</p>',
$selectorHtml . "\n<!-- Step: Extract -->", '<p class="mr-desc">Select a backup archive and extract it into the current directory.</p>' . "\n" . $selectorHtml,
$html
);
/* Pass selected backup file to the extract action */
$html = str_replace(
"const r = await post('extract', pw ? { archive_password: pw } : {});",
"var extraParams = {};\n" .
" if (pw) extraParams.archive_password = pw;\n" .
" var sel = document.getElementById('mr-backup-file');\n" .
" if (sel && sel.value) extraParams.backup_file = sel.value;\n" .
" const r = await post('extract', extraParams);",
$html $html
); );
@@ -435,7 +495,7 @@ function actionPreflight(): array
'label' => 'Backup Archive', 'label' => 'Backup Archive',
'value' => file_exists(BACKUP_FILE) ? number_format(filesize(BACKUP_FILE) / 1048576, 2) . ' MB' : 'Not found', 'value' => file_exists(BACKUP_FILE) ? number_format(filesize(BACKUP_FILE) / 1048576, 2) . ' MB' : 'Not found',
'ok' => file_exists(BACKUP_FILE), 'ok' => file_exists(BACKUP_FILE),
'hint' => 'site-backup.zip must be in the same directory as restore.php', 'hint' => 'site-backup.zip must be in the same directory as ' . basename($_SERVER['SCRIPT_NAME']),
]; ];
$checks[] = [ $checks[] = [
@@ -462,15 +522,31 @@ function actionPreflight(): array
'hint' => 'Informational', 'hint' => 'Informational',
]; ];
$joomlaExists = file_exists(RESTORE_DIR . '/configuration.php')
|| file_exists(RESTORE_DIR . '/libraries/src/Version.php');
$checks[] = [
'label' => 'Existing Installation',
'value' => $joomlaExists ? 'Joomla detected' : 'Clean directory',
'ok' => true,
'warn' => $joomlaExists,
'hint' => $joomlaExists
? 'WARNING: A Joomla installation already exists in this directory. Restoring will overwrite it.'
: 'No existing installation found — safe to proceed',
];
$allOk = true; $allOk = true;
$warnings = [];
foreach ($checks as $c) { foreach ($checks as $c) {
if (!$c['ok']) { if (!$c['ok']) {
$allOk = false; $allOk = false;
} }
if (!empty($c['warn'])) {
$warnings[] = $c['hint'];
}
} }
return ['success' => $allOk, 'checks' => $checks]; return ['success' => $allOk, 'checks' => $checks, 'warnings' => $warnings];
} }
function actionExtract(array $data): array function actionExtract(array $data): array
@@ -1425,6 +1501,7 @@ body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica N
.mr-checks li:last-child{border-bottom:none} .mr-checks li:last-child{border-bottom:none}
.mr-check-icon{width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:0.75rem;font-weight:700;flex-shrink:0} .mr-check-icon{width:24px;height:24px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:0.75rem;font-weight:700;flex-shrink:0}
.mr-check-ok{background:#dcfce7;color:#16a34a} .mr-check-ok{background:#dcfce7;color:#16a34a}
.mr-check-warn{background:#fef9c3;color:#a16207}
.mr-check-fail{background:#fef2f2;color:#dc2626} .mr-check-fail{background:#fef2f2;color:#dc2626}
.mr-check-info{background:#e0f2fe;color:#0284c7} .mr-check-info{background:#e0f2fe;color:#0284c7}
.mr-check-label{flex:1;font-weight:500} .mr-check-label{flex:1;font-weight:500}
@@ -1474,7 +1551,7 @@ body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica N
<div class="mr-container"> <div class="mr-container">
<div class="mr-alert mr-alert-danger"> <div class="mr-alert mr-alert-danger">
<strong>Security:</strong> Delete restore.php immediately after installation is complete. <strong>Security:</strong> Delete <code><?php echo htmlspecialchars(basename($_SERVER['SCRIPT_NAME'])); ?></code> immediately after installation is complete.
</div> </div>
<!-- Step Progress --> <!-- Step Progress -->
@@ -1722,7 +1799,7 @@ body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica N
<strong>Success!</strong> The site restoration is complete. <strong>Success!</strong> The site restoration is complete.
</div> </div>
<div class="mr-alert mr-alert-danger"> <div class="mr-alert mr-alert-danger">
<strong>Important:</strong> Delete <code>restore.php</code> and <code>site-backup.zip</code> from your server immediately for security. <strong>Important:</strong> Delete <code><?php echo htmlspecialchars(basename($_SERVER['SCRIPT_NAME'])); ?></code> and <code>site-backup.zip</code> from your server immediately for security.
</div> </div>
<div style="margin-top:1rem"> <div style="margin-top:1rem">
<button class="mr-btn mr-btn-danger" onclick="runCleanup()">Remove Restore Files</button> <button class="mr-btn mr-btn-danger" onclick="runCleanup()">Remove Restore Files</button>
@@ -1746,6 +1823,7 @@ body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica N
<script> <script>
const TOKEN = <?php echo json_encode($token); ?>; const TOKEN = <?php echo json_encode($token); ?>;
const SCRIPT_URL = <?php echo json_encode(basename($_SERVER['SCRIPT_NAME'])); ?>;
let currentStep = 1; let currentStep = 1;
let dbConfig = {}; let dbConfig = {};
@@ -1769,8 +1847,23 @@ async function post(action, extra) {
form.append(k, v); form.append(k, v);
} }
} }
const res = await fetch('restore.php', { method: 'POST', body: form }); var res;
return res.json(); try {
res = await fetch(SCRIPT_URL, { method: 'POST', body: form });
} catch (e) {
log('Network error: ' + e.message);
return { success: false, message: 'Network error: ' + e.message, checks: [] };
}
if (!res.ok) {
log('Server error: HTTP ' + res.status);
return { success: false, message: 'Server error (HTTP ' + res.status + ')', checks: [] };
}
try {
return await res.json();
} catch (e) {
log('Invalid response from server (not JSON)');
return { success: false, message: 'Invalid server response — check PHP error log', checks: [] };
}
} }
function goStep(n) { function goStep(n) {
@@ -1845,42 +1938,66 @@ async function runPreflight() {
setBtnLoading(btn, true); setBtnLoading(btn, true);
log('Running pre-flight checks...'); log('Running pre-flight checks...');
const r = await post('preflight'); try {
const list = document.getElementById('checkList'); const r = await post('preflight');
while (list.firstChild) list.removeChild(list.firstChild);
r.checks.forEach(function(c) { if (!r.success && !r.checks.length) {
const li = document.createElement('li'); log('Pre-flight error: ' + (r.message || 'Unknown error'));
const icon = document.createElement('span'); setBtnLoading(btn, false);
icon.className = 'mr-check-icon ' + (c.ok ? 'mr-check-ok' : 'mr-check-fail'); btn.textContent = 'Re-check';
icon.textContent = c.ok ? '\u2713' : '\u2717'; setStatus('checkList', r.message || 'Pre-flight check failed', 'error');
return;
}
const label = document.createElement('span'); const list = document.getElementById('checkList');
label.className = 'mr-check-label'; while (list.firstChild) list.removeChild(list.firstChild);
label.textContent = c.label;
const val = document.createElement('span'); r.checks.forEach(function(c) {
val.className = 'mr-check-value'; const li = document.createElement('li');
val.textContent = c.value; const icon = document.createElement('span');
var iconClass = c.ok ? 'mr-check-ok' : 'mr-check-fail';
if (c.warn) iconClass = 'mr-check-warn';
icon.className = 'mr-check-icon ' + iconClass;
icon.textContent = c.warn ? '\u26a0' : (c.ok ? '\u2713' : '\u2717');
li.appendChild(icon); const label = document.createElement('span');
li.appendChild(label); label.className = 'mr-check-label';
li.appendChild(val); label.textContent = c.label;
list.appendChild(li);
log(' ' + (c.ok ? 'OK' : 'FAIL') + ': ' + c.label + ' = ' + c.value); const val = document.createElement('span');
}); val.className = 'mr-check-value';
val.textContent = c.value;
setBtnLoading(btn, false); li.appendChild(icon);
li.appendChild(label);
li.appendChild(val);
if (c.warn && c.hint) {
var hint = document.createElement('div');
hint.style.cssText = 'font-size:0.85em;color:#a16207;margin-top:4px;padding:4px 8px;background:#fef9c3;border-radius:4px;';
hint.textContent = c.hint;
li.appendChild(hint);
}
list.appendChild(li);
if (r.success) { var logPrefix = c.warn ? 'WARN' : (c.ok ? 'OK' : 'FAIL');
btn.textContent = 'Next \u2192'; log(' ' + logPrefix + ': ' + c.label + ' = ' + c.value);
btn.onclick = function() { goStep(2); }; });
btn.className = 'mr-btn mr-btn-success';
log('All checks passed'); setBtnLoading(btn, false);
} else {
if (r.success) {
btn.textContent = 'Next \u2192';
btn.onclick = function() { goStep(2); };
btn.className = 'mr-btn mr-btn-success';
log('All checks passed');
} else {
btn.textContent = 'Re-check';
log('Some checks failed');
}
} catch (e) {
log('Pre-flight error: ' + e.message);
setBtnLoading(btn, false);
btn.textContent = 'Re-check'; btn.textContent = 'Re-check';
log('Some checks failed');
} }
} }
@@ -51,7 +51,32 @@ class PlaceholderResolver
public function __construct(object $profile) public function __construct(object $profile)
{ {
$now = new \DateTimeImmutable('now'); $now = new \DateTimeImmutable('now');
$hostname = preg_replace('/[^a-zA-Z0-9._-]/', '', $_SERVER['HTTP_HOST'] ?? $_SERVER['SERVER_NAME'] ?? php_uname('n'));
/* Resolve hostname: prefer HTTP_HOST (web), then try Joomla config (CLI), then system hostname */
$rawHost = $_SERVER['HTTP_HOST'] ?? $_SERVER['SERVER_NAME'] ?? '';
if (empty($rawHost) || $rawHost === 'localhost') {
try {
$app = Factory::getApplication();
$liveSite = $app->get('live_site', '');
if (!empty($liveSite)) {
$parsed = parse_url($liveSite, PHP_URL_HOST);
if (!empty($parsed)) {
$rawHost = $parsed;
}
}
} catch (\Throwable $e) {
/* fallback */
}
}
if (empty($rawHost)) {
$rawHost = php_uname('n');
}
$hostname = preg_replace('/[^a-zA-Z0-9._-]/', '', $rawHost);
$siteName = ''; $siteName = '';
@@ -70,7 +70,8 @@ class SteppedBackupEngine
$session->excludeTables = BackupDirectory::parseNewlineList($profile->exclude_tables ?? ''); $session->excludeTables = BackupDirectory::parseNewlineList($profile->exclude_tables ?? '');
$session->backupDir = $profile->backup_dir ?: BackupDirectory::PLACEHOLDER; $session->backupDir = $profile->backup_dir ?: BackupDirectory::PLACEHOLDER;
$session->remoteStorage = $profile->remote_storage ?? 'none'; $session->remoteStorage = $profile->remote_storage ?? 'none';
$session->includeMokoRestore = (bool) ($profile->include_mokorestore ?? false); $session->includeMokoRestore = $profile->include_mokorestore ?? '0';
$session->restoreScriptName = $profile->restore_script_name ?? 'restore.php';
$session->remoteKeepLocal = (bool) ($profile->remote_keep_local ?? true); $session->remoteKeepLocal = (bool) ($profile->remote_keep_local ?? true);
// Load multi-remote destinations from the remotes table // Load multi-remote destinations from the remotes table
@@ -377,15 +378,30 @@ class SteppedBackupEngine
$this->verifyArchive($session->archivePath, $session->backupType); $this->verifyArchive($session->archivePath, $session->backupType);
$session->log('Archive integrity verified'); $session->log('Archive integrity verified');
// MokoRestore wrapper // MokoRestore
if ($session->includeMokoRestore) { $mokoRestoreMode = $session->includeMokoRestore ?? '0';
$restoreScriptName = $session->restoreScriptName ?? 'restore.php';
if ($mokoRestoreMode === '1') {
$session->log('Wrapping with MokoRestore script...'); $session->log('Wrapping with MokoRestore script...');
$mokoRestorePath = $session->archivePath . '.mokorestore.zip'; $mokoRestorePath = $session->archivePath . '.mokorestore.zip';
MokoRestore::wrap($session->archivePath, $mokoRestorePath); MokoRestore::wrap($session->archivePath, $mokoRestorePath, $restoreScriptName);
@unlink($session->archivePath); @unlink($session->archivePath);
rename($mokoRestorePath, $session->archivePath); rename($mokoRestorePath, $session->archivePath);
$totalSize = filesize($session->archivePath); $totalSize = filesize($session->archivePath);
$session->log('MokoRestore archive created'); $session->log('MokoRestore archive created');
} elseif ($mokoRestoreMode === 'standalone') {
$restoreScriptName = MokoRestore::sanitizeScriptName($restoreScriptName);
$restoreDir = dirname($session->archivePath);
$session->restoreScriptPath = $restoreDir . '/' . $restoreScriptName;
try {
MokoRestore::generateStandalone($session->restoreScriptPath);
$session->log('Standalone ' . $restoreScriptName . ' generated');
} catch (\Throwable $e) {
$session->log('MokoRestore error: ' . $e->getMessage() . ' in ' . $e->getFile() . ':' . $e->getLine());
$session->log('Stack trace: ' . $e->getTraceAsString());
}
} }
// Update record // Update record
@@ -463,6 +479,10 @@ class SteppedBackupEngine
if ($result['success']) { if ($result['success']) {
$remoteFilename = $result['remote_path'] ?? $session->archiveName; $remoteFilename = $result['remote_path'] ?? $session->archiveName;
$session->log(' Upload complete: ' . $result['message']); $session->log(' Upload complete: ' . $result['message']);
if (!empty($session->restoreScriptPath) && is_file($session->restoreScriptPath)) {
$uploader->upload($session->restoreScriptPath, basename($session->restoreScriptPath));
}
} else { } else {
$uploadFailed = true; $uploadFailed = true;
$session->log(' WARNING: Upload failed: ' . $result['message']); $session->log(' WARNING: Upload failed: ' . $result['message']);
@@ -525,6 +545,12 @@ class SteppedBackupEngine
$remoteFilename = $result['remote_path'] ?? $session->archiveName; $remoteFilename = $result['remote_path'] ?? $session->archiveName;
$session->log('Remote upload complete: ' . $result['message']); $session->log('Remote upload complete: ' . $result['message']);
if (!empty($session->restoreScriptPath) && is_file($session->restoreScriptPath)) {
$restoreBasename = basename($session->restoreScriptPath);
$session->log('Uploading standalone ' . $restoreBasename . '...');
$uploader->upload($session->restoreScriptPath, $restoreBasename);
}
if (!$session->remoteKeepLocal && is_file($session->archivePath)) { if (!$session->remoteKeepLocal && is_file($session->archivePath)) {
@unlink($session->archivePath); @unlink($session->archivePath);
$session->log('Local copy removed'); $session->log('Local copy removed');
@@ -51,7 +51,9 @@ class SteppedSession
public array $excludeFiles = []; public array $excludeFiles = [];
public array $excludeTables = []; public array $excludeTables = [];
public string $remoteStorage = 'none'; public string $remoteStorage = 'none';
public bool $includeMokoRestore = false; public string $includeMokoRestore = '0';
public string $restoreScriptName = 'restore.php';
public string $restoreScriptPath = '';
public bool $remoteKeepLocal = true; public bool $remoteKeepLocal = true;
public string $encryptionPassword = ''; public string $encryptionPassword = '';
@@ -38,7 +38,30 @@ class FolderPickerField extends FormField
} }
// Build placeholder map for JS resolution // Build placeholder map for JS resolution
$hostname = preg_replace('/[^a-zA-Z0-9._-]/', '', $_SERVER['HTTP_HOST'] ?? $_SERVER['SERVER_NAME'] ?? php_uname('n')); /* Resolve hostname: prefer HTTP_HOST, then Joomla live_site config, then system hostname */
$rawHost = $_SERVER['HTTP_HOST'] ?? $_SERVER['SERVER_NAME'] ?? '';
if (empty($rawHost) || $rawHost === 'localhost') {
try {
$liveSite = Factory::getApplication()->get('live_site', '');
if (!empty($liveSite)) {
$parsed = parse_url($liveSite, PHP_URL_HOST);
if (!empty($parsed)) {
$rawHost = $parsed;
}
}
} catch (\Throwable $e) {
/* fallback */
}
}
if (empty($rawHost)) {
$rawHost = php_uname('n');
}
$hostname = preg_replace('/[^a-zA-Z0-9._-]/', '', $rawHost);
$siteName = ''; $siteName = '';
try { try {
@@ -29,7 +29,10 @@ class SshKeyField extends FormField
$id = $this->id; $id = $this->id;
$name = $this->name; $name = $this->name;
$hasKey = !empty($value) && str_contains($value, 'PRIVATE KEY'); $decoded = !empty($value) ? (base64_decode($value, true) ?: '') : '';
$hasKey = !empty($value) && ($value === '__KEEP_EXISTING__'
|| str_contains($value, 'PRIVATE KEY')
|| str_contains($decoded, 'PRIVATE KEY'));
$html = '<div id="' . htmlspecialchars($id) . '-wrapper">'; $html = '<div id="' . htmlspecialchars($id) . '-wrapper">';
@@ -294,7 +294,7 @@ class DashboardModel extends BaseDatabaseModel
->select($db->quoteName(['id', 'title', 'backup_type'])) ->select($db->quoteName(['id', 'title', 'backup_type']))
->from($db->quoteName('#__mokosuitebackup_profiles')) ->from($db->quoteName('#__mokosuitebackup_profiles'))
->where($db->quoteName('published') . ' = 1') ->where($db->quoteName('published') . ' = 1')
->order($db->quoteName('ordering') . ' ASC'); ->order($db->quoteName('id') . ' ASC');
$db->setQuery($query); $db->setQuery($query);
return $db->loadObjectList() ?: []; return $db->loadObjectList() ?: [];
@@ -25,7 +25,6 @@ class ProfilesModel extends ListModel
'title', 'a.title', 'title', 'a.title',
'backup_type', 'a.backup_type', 'backup_type', 'a.backup_type',
'published', 'a.published', 'published', 'a.published',
'ordering', 'a.ordering',
]; ];
} }
@@ -60,14 +59,14 @@ class ProfilesModel extends ListModel
$query->where('(' . $db->quoteName('a.title') . ' LIKE ' . $search . ')'); $query->where('(' . $db->quoteName('a.title') . ' LIKE ' . $search . ')');
} }
$orderCol = $this->state->get('list.ordering', 'a.ordering'); $orderCol = $this->state->get('list.ordering', 'a.id');
$orderDir = $this->state->get('list.direction', 'ASC'); $orderDir = $this->state->get('list.direction', 'ASC');
$query->order($db->escape($orderCol) . ' ' . $db->escape($orderDir)); $query->order($db->escape($orderCol) . ' ' . $db->escape($orderDir));
return $query; return $query;
} }
protected function populateState($ordering = 'a.ordering', $direction = 'ASC'): void protected function populateState($ordering = 'a.id', $direction = 'ASC'): void
{ {
parent::populateState($ordering, $direction); parent::populateState($ordering, $direction);
} }
@@ -12,8 +12,12 @@ namespace Joomla\Component\MokoSuiteBackup\Administrator\View\Backup;
defined('_JEXEC') or die; defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text; use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView; use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Toolbar\ToolbarHelper;
class HtmlView extends BaseHtmlView class HtmlView extends BaseHtmlView
@@ -34,6 +38,24 @@ class HtmlView extends BaseHtmlView
protected function addToolbar(): void protected function addToolbar(): void
{ {
ToolbarHelper::title(Text::_('COM_MOKOJOOMBACKUP_BACKUP_DETAIL'), 'database'); ToolbarHelper::title(Text::_('COM_MOKOJOOMBACKUP_BACKUP_DETAIL'), 'database');
$user = Factory::getApplication()->getIdentity();
if ($this->item->status === 'complete'
&& !empty($this->item->filesexist)
&& $user->authorise('mokosuitebackup.backup.download', 'com_mokosuitebackup')
) {
$toolbar = Toolbar::getInstance();
$downloadUrl = Route::_(
'index.php?option=com_mokosuitebackup&task=backups.download&id='
. (int) $this->item->id . '&' . Session::getFormToken() . '=1'
);
$toolbar->linkButton('download', 'COM_MOKOJOOMBACKUP_DOWNLOAD')
->url($downloadUrl)
->icon('icon-download')
->buttonClass('btn btn-success');
}
ToolbarHelper::back('JTOOLBAR_BACK', 'index.php?option=com_mokosuitebackup&view=backups'); ToolbarHelper::back('JTOOLBAR_BACK', 'index.php?option=com_mokosuitebackup&view=backups');
} }
} }
@@ -25,7 +25,6 @@ class HtmlView extends BaseHtmlView
protected $state; protected $state;
public $filterForm; public $filterForm;
public $activeFilters = []; public $activeFilters = [];
public $profiles = [];
public function display($tpl = null): void public function display($tpl = null): void
{ {
@@ -35,16 +34,6 @@ class HtmlView extends BaseHtmlView
$this->filterForm = $this->get('FilterForm'); $this->filterForm = $this->get('FilterForm');
$this->activeFilters = $this->get('ActiveFilters'); $this->activeFilters = $this->get('ActiveFilters');
// Load published profiles for the backup selector
$db = Factory::getDbo();
$query = $db->getQuery(true)
->select($db->quoteName(['id', 'title', 'backup_type']))
->from($db->quoteName('#__mokosuitebackup_profiles'))
->where($db->quoteName('published') . ' = 1')
->order($db->quoteName('ordering') . ' ASC');
$db->setQuery($query);
$this->profiles = $db->loadObjectList() ?: [];
$this->checkUpdateSite(); $this->checkUpdateSite();
$this->addToolbar(); $this->addToolbar();
@@ -112,10 +101,6 @@ class HtmlView extends BaseHtmlView
ToolbarHelper::title(Text::_('COM_MOKOJOOMBACKUP_BACKUPS_TITLE'), 'database'); ToolbarHelper::title(Text::_('COM_MOKOJOOMBACKUP_BACKUPS_TITLE'), 'database');
if ($user->authorise('mokosuitebackup.backup.run', 'com_mokosuitebackup')) {
ToolbarHelper::custom('backups.start', 'download', '', 'COM_MOKOJOOMBACKUP_TOOLBAR_BACKUP_NOW', false);
}
if ($user->authorise('mokosuitebackup.backup.restore', 'com_mokosuitebackup')) { if ($user->authorise('mokosuitebackup.backup.restore', 'com_mokosuitebackup')) {
ToolbarHelper::custom('backups.restore', 'upload', '', 'COM_MOKOJOOMBACKUP_TOOLBAR_RESTORE', true); ToolbarHelper::custom('backups.restore', 'upload', '', 'COM_MOKOJOOMBACKUP_TOOLBAR_RESTORE', true);
} }
@@ -55,16 +55,6 @@ class HtmlView extends BaseHtmlView
$toolbar = Toolbar::getInstance(); $toolbar = Toolbar::getInstance();
$profileId = (int) $this->item->id; $profileId = (int) $this->item->id;
// "Run Backup Now" button — links to backup start with CSRF token
if ($user->authorise('mokosuitebackup.backup.run', 'com_mokosuitebackup')) {
$runUrl = Route::_('index.php?option=com_mokosuitebackup&view=backups&task=backups.start&profile_id=' . $profileId . '&' . Session::getFormToken() . '=1');
$toolbar->linkButton('run-backup', 'COM_MOKOJOOMBACKUP_RUN_BACKUP_NOW')
->url($runUrl)
->icon('icon-play')
->buttonClass('btn btn-success');
}
// "View Backups" link button
$backupsUrl = Route::_('index.php?option=com_mokosuitebackup&view=backups&filter[PROFILE_ID]=' . $profileId); $backupsUrl = Route::_('index.php?option=com_mokosuitebackup&view=backups&filter[PROFILE_ID]=' . $profileId);
$toolbar->linkButton('view-backups', 'COM_MOKOJOOMBACKUP_VIEW_BACKUPS') $toolbar->linkButton('view-backups', 'COM_MOKOJOOMBACKUP_VIEW_BACKUPS')
->url($backupsUrl) ->url($backupsUrl)
@@ -31,30 +31,6 @@ $listDirn = $this->escape($this->state->get('list.direction'));
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div id="j-main-container" class="j-main-container"> <div id="j-main-container" class="j-main-container">
<!-- Profile selector for Backup Now -->
<?php $canRun = $user->authorise('mokosuitebackup.backup.run', 'com_mokosuitebackup'); ?>
<?php if (!empty($this->profiles) && $canRun) : ?>
<div class="card mb-3">
<div class="card-body d-flex align-items-center gap-3">
<label for="mb-profile-select" class="form-label mb-0 fw-bold">
<?php echo Text::_('COM_MOKOJOOMBACKUP_BACKUP_PROFILE'); ?>:
</label>
<select id="mb-profile-select" class="form-select" style="max-width:300px;">
<?php foreach ($this->profiles as $profile) : ?>
<option value="<?php echo (int) $profile->id; ?>">
<?php echo $this->escape($profile->title); ?>
(<?php echo $this->escape($profile->backup_type); ?>)
</option>
<?php endforeach; ?>
</select>
<button type="button" class="btn btn-primary" onclick="window.mokosuitebackupStart()">
<span class="icon-download" aria-hidden="true"></span>
<?php echo Text::_('COM_MOKOJOOMBACKUP_TOOLBAR_BACKUP_NOW'); ?>
</button>
</div>
</div>
<?php endif; ?>
<?php echo LayoutHelper::render('joomla.searchtools.default', ['view' => $this]); ?> <?php echo LayoutHelper::render('joomla.searchtools.default', ['view' => $this]); ?>
<?php if (empty($this->items)) : ?> <?php if (empty($this->items)) : ?>
@@ -88,9 +64,6 @@ $listDirn = $this->escape($this->state->get('list.direction'));
<th scope="col" class="w-10"> <th scope="col" class="w-10">
<?php echo HTMLHelper::_('searchtools.sort', 'COM_MOKOJOOMBACKUP_HEADING_DATE', 'a.backupstart', $listDirn, $listOrder); ?> <?php echo HTMLHelper::_('searchtools.sort', 'COM_MOKOJOOMBACKUP_HEADING_DATE', 'a.backupstart', $listDirn, $listOrder); ?>
</th> </th>
<th scope="col" class="w-5">
<?php echo Text::_('COM_MOKOJOOMBACKUP_HEADING_ACTIONS'); ?>
</th>
<th scope="col" class="w-5"> <th scope="col" class="w-5">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?> <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th> </th>
@@ -111,7 +84,9 @@ $listDirn = $this->escape($this->state->get('list.direction'));
<?php endif; ?> <?php endif; ?>
</td> </td>
<td> <td>
<?php echo $this->escape($item->profile_title ?? 'Profile #' . $item->profile_id); ?> <a href="<?php echo Route::_('index.php?option=com_mokosuitebackup&task=profile.edit&id=' . (int) $item->profile_id); ?>">
<?php echo $this->escape($item->profile_title ?? 'Profile #' . $item->profile_id); ?>
</a>
</td> </td>
<td> <td>
<?php <?php
@@ -139,35 +114,6 @@ $listDirn = $this->escape($this->state->get('list.direction'));
<td> <td>
<?php echo HTMLHelper::_('date', $item->backupstart, Text::_('DATE_FORMAT_LC4')); ?> <?php echo HTMLHelper::_('date', $item->backupstart, Text::_('DATE_FORMAT_LC4')); ?>
</td> </td>
<td class="d-flex gap-1">
<?php if ($item->status === 'complete' && $item->filesexist && $canDownload) : ?>
<?php
$isWebAccessible = !empty($item->absolute_path)
&& strpos(realpath($item->absolute_path) ?: $item->absolute_path, realpath(JPATH_ROOT) ?: JPATH_ROOT) === 0;
?>
<a href="<?php echo Route::_('index.php?option=com_mokosuitebackup&task=backups.download&id=' . $item->id . '&' . Session::getFormToken() . '=1'); ?>"
class="btn btn-sm btn-outline-primary" title="<?php echo Text::_('COM_MOKOJOOMBACKUP_DOWNLOAD'); ?>">
<span class="icon-download"></span>
</a>
<?php if ($isWebAccessible) : ?>
<span class="badge bg-warning text-dark" title="<?php echo Text::_('COM_MOKOJOOMBACKUP_WEB_ACCESSIBLE_WARNING'); ?>">
<span class="icon-warning-circle" aria-hidden="true"></span>
</span>
<?php endif; ?>
<?php endif; ?>
<?php if ($item->status === 'complete' && $item->filesexist) : ?>
<button type="button" class="btn btn-sm btn-outline-info mb-browse-archive"
data-id="<?php echo (int) $item->id; ?>"
title="<?php echo Text::_('COM_MOKOJOOMBACKUP_BROWSE_ARCHIVE'); ?>">
<span class="icon-folder-open"></span>
</button>
<?php endif; ?>
<button type="button" class="btn btn-sm btn-outline-secondary mb-view-log"
data-id="<?php echo (int) $item->id; ?>"
title="<?php echo Text::_('COM_MOKOJOOMBACKUP_VIEW_LOG'); ?>">
<span class="icon-file-alt"></span>
</button>
</td>
<td> <td>
<?php echo (int) $item->id; ?> <?php echo (int) $item->id; ?>
</td> </td>
@@ -188,18 +134,24 @@ $listDirn = $this->escape($this->state->get('list.direction'));
</form> </form>
<!-- Stepped Backup Modal (for shared hosting) --> <!-- Stepped Backup Modal (for shared hosting) -->
<div id="mokosuitebackup-modal" style="display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.6); z-index:10000;"> <div class="modal fade" id="mokosuitebackup-modal" tabindex="-1" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
<div style="max-width:500px; margin:10% auto; background:#fff; border-radius:8px; padding:2rem; box-shadow:0 4px 20px rgba(0,0,0,0.3);"> <div class="modal-dialog">
<h3 id="mb-modal-title" style="margin:0 0 1rem;">Backup in Progress</h3> <div class="modal-content">
<div class="alert alert-warning py-1 px-2 mb-2" style="font-size:0.85rem;"> <div class="modal-header">
<span class="icon-warning-circle" aria-hidden="true"></span> <h5 class="modal-title" id="mb-modal-title">Backup in Progress</h5>
<strong>Do not navigate away or close this window</strong> while the backup is running. </div>
<div class="modal-body">
<div class="alert alert-warning py-1 px-2 mb-2" style="font-size:0.85rem;">
<span class="icon-warning-circle" aria-hidden="true"></span>
<strong>Do not navigate away or close this window</strong> while the backup is running.
</div>
<div class="progress mb-2" style="height:24px;">
<div id="mb-progress-bar" class="progress-bar" role="progressbar" style="width:0%;">0%</div>
</div>
<p id="mb-status" class="text-muted mb-1" style="font-size:0.9rem;">Initializing...</p>
<p id="mb-phase" class="text-muted mb-0" style="font-size:0.8rem;">Phase: init</p>
</div>
</div> </div>
<div style="background:#e9ecef; border-radius:4px; overflow:hidden; height:24px; margin-bottom:0.5rem;">
<div id="mb-progress-bar" style="height:100%; background:#0d6efd; transition:width 0.3s; width:0%; display:flex; align-items:center; justify-content:center; color:#fff; font-size:0.8rem; font-weight:bold;">0%</div>
</div>
<p id="mb-status" style="color:#666; font-size:0.9rem; margin:0.5rem 0;">Initializing...</p>
<p id="mb-phase" style="color:#999; font-size:0.8rem; margin:0;">Phase: init</p>
</div> </div>
</div> </div>
@@ -208,19 +160,6 @@ $listDirn = $this->escape($this->state->get('list.direction'));
const AJAX_URL = <?php echo json_encode($ajaxUrl); ?>; const AJAX_URL = <?php echo json_encode($ajaxUrl); ?>;
const TOKEN_NAME = <?php echo json_encode($ajaxToken); ?>; const TOKEN_NAME = <?php echo json_encode($ajaxToken); ?>;
// Override the toolbar "Backup Now" button to use stepped backup
document.addEventListener('DOMContentLoaded', function() {
// Find the backup toolbar button and override it
const toolbarBtn = document.querySelector('[onclick*="backups.start"], .button-download');
if (toolbarBtn) {
toolbarBtn.addEventListener('click', function(e) {
e.preventDefault();
e.stopPropagation();
startSteppedBackup();
return false;
}, true);
}
});
var backupRunning = false; var backupRunning = false;
@@ -235,12 +174,12 @@ $listDirn = $this->escape($this->state->get('list.direction'));
function showModal() { function showModal() {
backupRunning = true; backupRunning = true;
document.getElementById('mokosuitebackup-modal').style.display = 'block'; bootstrap.Modal.getOrCreateInstance(document.getElementById('mokosuitebackup-modal')).show();
} }
function hideModal() { function hideModal() {
backupRunning = false; backupRunning = false;
document.getElementById('mokosuitebackup-modal').style.display = 'none'; bootstrap.Modal.getInstance(document.getElementById('mokosuitebackup-modal'))?.hide();
} }
function updateProgress(progress, message, phase) { function updateProgress(progress, message, phase) {
@@ -344,31 +283,26 @@ $listDirn = $this->escape($this->state->get('list.direction'));
return false; return false;
} }
document.getElementById('mb-restore-record-id').value = checked[0].value; document.getElementById('mb-restore-record-id').value = checked[0].value;
document.getElementById('mb-restore-modal').style.display = 'block'; bootstrap.Modal.getOrCreateInstance(document.getElementById('mb-restore-modal')).show();
return false; return false;
}, true); }, true);
} }
}); });
// Close restore modal // Close restore modal handled by Bootstrap data-bs-dismiss
document.addEventListener('click', function(e) {
if (e.target.classList.contains('mb-restore-close') || e.target.id === 'mb-restore-modal') {
document.getElementById('mb-restore-modal').style.display = 'none';
}
});
// AJAX stepped restore // AJAX stepped restore
var restoreRunning = false; var restoreRunning = false;
function showRestoreProgress() { function showRestoreProgress() {
restoreRunning = true; restoreRunning = true;
document.getElementById('mb-restore-modal').style.display = 'none'; bootstrap.Modal.getInstance(document.getElementById('mb-restore-modal'))?.hide();
document.getElementById('mb-restore-progress-modal').style.display = 'block'; bootstrap.Modal.getOrCreateInstance(document.getElementById('mb-restore-progress-modal')).show();
} }
function hideRestoreProgress() { function hideRestoreProgress() {
restoreRunning = false; restoreRunning = false;
document.getElementById('mb-restore-progress-modal').style.display = 'none'; bootstrap.Modal.getInstance(document.getElementById('mb-restore-progress-modal'))?.hide();
} }
function updateRestoreProgress(progress, message, phase) { function updateRestoreProgress(progress, message, phase) {
@@ -457,310 +391,154 @@ $listDirn = $this->escape($this->state->get('list.direction'));
} }
}); });
// View Log modal handler
document.addEventListener('click', function(e) {
var btn = e.target.closest('.mb-view-log');
if (!btn) return;
e.preventDefault();
var recordId = btn.getAttribute('data-id');
var modal = document.getElementById('mb-log-modal');
var body = document.getElementById('mb-log-body');
body.textContent = 'Loading...';
modal.style.display = 'block';
var form = new URLSearchParams();
form.append('task', 'ajax.viewLog');
form.append('id', recordId);
form.append(TOKEN_NAME, '1');
fetch(AJAX_URL, {
method: 'POST',
body: form,
headers: { 'X-Requested-With': 'XMLHttpRequest' }
})
.then(function(r) { return r.json(); })
.then(function(data) {
if (data.error) {
body.textContent = data.message || 'Error loading log';
} else {
body.textContent = data.log;
}
})
.catch(function(err) {
body.textContent = 'Error: ' + err.message;
});
});
document.addEventListener('click', function(e) {
if (e.target.id === 'mb-log-modal' || e.target.classList.contains('mb-log-close')) {
document.getElementById('mb-log-modal').style.display = 'none';
}
});
// Browse Archive modal handler
function formatFileSize(bytes) {
if (bytes === 0) return '0 B';
var units = ['B', 'KB', 'MB', 'GB'];
var i = Math.floor(Math.log(bytes) / Math.log(1024));
if (i >= units.length) i = units.length - 1;
return (bytes / Math.pow(1024, i)).toFixed(i === 0 ? 0 : 1) + ' ' + units[i];
}
function browseSetMessage(tbody, message, cssClass) {
tbody.textContent = '';
var tr = document.createElement('tr');
var td = document.createElement('td');
td.setAttribute('colspan', '3');
td.className = cssClass || 'text-center';
td.textContent = message;
tr.appendChild(td);
tbody.appendChild(tr);
}
function browseAddFileRow(tbody, file) {
var tr = document.createElement('tr');
var tdName = document.createElement('td');
tdName.style.wordBreak = 'break-all';
tdName.style.fontSize = '0.85rem';
var code = document.createElement('code');
code.textContent = file.name;
tdName.appendChild(code);
tr.appendChild(tdName);
var tdSize = document.createElement('td');
tdSize.className = 'text-end text-nowrap';
tdSize.textContent = formatFileSize(file.size);
tr.appendChild(tdSize);
var tdComp = document.createElement('td');
tdComp.className = 'text-end text-nowrap';
tdComp.textContent = formatFileSize(file.compressed_size);
tr.appendChild(tdComp);
tbody.appendChild(tr);
}
document.addEventListener('click', function(e) {
var btn = e.target.closest('.mb-browse-archive');
if (!btn) return;
e.preventDefault();
var recordId = btn.getAttribute('data-id');
var modal = document.getElementById('mb-browse-modal');
var tbody = document.getElementById('mb-browse-tbody');
var summary = document.getElementById('mb-browse-summary');
browseSetMessage(tbody, 'Loading...');
summary.textContent = '';
modal.style.display = 'block';
postAjax({ task: 'ajax.browseArchive', id: recordId })
.then(function(data) {
if (data.error) {
browseSetMessage(tbody, data.message || 'Error', 'text-danger');
return;
}
tbody.textContent = '';
if (data.files.length === 0) {
browseSetMessage(tbody, 'Archive is empty', 'text-center text-muted');
} else {
for (var i = 0; i < data.files.length; i++) {
browseAddFileRow(tbody, data.files[i]);
}
}
var text = data.total_files + ' files, ' + formatFileSize(data.total_size) + ' uncompressed';
if (data.truncated) {
text += ' (showing first ' + data.files.length + ')';
}
summary.textContent = text;
})
.catch(function(err) {
browseSetMessage(tbody, 'Error: ' + err.message, 'text-danger');
});
});
document.addEventListener('click', function(e) {
if (e.target.id === 'mb-browse-modal' || e.target.classList.contains('mb-browse-close')) {
document.getElementById('mb-browse-modal').style.display = 'none';
}
});
})(); })();
</script> </script>
<!-- Restore Confirmation Modal --> <!-- Restore Confirmation Modal -->
<div id="mb-restore-modal" style="display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.6); z-index:10000;"> <div class="modal fade" id="mb-restore-modal" tabindex="-1" aria-hidden="true">
<div style="max-width:500px; margin:8% auto; background:#fff; border-radius:8px; box-shadow:0 4px 20px rgba(0,0,0,0.3);"> <div class="modal-dialog">
<div style="display:flex; justify-content:space-between; align-items:center; padding:1rem 1.5rem; border-bottom:1px solid #dee2e6;"> <div class="modal-content">
<h4 style="margin:0;"><?php echo Text::_('COM_MOKOJOOMBACKUP_TOOLBAR_RESTORE'); ?></h4> <div class="modal-header">
<button type="button" class="btn-close mb-restore-close" aria-label="Close"></button> <h5 class="modal-title"><?php echo Text::_('COM_MOKOJOOMBACKUP_TOOLBAR_RESTORE'); ?></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<form action="<?php echo Route::_('index.php?option=com_mokosuitebackup&task=backups.restore'); ?>" method="post" id="mb-restore-form">
<input type="hidden" name="id" id="mb-restore-record-id" value="">
<div class="modal-body">
<div class="alert alert-danger">
<span class="icon-warning-circle" aria-hidden="true"></span>
<strong><?php echo Text::_('COM_MOKOJOOMBACKUP_RESTORE_CONFIRM'); ?></strong>
</div>
<div class="mb-3">
<div class="form-check">
<input class="form-check-input" type="checkbox" name="restore_files" value="1" id="mb-restore-files" checked>
<label class="form-check-label" for="mb-restore-files">
<?php echo Text::_('COM_MOKOJOOMBACKUP_RESTORE_FILES'); ?>
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" name="restore_db" value="1" id="mb-restore-db" checked>
<label class="form-check-label" for="mb-restore-db">
<?php echo Text::_('COM_MOKOJOOMBACKUP_RESTORE_DATABASE'); ?>
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" name="preserve_config" value="1" id="mb-restore-config" checked>
<label class="form-check-label" for="mb-restore-config">
<?php echo Text::_('COM_MOKOJOOMBACKUP_RESTORE_PRESERVE_CONFIG'); ?>
<small class="text-muted d-block"><?php echo Text::_('COM_MOKOJOOMBACKUP_RESTORE_PRESERVE_CONFIG_DESC'); ?></small>
</label>
</div>
</div>
<div class="mb-3">
<label for="mb-restore-password" class="form-label"><?php echo Text::_('COM_MOKOJOOMBACKUP_FIELD_ENCRYPTION_PASSWORD'); ?></label>
<input type="password" class="form-control" id="mb-restore-password" name="encryption_password"
placeholder="<?php echo Text::_('COM_MOKOJOOMBACKUP_RESTORE_PASSWORD_PLACEHOLDER'); ?>" autocomplete="off">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><?php echo Text::_('JCANCEL'); ?></button>
<button type="submit" class="btn btn-danger">
<span class="icon-upload" aria-hidden="true"></span>
<?php echo Text::_('COM_MOKOJOOMBACKUP_TOOLBAR_RESTORE'); ?>
</button>
</div>
<?php echo HTMLHelper::_('form.token'); ?>
</form>
</div> </div>
<form action="<?php echo Route::_('index.php?option=com_mokosuitebackup&task=backups.restore'); ?>" method="post" id="mb-restore-form">
<input type="hidden" name="id" id="mb-restore-record-id" value="">
<div style="padding:1.5rem;">
<div class="alert alert-danger">
<span class="icon-warning-circle" aria-hidden="true"></span>
<strong><?php echo Text::_('COM_MOKOJOOMBACKUP_RESTORE_CONFIRM'); ?></strong>
</div>
<div class="mb-3">
<div class="form-check">
<input class="form-check-input" type="checkbox" name="restore_files" value="1" id="mb-restore-files" checked>
<label class="form-check-label" for="mb-restore-files">
<?php echo Text::_('COM_MOKOJOOMBACKUP_RESTORE_FILES'); ?>
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" name="restore_db" value="1" id="mb-restore-db" checked>
<label class="form-check-label" for="mb-restore-db">
<?php echo Text::_('COM_MOKOJOOMBACKUP_RESTORE_DATABASE'); ?>
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" name="preserve_config" value="1" id="mb-restore-config" checked>
<label class="form-check-label" for="mb-restore-config">
<?php echo Text::_('COM_MOKOJOOMBACKUP_RESTORE_PRESERVE_CONFIG'); ?>
<small class="text-muted d-block"><?php echo Text::_('COM_MOKOJOOMBACKUP_RESTORE_PRESERVE_CONFIG_DESC'); ?></small>
</label>
</div>
</div>
<div class="mb-3">
<label for="mb-restore-password" class="form-label"><?php echo Text::_('COM_MOKOJOOMBACKUP_FIELD_ENCRYPTION_PASSWORD'); ?></label>
<input type="password" class="form-control" id="mb-restore-password" name="encryption_password"
placeholder="<?php echo Text::_('COM_MOKOJOOMBACKUP_RESTORE_PASSWORD_PLACEHOLDER'); ?>" autocomplete="off">
</div>
</div>
<div style="padding:0 1.5rem 1.5rem; text-align:right;">
<button type="button" class="btn btn-secondary mb-restore-close"><?php echo Text::_('JCANCEL'); ?></button>
<button type="submit" class="btn btn-danger">
<span class="icon-upload" aria-hidden="true"></span>
<?php echo Text::_('COM_MOKOJOOMBACKUP_TOOLBAR_RESTORE'); ?>
</button>
</div>
<?php echo HTMLHelper::_('form.token'); ?>
</form>
</div>
</div> </div>
<!-- Restore Progress Modal --> <!-- Restore Progress Modal -->
<div id="mb-restore-progress-modal" style="display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.6); z-index:10000;"> <div class="modal fade" id="mb-restore-progress-modal" tabindex="-1" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
<div style="max-width:500px; margin:10% auto; background:#fff; border-radius:8px; padding:2rem; box-shadow:0 4px 20px rgba(0,0,0,0.3);"> <div class="modal-dialog">
<h3 id="mb-restore-title" style="margin:0 0 1rem;">Restore in Progress</h3> <div class="modal-content">
<div style="background:#e9ecef; border-radius:4px; overflow:hidden; height:24px; margin-bottom:0.5rem;"> <div class="modal-header">
<div id="mb-restore-progress-bar" style="height:100%; background:#dc3545; transition:width 0.3s; width:0%; display:flex; align-items:center; justify-content:center; color:#fff; font-size:0.8rem; font-weight:bold;">0%</div> <h5 class="modal-title" id="mb-restore-title">Restore in Progress</h5>
</div> </div>
<p id="mb-restore-status" style="color:#666; font-size:0.9rem; margin:0.5rem 0;">Initializing...</p> <div class="modal-body">
<p id="mb-restore-phase" style="color:#999; font-size:0.8rem; margin:0;">Phase: init</p> <div class="progress mb-2" style="height:24px;">
</div> <div id="mb-restore-progress-bar" class="progress-bar bg-danger" role="progressbar" style="width:0%;">0%</div>
</div> </div>
<p id="mb-restore-status" class="text-muted mb-1" style="font-size:0.9rem;">Initializing...</p>
<!-- Log Viewer Modal --> <p id="mb-restore-phase" class="text-muted mb-0" style="font-size:0.8rem;">Phase: init</p>
<div id="mb-log-modal" style="display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.6); z-index:10000;"> </div>
<div style="max-width:700px; margin:5% auto; background:#fff; border-radius:8px; box-shadow:0 4px 20px rgba(0,0,0,0.3); display:flex; flex-direction:column; max-height:80vh;">
<div style="display:flex; justify-content:space-between; align-items:center; padding:1rem 1.5rem; border-bottom:1px solid #dee2e6;">
<h4 style="margin:0;"><?php echo Text::_('COM_MOKOJOOMBACKUP_VIEW_LOG'); ?></h4>
<button type="button" class="btn-close mb-log-close" aria-label="Close"></button>
</div>
<div style="padding:1rem 1.5rem; overflow-y:auto; flex:1;">
<pre id="mb-log-body" style="white-space:pre-wrap; word-break:break-word; font-size:0.85rem; margin:0; background:#f8f9fa; padding:1rem; border-radius:4px;"></pre>
</div> </div>
</div> </div>
</div> </div>
<!-- Archive Browser Modal -->
<div id="mb-browse-modal" style="display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.6); z-index:10000;">
<div style="max-width:800px; margin:5% auto; background:#fff; border-radius:8px; box-shadow:0 4px 20px rgba(0,0,0,0.3); display:flex; flex-direction:column; max-height:80vh;">
<div style="display:flex; justify-content:space-between; align-items:center; padding:1rem 1.5rem; border-bottom:1px solid #dee2e6;">
<h4 style="margin:0;">
<span class="icon-folder-open" aria-hidden="true"></span>
<?php echo Text::_('COM_MOKOJOOMBACKUP_BROWSE_ARCHIVE'); ?>
</h4>
<button type="button" class="btn-close mb-browse-close" aria-label="Close"></button>
</div>
<div style="padding:0.75rem 1.5rem; border-bottom:1px solid #dee2e6; background:#f8f9fa;">
<small id="mb-browse-summary" class="text-muted"></small>
</div>
<div style="padding:0; overflow-y:auto; flex:1;">
<table class="table table-sm table-striped mb-0">
<thead>
<tr>
<th><?php echo Text::_('COM_MOKOJOOMBACKUP_BROWSE_COL_NAME'); ?></th>
<th class="text-end" style="width:100px;"><?php echo Text::_('COM_MOKOJOOMBACKUP_BROWSE_COL_SIZE'); ?></th>
<th class="text-end" style="width:120px;"><?php echo Text::_('COM_MOKOJOOMBACKUP_BROWSE_COL_COMPRESSED'); ?></th>
</tr>
</thead>
<tbody id="mb-browse-tbody">
</tbody>
</table>
</div>
</div>
</div>
<!-- Purge Backups Modal --> <!-- Purge Backups Modal -->
<?php $canDelete = $user->authorise('core.delete', 'com_mokosuitebackup'); ?> <?php $canDelete = $user->authorise('core.delete', 'com_mokosuitebackup'); ?>
<?php if ($canDelete) : ?> <?php if ($canDelete) : ?>
<div id="mb-purge-modal" style="display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.6); z-index:10000;"> <div class="modal fade" id="mb-purge-modal" tabindex="-1" aria-hidden="true">
<div style="max-width:500px; margin:8% auto; background:#fff; border-radius:8px; box-shadow:0 4px 20px rgba(0,0,0,0.3);"> <div class="modal-dialog">
<div style="display:flex; justify-content:space-between; align-items:center; padding:1rem 1.5rem; border-bottom:1px solid #dee2e6;"> <div class="modal-content">
<h4 style="margin:0;"> <div class="modal-header">
<span class="icon-trash" aria-hidden="true"></span> <h5 class="modal-title">
<?php echo Text::_('COM_MOKOJOOMBACKUP_PURGE_TITLE'); ?>
</h4>
<button type="button" class="btn-close mb-purge-close" aria-label="Close"></button>
</div>
<form action="<?php echo Route::_('index.php?option=com_mokosuitebackup&task=backups.purge'); ?>" method="post" id="mb-purge-form">
<div style="padding:1.5rem;">
<p><?php echo Text::_('COM_MOKOJOOMBACKUP_PURGE_DESC'); ?></p>
<div class="mb-3">
<label for="mb-purge-date" class="form-label fw-bold"><?php echo Text::_('COM_MOKOJOOMBACKUP_PURGE_DATE_LABEL'); ?></label>
<input type="date" class="form-control" id="mb-purge-date" name="purge_date" required>
</div>
<div id="mb-purge-count-wrapper" style="display:none;">
<div class="alert alert-danger mb-0" id="mb-purge-count-msg"></div>
</div>
<div id="mb-purge-none-wrapper" style="display:none;">
<div class="alert alert-info mb-0"><?php echo Text::_('COM_MOKOJOOMBACKUP_PURGE_NONE_FOUND'); ?></div>
</div>
</div>
<div style="padding:0 1.5rem 1.5rem; text-align:right;">
<button type="button" class="btn btn-secondary mb-purge-close"><?php echo Text::_('JCANCEL'); ?></button>
<button type="submit" class="btn btn-danger" id="mb-purge-submit" disabled>
<span class="icon-trash" aria-hidden="true"></span> <span class="icon-trash" aria-hidden="true"></span>
<?php echo Text::_('COM_MOKOJOOMBACKUP_PURGE_SUBMIT'); ?> <?php echo Text::_('COM_MOKOJOOMBACKUP_PURGE_TITLE'); ?>
</button> </h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div> </div>
<?php echo HTMLHelper::_('form.token'); ?> <form action="<?php echo Route::_('index.php?option=com_mokosuitebackup&task=backups.purge'); ?>" method="post" id="mb-purge-form">
</form> <div class="modal-body">
<p><?php echo Text::_('COM_MOKOJOOMBACKUP_PURGE_DESC'); ?></p>
<div class="mb-3">
<label for="mb-purge-date" class="form-label fw-bold"><?php echo Text::_('COM_MOKOJOOMBACKUP_PURGE_DATE_LABEL'); ?></label>
<input type="date" class="form-control" id="mb-purge-date" name="purge_date" required>
</div>
<div id="mb-purge-count-wrapper" style="display:none;">
<div class="alert alert-danger mb-0" id="mb-purge-count-msg"></div>
</div>
<div id="mb-purge-none-wrapper" style="display:none;">
<div class="alert alert-info mb-0"><?php echo Text::_('COM_MOKOJOOMBACKUP_PURGE_NONE_FOUND'); ?></div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><?php echo Text::_('JCANCEL'); ?></button>
<button type="submit" class="btn btn-danger" id="mb-purge-submit" disabled>
<span class="icon-trash" aria-hidden="true"></span>
<?php echo Text::_('COM_MOKOJOOMBACKUP_PURGE_SUBMIT'); ?>
</button>
</div>
<?php echo HTMLHelper::_('form.token'); ?>
</form>
</div>
</div> </div>
</div> </div>
<?php endif; ?> <?php endif; ?>
<!-- Backup Comparison Modal --> <!-- Backup Comparison Modal -->
<div id="mb-compare-modal" style="display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.6); z-index:10000;"> <div class="modal fade" id="mb-compare-modal" tabindex="-1" aria-hidden="true">
<div style="max-width:800px; margin:5% auto; background:#fff; border-radius:8px; box-shadow:0 4px 20px rgba(0,0,0,0.3); display:flex; flex-direction:column; max-height:85vh;"> <div class="modal-dialog modal-lg">
<div style="display:flex; justify-content:space-between; align-items:center; padding:1rem 1.5rem; border-bottom:1px solid #dee2e6;"> <div class="modal-content">
<h4 style="margin:0;"> <div class="modal-header">
<span class="icon-copy" aria-hidden="true"></span> <h5 class="modal-title">
<?php echo Text::_('COM_MOKOJOOMBACKUP_COMPARE_TITLE'); ?> <span class="icon-copy" aria-hidden="true"></span>
</h4> <?php echo Text::_('COM_MOKOJOOMBACKUP_COMPARE_TITLE'); ?>
<button type="button" class="btn-close mb-compare-close" aria-label="Close"></button> </h5>
</div> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
<div style="padding:1rem 1.5rem; overflow-y:auto; flex:1;"> </div>
<div id="mb-compare-loading" style="text-align:center; padding:2rem;"> <div class="modal-body" style="max-height:65vh; overflow-y:auto;">
<span class="icon-spinner icon-spin" aria-hidden="true"></span> <div id="mb-compare-loading" class="text-center py-4">
<?php echo Text::_('COM_MOKOJOOMBACKUP_COMPARE_LOADING'); ?> <span class="icon-spinner icon-spin" aria-hidden="true"></span>
<?php echo Text::_('COM_MOKOJOOMBACKUP_COMPARE_LOADING'); ?>
</div>
<div id="mb-compare-error" style="display:none;" class="alert alert-danger"></div>
<table id="mb-compare-table" class="table table-striped" style="display:none;">
<thead>
<tr>
<th><?php echo Text::_('COM_MOKOJOOMBACKUP_COMPARE_FIELD'); ?></th>
<th><?php echo Text::_('COM_MOKOJOOMBACKUP_COMPARE_BACKUP'); ?> 1</th>
<th><?php echo Text::_('COM_MOKOJOOMBACKUP_COMPARE_BACKUP'); ?> 2</th>
<th><?php echo Text::_('COM_MOKOJOOMBACKUP_COMPARE_DELTA'); ?></th>
</tr>
</thead>
<tbody id="mb-compare-body"></tbody>
</table>
</div> </div>
<div id="mb-compare-error" style="display:none;" class="alert alert-danger"></div>
<table id="mb-compare-table" class="table table-striped" style="display:none;">
<thead>
<tr>
<th><?php echo Text::_('COM_MOKOJOOMBACKUP_COMPARE_FIELD'); ?></th>
<th><?php echo Text::_('COM_MOKOJOOMBACKUP_COMPARE_BACKUP'); ?> 1</th>
<th><?php echo Text::_('COM_MOKOJOOMBACKUP_COMPARE_BACKUP'); ?> 2</th>
<th><?php echo Text::_('COM_MOKOJOOMBACKUP_COMPARE_DELTA'); ?></th>
</tr>
</thead>
<tbody id="mb-compare-body"></tbody>
</table>
</div> </div>
</div> </div>
</div> </div>
@@ -807,7 +585,7 @@ $listDirn = $this->escape($this->state->get('list.direction'));
var table = document.getElementById('mb-compare-table'); var table = document.getElementById('mb-compare-table');
var body = document.getElementById('mb-compare-body'); var body = document.getElementById('mb-compare-body');
modal.style.display = 'block'; bootstrap.Modal.getOrCreateInstance(modal).show();
loading.style.display = 'block'; loading.style.display = 'block';
errorEl.style.display = 'none'; errorEl.style.display = 'none';
table.style.display = 'none'; table.style.display = 'none';
@@ -874,12 +652,7 @@ $listDirn = $this->escape($this->state->get('list.direction'));
}); });
} }
// Close compare modal // Compare modal close handled by Bootstrap data-bs-dismiss
document.addEventListener('click', function(e) {
if (e.target.id === 'mb-compare-modal' || e.target.classList.contains('mb-compare-close')) {
document.getElementById('mb-compare-modal').style.display = 'none';
}
});
// Intercept Compare toolbar button // Intercept Compare toolbar button
document.addEventListener('DOMContentLoaded', function() { document.addEventListener('DOMContentLoaded', function() {
@@ -922,7 +695,7 @@ $listDirn = $this->escape($this->state->get('list.direction'));
document.getElementById('mb-purge-count-wrapper').style.display = 'none'; document.getElementById('mb-purge-count-wrapper').style.display = 'none';
document.getElementById('mb-purge-none-wrapper').style.display = 'none'; document.getElementById('mb-purge-none-wrapper').style.display = 'none';
document.getElementById('mb-purge-submit').disabled = true; document.getElementById('mb-purge-submit').disabled = true;
document.getElementById('mb-purge-modal').style.display = 'block'; bootstrap.Modal.getOrCreateInstance(document.getElementById('mb-purge-modal')).show();
return false; return false;
}, true); }, true);
} }
@@ -936,12 +709,7 @@ $listDirn = $this->escape($this->state->get('list.direction'));
}); });
} }
// Close modal // Purge modal close handled by Bootstrap data-bs-dismiss
document.addEventListener('click', function(e) {
if (e.target.id === 'mb-purge-modal' || e.target.classList.contains('mb-purge-close')) {
document.getElementById('mb-purge-modal').style.display = 'none';
}
});
// Confirm on submit // Confirm on submit
var purgeForm = document.getElementById('mb-purge-form'); var purgeForm = document.getElementById('mb-purge-form');
@@ -238,6 +238,7 @@ document.querySelectorAll('.mb-tile').forEach(function(tile) {
<select id="mb-profile-select" class="form-select mb-2"> <select id="mb-profile-select" class="form-select mb-2">
<?php foreach ($this->profiles as $profile) : ?> <?php foreach ($this->profiles as $profile) : ?>
<option value="<?php echo (int) $profile->id; ?>"> <option value="<?php echo (int) $profile->id; ?>">
#<?php echo (int) $profile->id; ?> —
<?php echo $this->escape($profile->title); ?> <?php echo $this->escape($profile->title); ?>
(<?php echo $this->escape($profile->backup_type); ?>) (<?php echo $this->escape($profile->backup_type); ?>)
</option> </option>
@@ -52,9 +52,6 @@ $listDirn = $this->escape($this->state->get('list.direction'));
<th scope="col" class="w-10"> <th scope="col" class="w-10">
<?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'a.published', $listDirn, $listOrder); ?> <?php echo HTMLHelper::_('searchtools.sort', 'JSTATUS', 'a.published', $listDirn, $listOrder); ?>
</th> </th>
<th scope="col" class="w-10 text-center">
<?php echo Text::_('COM_MOKOJOOMBACKUP_HEADING_ACTIONS'); ?>
</th>
<th scope="col" class="w-5"> <th scope="col" class="w-5">
<?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?> <?php echo HTMLHelper::_('searchtools.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?>
</th> </th>
@@ -87,16 +84,6 @@ $listDirn = $this->escape($this->state->get('list.direction'));
<td> <td>
<?php echo HTMLHelper::_('jgrid.published', $item->published, $i, 'profiles.'); ?> <?php echo HTMLHelper::_('jgrid.published', $item->published, $i, 'profiles.'); ?>
</td> </td>
<td class="text-center">
<?php if ($item->published == 1) : ?>
<a href="<?php echo Route::_('index.php?option=com_mokosuitebackup&view=backups&task=backups.start&profile_id=' . $item->id . '&' . Session::getFormToken() . '=1'); ?>"
class="btn btn-sm btn-outline-success"
title="<?php echo Text::_('COM_MOKOJOOMBACKUP_RUN_BACKUP'); ?>">
<span class="icon-play" aria-hidden="true"></span>
<?php echo Text::_('COM_MOKOJOOMBACKUP_RUN_BACKUP'); ?>
</a>
<?php endif; ?>
</td>
<td> <td>
<?php echo (int) $item->id; ?> <?php echo (int) $item->id; ?>
</td> </td>
@@ -132,117 +132,121 @@ $listDirn = $this->escape($this->state->get('list.direction'));
</form> </form>
<!-- Create Snapshot Modal --> <!-- Create Snapshot Modal -->
<div id="mb-snapshot-create-modal" style="display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.6); z-index:10000;"> <div class="modal fade" id="mb-snapshot-create-modal" tabindex="-1" aria-hidden="true">
<div style="max-width:500px; margin:8% auto; background:#fff; border-radius:8px; box-shadow:0 4px 20px rgba(0,0,0,0.3);"> <div class="modal-dialog">
<div style="display:flex; justify-content:space-between; align-items:center; padding:1rem 1.5rem; border-bottom:1px solid #dee2e6;"> <div class="modal-content">
<h4 style="margin:0;"><?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_CREATE'); ?></h4> <div class="modal-header">
<button type="button" class="btn-close mb-modal-close" aria-label="Close"></button> <h5 class="modal-title"><?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_CREATE'); ?></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<form action="<?php echo Route::_('index.php?option=com_mokosuitebackup&task=snapshots.create'); ?>" method="post" id="mb-snapshot-create-form">
<div class="modal-body">
<div class="mb-3">
<label for="mb-snap-desc" class="form-label fw-bold"><?php echo Text::_('COM_MOKOJOOMBACKUP_HEADING_DESCRIPTION'); ?></label>
<input type="text" class="form-control" id="mb-snap-desc" name="description" placeholder="<?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_DESC_PLACEHOLDER'); ?>">
</div>
<div class="mb-3">
<label class="form-label fw-bold"><?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_SELECT_TYPES'); ?></label>
<div class="form-check">
<input class="form-check-input" type="checkbox" name="content_types[]" value="articles" id="mb-snap-articles" checked>
<label class="form-check-label" for="mb-snap-articles">
<?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_ARTICLES'); ?>
<small class="text-muted">(<?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_ARTICLES_DESC'); ?>)</small>
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" name="content_types[]" value="categories" id="mb-snap-categories" checked>
<label class="form-check-label" for="mb-snap-categories">
<?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_CATEGORIES'); ?>
<small class="text-muted">(<?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_CATEGORIES_DESC'); ?>)</small>
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" name="content_types[]" value="modules" id="mb-snap-modules" checked>
<label class="form-check-label" for="mb-snap-modules">
<?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_MODULES'); ?>
<small class="text-muted">(<?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_MODULES_DESC'); ?>)</small>
</label>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><?php echo Text::_('JCANCEL'); ?></button>
<button type="submit" class="btn btn-primary">
<span class="icon-camera" aria-hidden="true"></span>
<?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_CREATE'); ?>
</button>
</div>
<?php echo HTMLHelper::_('form.token'); ?>
</form>
</div> </div>
<form action="<?php echo Route::_('index.php?option=com_mokosuitebackup&task=snapshots.create'); ?>" method="post" id="mb-snapshot-create-form">
<div style="padding:1.5rem;">
<div class="mb-3">
<label for="mb-snap-desc" class="form-label fw-bold"><?php echo Text::_('COM_MOKOJOOMBACKUP_HEADING_DESCRIPTION'); ?></label>
<input type="text" class="form-control" id="mb-snap-desc" name="description" placeholder="<?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_DESC_PLACEHOLDER'); ?>">
</div>
<div class="mb-3">
<label class="form-label fw-bold"><?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_SELECT_TYPES'); ?></label>
<div class="form-check">
<input class="form-check-input" type="checkbox" name="content_types[]" value="articles" id="mb-snap-articles" checked>
<label class="form-check-label" for="mb-snap-articles">
<?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_ARTICLES'); ?>
<small class="text-muted">(<?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_ARTICLES_DESC'); ?>)</small>
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" name="content_types[]" value="categories" id="mb-snap-categories" checked>
<label class="form-check-label" for="mb-snap-categories">
<?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_CATEGORIES'); ?>
<small class="text-muted">(<?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_CATEGORIES_DESC'); ?>)</small>
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" name="content_types[]" value="modules" id="mb-snap-modules" checked>
<label class="form-check-label" for="mb-snap-modules">
<?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_MODULES'); ?>
<small class="text-muted">(<?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_MODULES_DESC'); ?>)</small>
</label>
</div>
</div>
</div>
<div style="padding:0 1.5rem 1.5rem; text-align:right;">
<button type="button" class="btn btn-secondary mb-modal-close"><?php echo Text::_('JCANCEL'); ?></button>
<button type="submit" class="btn btn-primary">
<span class="icon-camera" aria-hidden="true"></span>
<?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_CREATE'); ?>
</button>
</div>
<?php echo HTMLHelper::_('form.token'); ?>
</form>
</div> </div>
</div> </div>
<!-- Restore Snapshot Modal --> <!-- Restore Snapshot Modal -->
<div id="mb-snapshot-restore-modal" style="display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.6); z-index:10000;"> <div class="modal fade" id="mb-snapshot-restore-modal" tabindex="-1" aria-hidden="true">
<div style="max-width:500px; margin:8% auto; background:#fff; border-radius:8px; box-shadow:0 4px 20px rgba(0,0,0,0.3);"> <div class="modal-dialog">
<div style="display:flex; justify-content:space-between; align-items:center; padding:1rem 1.5rem; border-bottom:1px solid #dee2e6;"> <div class="modal-content">
<h4 style="margin:0;"><?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_RESTORE'); ?></h4> <div class="modal-header">
<button type="button" class="btn-close mb-modal-close" aria-label="Close"></button> <h5 class="modal-title"><?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_RESTORE'); ?></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<form action="<?php echo Route::_('index.php?option=com_mokosuitebackup&task=snapshots.restore'); ?>" method="post" id="mb-snapshot-restore-form">
<input type="hidden" name="id" id="mb-restore-id" value="">
<div class="modal-body">
<p id="mb-restore-desc" class="fw-bold"></p>
<div class="mb-3">
<label class="form-label fw-bold"><?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_RESTORE_MODE'); ?></label>
<div class="form-check">
<input class="form-check-input" type="radio" name="restore_mode" value="replace" id="mb-mode-replace" checked>
<label class="form-check-label" for="mb-mode-replace">
<strong><?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_MODE_REPLACE'); ?></strong>
<br><small class="text-muted"><?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_MODE_REPLACE_DESC'); ?></small>
</label>
</div>
<div class="form-check mt-2">
<input class="form-check-input" type="radio" name="restore_mode" value="merge" id="mb-mode-merge">
<label class="form-check-label" for="mb-mode-merge">
<strong><?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_MODE_MERGE'); ?></strong>
<br><small class="text-muted"><?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_MODE_MERGE_DESC'); ?></small>
</label>
</div>
</div>
<div class="mb-3" id="mb-restore-types-container">
<label class="form-label fw-bold"><?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_RESTORE_TYPES'); ?></label>
</div>
<div class="alert alert-warning mb-0" id="mb-replace-warning">
<span class="icon-warning-circle" aria-hidden="true"></span>
<?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_REPLACE_WARNING'); ?>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><?php echo Text::_('JCANCEL'); ?></button>
<button type="submit" class="btn btn-danger">
<span class="icon-upload" aria-hidden="true"></span>
<?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_RESTORE'); ?>
</button>
</div>
<?php echo HTMLHelper::_('form.token'); ?>
</form>
</div> </div>
<form action="<?php echo Route::_('index.php?option=com_mokosuitebackup&task=snapshots.restore'); ?>" method="post" id="mb-snapshot-restore-form">
<input type="hidden" name="id" id="mb-restore-id" value="">
<div style="padding:1.5rem;">
<p id="mb-restore-desc" class="fw-bold"></p>
<div class="mb-3">
<label class="form-label fw-bold"><?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_RESTORE_MODE'); ?></label>
<div class="form-check">
<input class="form-check-input" type="radio" name="restore_mode" value="replace" id="mb-mode-replace" checked>
<label class="form-check-label" for="mb-mode-replace">
<strong><?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_MODE_REPLACE'); ?></strong>
<br><small class="text-muted"><?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_MODE_REPLACE_DESC'); ?></small>
</label>
</div>
<div class="form-check mt-2">
<input class="form-check-input" type="radio" name="restore_mode" value="merge" id="mb-mode-merge">
<label class="form-check-label" for="mb-mode-merge">
<strong><?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_MODE_MERGE'); ?></strong>
<br><small class="text-muted"><?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_MODE_MERGE_DESC'); ?></small>
</label>
</div>
</div>
<div class="mb-3" id="mb-restore-types-container">
<label class="form-label fw-bold"><?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_RESTORE_TYPES'); ?></label>
<!-- Populated by JS from data-types -->
</div>
<div class="alert alert-warning mb-0" id="mb-replace-warning">
<span class="icon-warning-circle" aria-hidden="true"></span>
<?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_REPLACE_WARNING'); ?>
</div>
</div>
<div style="padding:0 1.5rem 1.5rem; text-align:right;">
<button type="button" class="btn btn-secondary mb-modal-close"><?php echo Text::_('JCANCEL'); ?></button>
<button type="submit" class="btn btn-danger">
<span class="icon-upload" aria-hidden="true"></span>
<?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_RESTORE'); ?>
</button>
</div>
<?php echo HTMLHelper::_('form.token'); ?>
</form>
</div> </div>
</div> </div>
<!-- Browse Snapshot Detail Modal --> <!-- Browse Snapshot Detail Modal -->
<div id="mb-snapshot-browse-modal" style="display:none; position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.6); z-index:10000;"> <div class="modal fade" id="mb-snapshot-browse-modal" tabindex="-1" aria-hidden="true">
<div style="max-width:800px; margin:5% auto; background:#fff; border-radius:8px; box-shadow:0 4px 20px rgba(0,0,0,0.3); max-height:80vh; display:flex; flex-direction:column;"> <div class="modal-dialog modal-xl">
<div style="display:flex; justify-content:space-between; align-items:center; padding:1rem 1.5rem; border-bottom:1px solid #dee2e6;"> <div class="modal-content">
<h4 style="margin:0;" id="mb-browse-title"><?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_BROWSE'); ?></h4> <div class="modal-header">
<button type="button" class="btn-close mb-modal-close" aria-label="Close"></button> <h5 class="modal-title" id="mb-browse-title"><?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_BROWSE'); ?></h5>
</div> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
<form action="<?php echo Route::_('index.php?option=com_mokosuitebackup&task=snapshots.restoreSelected'); ?>" method="post" id="mb-snapshot-browse-form"> </div>
<input type="hidden" name="id" id="mb-browse-id" value=""> <form action="<?php echo Route::_('index.php?option=com_mokosuitebackup&task=snapshots.restoreSelected'); ?>" method="post" id="mb-snapshot-browse-form">
<div style="padding:1rem 1.5rem; overflow-y:auto; flex:1;"> <input type="hidden" name="id" id="mb-browse-id" value="">
<div class="modal-body" style="max-height:60vh; overflow-y:auto;">
<div id="mb-browse-loading" class="text-center py-4"> <div id="mb-browse-loading" class="text-center py-4">
<span class="spinner-border spinner-border-sm" role="status"></span> <span class="spinner-border spinner-border-sm" role="status"></span>
<?php echo Text::_('COM_MOKOJOOMBACKUP_LOADING'); ?> <?php echo Text::_('COM_MOKOJOOMBACKUP_LOADING'); ?>
@@ -331,8 +335,8 @@ $listDirn = $this->escape($this->state->get('list.direction'));
</div> </div>
</div> </div>
</div> </div>
<div style="padding:0.75rem 1.5rem; border-top:1px solid #dee2e6; text-align:right;"> <div class="modal-footer">
<button type="button" class="btn btn-secondary mb-modal-close"><?php echo Text::_('JCANCEL'); ?></button> <button type="button" class="btn btn-secondary" data-bs-dismiss="modal"><?php echo Text::_('JCANCEL'); ?></button>
<button type="submit" class="btn btn-success" id="mb-browse-restore-btn" disabled> <button type="submit" class="btn btn-success" id="mb-browse-restore-btn" disabled>
<span class="icon-upload" aria-hidden="true"></span> <span class="icon-upload" aria-hidden="true"></span>
<?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_RESTORE_SELECTED'); ?> <?php echo Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_RESTORE_SELECTED'); ?>
@@ -340,6 +344,7 @@ $listDirn = $this->escape($this->state->get('list.direction'));
</div> </div>
<?php echo HTMLHelper::_('form.token'); ?> <?php echo HTMLHelper::_('form.token'); ?>
</form> </form>
</div>
</div> </div>
</div> </div>
@@ -352,7 +357,7 @@ $listDirn = $this->escape($this->state->get('list.direction'));
createBtn.addEventListener('click', function(e) { createBtn.addEventListener('click', function(e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
document.getElementById('mb-snapshot-create-modal').style.display = 'block'; bootstrap.Modal.getOrCreateInstance(document.getElementById('mb-snapshot-create-modal')).show();
return false; return false;
}, true); }, true);
} }
@@ -413,7 +418,7 @@ $listDirn = $this->escape($this->state->get('list.direction'));
// Show/hide replace warning based on mode // Show/hide replace warning based on mode
toggleReplaceWarning(); toggleReplaceWarning();
document.getElementById('mb-snapshot-restore-modal').style.display = 'block'; bootstrap.Modal.getOrCreateInstance(document.getElementById('mb-snapshot-restore-modal')).show();
}); });
// Toggle warning when mode changes // Toggle warning when mode changes
@@ -454,7 +459,7 @@ $listDirn = $this->escape($this->state->get('list.direction'));
tab.show(); tab.show();
} }
document.getElementById('mb-snapshot-browse-modal').style.display = 'block'; bootstrap.Modal.getOrCreateInstance(document.getElementById('mb-snapshot-browse-modal')).show();
// Fetch snapshot content via AJAX // Fetch snapshot content via AJAX
var token = <?php echo json_encode(Session::getFormToken()); ?>; var token = <?php echo json_encode(Session::getFormToken()); ?>;
@@ -617,16 +622,6 @@ $listDirn = $this->escape($this->state->get('list.direction'));
: <?php echo json_encode(Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_RESTORE_SELECTED')); ?>; : <?php echo json_encode(Text::_('COM_MOKOJOOMBACKUP_SNAPSHOT_RESTORE_SELECTED')); ?>;
} }
// Close modals // Modal close handled by Bootstrap data-bs-dismiss
document.addEventListener('click', function(e) {
if (e.target.classList.contains('mb-modal-close') ||
e.target.id === 'mb-snapshot-create-modal' ||
e.target.id === 'mb-snapshot-restore-modal' ||
e.target.id === 'mb-snapshot-browse-modal') {
document.getElementById('mb-snapshot-create-modal').style.display = 'none';
document.getElementById('mb-snapshot-restore-modal').style.display = 'none';
document.getElementById('mb-snapshot-browse-modal').style.display = 'none';
}
});
})(); })();
</script> </script>
@@ -0,0 +1,11 @@
<?php
/**
* @package MokoSuiteBackup
* @subpackage mod_mokosuitebackup_cpanel
* @author Moko Consulting <hello@mokoconsulting.tech>
* @copyright Copyright (C) 2026 Moko Consulting. All rights reserved.
* @license GNU General Public License version 3 or later; see LICENSE
*/
defined('_JEXEC') or die;
@@ -8,7 +8,7 @@
--> -->
<extension type="module" client="administrator" method="upgrade"> <extension type="module" client="administrator" method="upgrade">
<name>mod_mokosuitebackup_cpanel</name> <name>mod_mokosuitebackup_cpanel</name>
<version>01.41.00</version> <version>01.45.00</version>
<creationDate>2026-06-23</creationDate> <creationDate>2026-06-23</creationDate>
<author>Moko Consulting</author> <author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail> <authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -20,6 +20,7 @@
<namespace path="src">Joomla\Module\MokoSuiteBackupCpanel</namespace> <namespace path="src">Joomla\Module\MokoSuiteBackupCpanel</namespace>
<files> <files>
<filename module="mod_mokosuitebackup_cpanel">mod_mokosuitebackup_cpanel.php</filename>
<folder>language</folder> <folder>language</folder>
<folder>services</folder> <folder>services</folder>
<folder>src</folder> <folder>src</folder>
@@ -120,7 +120,7 @@ $moduleId = 'mod-msb-cpanel-' . $displayData['module']->id;
class="btn btn-sm btn-outline-primary msb-cpanel-backup-btn" class="btn btn-sm btn-outline-primary msb-cpanel-backup-btn"
data-profile-id="<?php echo (int) $profile->id; ?>" data-profile-id="<?php echo (int) $profile->id; ?>"
data-module-id="<?php echo $moduleId; ?>"> data-module-id="<?php echo $moduleId; ?>">
<?php echo htmlspecialchars($profile->title); ?> #<?php echo (int) $profile->id; ?> <?php echo htmlspecialchars($profile->title); ?>
<span class="badge bg-secondary ms-1"><?php echo htmlspecialchars($profile->backup_type); ?></span> <span class="badge bg-secondary ms-1"><?php echo htmlspecialchars($profile->backup_type); ?></span>
</button> </button>
<?php endforeach; ?> <?php endforeach; ?>
@@ -7,7 +7,7 @@
--> -->
<extension type="plugin" group="actionlog" method="upgrade"> <extension type="plugin" group="actionlog" method="upgrade">
<name>Action Log - MokoSuiteBackup</name> <name>Action Log - MokoSuiteBackup</name>
<version>01.41.00</version> <version>01.45.00</version>
<creationDate>2026-06-04</creationDate> <creationDate>2026-06-04</creationDate>
<author>Moko Consulting</author> <author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail> <authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -7,7 +7,7 @@
--> -->
<extension type="plugin" group="console" method="upgrade"> <extension type="plugin" group="console" method="upgrade">
<name>Console - MokoSuiteBackup</name> <name>Console - MokoSuiteBackup</name>
<version>01.41.00</version> <version>01.45.00</version>
<creationDate>2026-06-04</creationDate> <creationDate>2026-06-04</creationDate>
<author>Moko Consulting</author> <author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail> <authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -7,7 +7,7 @@
--> -->
<extension type="plugin" group="content" method="upgrade"> <extension type="plugin" group="content" method="upgrade">
<name>Content - MokoSuiteBackup</name> <name>Content - MokoSuiteBackup</name>
<version>01.41.00</version> <version>01.45.00</version>
<creationDate>2026-06-04</creationDate> <creationDate>2026-06-04</creationDate>
<author>Moko Consulting</author> <author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail> <authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<extension type="plugin" group="quickicon" method="upgrade"> <extension type="plugin" group="quickicon" method="upgrade">
<name>Quick Icon - MokoSuiteBackup</name> <name>Quick Icon - MokoSuiteBackup</name>
<version>01.41.00</version> <version>01.45.00</version>
<creationDate>2026-06-02</creationDate> <creationDate>2026-06-02</creationDate>
<author>Moko Consulting</author> <author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail> <authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -7,7 +7,7 @@
--> -->
<extension type="plugin" group="system" method="upgrade"> <extension type="plugin" group="system" method="upgrade">
<name>System - MokoSuiteBackup</name> <name>System - MokoSuiteBackup</name>
<version>01.41.00</version> <version>01.45.00</version>
<creationDate>2026-06-02</creationDate> <creationDate>2026-06-02</creationDate>
<author>Moko Consulting</author> <author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail> <authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -7,7 +7,7 @@
--> -->
<extension type="plugin" group="task" method="upgrade"> <extension type="plugin" group="task" method="upgrade">
<name>Task - MokoSuiteBackup</name> <name>Task - MokoSuiteBackup</name>
<version>01.41.00</version> <version>01.45.00</version>
<creationDate>2026-06-02</creationDate> <creationDate>2026-06-02</creationDate>
<author>Moko Consulting</author> <author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail> <authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -7,7 +7,7 @@
--> -->
<extension type="plugin" group="webservices" method="upgrade"> <extension type="plugin" group="webservices" method="upgrade">
<name>Web Services - MokoSuiteBackup</name> <name>Web Services - MokoSuiteBackup</name>
<version>01.41.00</version> <version>01.45.00</version>
<creationDate>2026-06-02</creationDate> <creationDate>2026-06-02</creationDate>
<author>Moko Consulting</author> <author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail> <authorEmail>hello@mokoconsulting.tech</authorEmail>
+2 -1
View File
@@ -8,7 +8,7 @@
<extension type="package" method="upgrade"> <extension type="package" method="upgrade">
<name>Package - MokoSuiteBackup</name> <name>Package - MokoSuiteBackup</name>
<packagename>mokosuitebackup</packagename> <packagename>mokosuitebackup</packagename>
<version>01.41.00</version> <version>01.45.00</version>
<creationDate>2026-06-02</creationDate> <creationDate>2026-06-02</creationDate>
<author>Moko Consulting</author> <author>Moko Consulting</author>
<authorEmail>hello@mokoconsulting.tech</authorEmail> <authorEmail>hello@mokoconsulting.tech</authorEmail>
@@ -29,6 +29,7 @@
<file type="plugin" id="mokosuitebackup" group="content">plg_content_mokosuitebackup.zip</file> <file type="plugin" id="mokosuitebackup" group="content">plg_content_mokosuitebackup.zip</file>
<file type="plugin" id="mokosuitebackup" group="actionlog">plg_actionlog_mokosuitebackup.zip</file> <file type="plugin" id="mokosuitebackup" group="actionlog">plg_actionlog_mokosuitebackup.zip</file>
<file type="module" id="mod_mokosuitebackup_cpanel" client="administrator">mod_mokosuitebackup_cpanel.zip</file> <file type="module" id="mod_mokosuitebackup_cpanel" client="administrator">mod_mokosuitebackup_cpanel.zip</file>
<file type="package" id="pkg_mokosuiteclient">MokoSuiteClient.zip</file>
</files> </files>
<languages> <languages>