Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d780e10a2f | |||
| b2770df80f | |||
| 1c643b097f | |||
| ee293e8038 | |||
| 8e3e473426 | |||
| 2a7fb74ef9 | |||
| c7a57116a7 | |||
| 6a62868881 | |||
| 0926e82465 | |||
| e37a52df4e | |||
| a7611d17d9 | |||
| 183b2d2d6f | |||
| 4ca9e23630 | |||
| d0ce09abf0 | |||
| 1dde736225 | |||
| 6074aa55ae | |||
| 939964bff9 | |||
| 5363a85b92 | |||
| c12d207a96 |
@@ -95,7 +95,7 @@ jobs:
|
||||
sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer > /dev/null 2>&1
|
||||
fi
|
||||
rm -rf /tmp/mokocli
|
||||
CLONE_URL=https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/mokocli.git
|
||||
CLONE_URL=https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoCLI.git
|
||||
git clone --depth 1 --branch main --quiet $CLONE_URL /tmp/mokocli
|
||||
cd /tmp/mokocli
|
||||
composer install --no-dev --no-interaction --quiet
|
||||
@@ -104,11 +104,39 @@ jobs:
|
||||
|
||||
- name: Rename branch to rc
|
||||
run: |
|
||||
php ${MOKO_CLI}/branch_rename.php \
|
||||
--from "${{ github.event.pull_request.head.ref || 'dev' }}" --to rc \
|
||||
--token "${{ secrets.MOKOGITEA_TOKEN }}" \
|
||||
--api-base "${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}" \
|
||||
--pr "${{ github.event.pull_request.number }}"
|
||||
API_BASE="${MOKOGITEA_URL}/api/v1/repos/${GITEA_ORG}/${GITEA_REPO}"
|
||||
AUTH="Authorization: token ${{ secrets.MOKOGITEA_TOKEN }}"
|
||||
FROM="${{ github.event.pull_request.head.ref || 'dev' }}"
|
||||
PR="${{ github.event.pull_request.number }}"
|
||||
|
||||
# Resolve the source branch HEAD commit.
|
||||
SRC_JSON=$(curl -sf -H "$AUTH" "${API_BASE}/branches/${FROM}") \
|
||||
|| { echo "::error::Source branch ${FROM} not found"; exit 1; }
|
||||
SRC_SHA=$(printf '%s' "$SRC_JSON" | python3 -c "import sys, json; print(json.load(sys.stdin)['commit']['id'])" 2>/dev/null || true)
|
||||
[ -n "$SRC_SHA" ] || { echo "::error::Could not resolve HEAD of ${FROM}"; exit 1; }
|
||||
|
||||
# Point rc at the source commit. If rc already exists (a protected branch that
|
||||
# cannot be deleted), force-update its ref in place instead of delete+recreate:
|
||||
# deleting a protected branch fails, which then makes the recreate return HTTP 409.
|
||||
if curl -sf -o /dev/null -H "$AUTH" "${API_BASE}/branches/rc"; then
|
||||
echo "rc exists - force-updating to ${FROM} (${SRC_SHA})"
|
||||
curl -sf -X PATCH -H "$AUTH" -H "Content-Type: application/json" \
|
||||
"${API_BASE}/git/refs/heads/rc" -d "{\"sha\":\"${SRC_SHA}\",\"force\":true}" \
|
||||
|| { echo "::error::Failed to force-update rc (CI token needs force-push on the protected rc branch)"; exit 1; }
|
||||
else
|
||||
echo "Creating rc from ${FROM}"
|
||||
curl -sf -X POST -H "$AUTH" -H "Content-Type: application/json" \
|
||||
"${API_BASE}/branches" -d "{\"new_branch_name\":\"rc\",\"old_branch_name\":\"${FROM}\"}" \
|
||||
|| { echo "::error::Failed to create rc from ${FROM}"; exit 1; }
|
||||
fi
|
||||
|
||||
# Repoint the PR at rc, then delete the old source branch (non-fatal).
|
||||
if [ -n "$PR" ]; then
|
||||
curl -s -X PATCH -H "$AUTH" -H "Content-Type: application/json" \
|
||||
"${API_BASE}/pulls/${PR}" -d '{"head":"rc"}' >/dev/null || true
|
||||
fi
|
||||
curl -s -X DELETE -H "$AUTH" "${API_BASE}/branches/${FROM}" >/dev/null || true
|
||||
echo "Renamed ${FROM} -> rc"
|
||||
|
||||
- name: Checkout rc and configure git
|
||||
run: |
|
||||
@@ -218,7 +246,7 @@ jobs:
|
||||
sudo apt-get update -qq && sudo apt-get install -y -qq php-cli php-mbstring php-xml php-zip php-curl composer > /dev/null 2>&1
|
||||
fi
|
||||
rm -rf /tmp/mokocli
|
||||
CLONE_URL=https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/mokocli.git
|
||||
CLONE_URL=https://x-access-token:${MOKO_CLONE_TOKEN}@${MOKO_CLONE_HOST}/MokoCLI.git
|
||||
git clone --depth 1 --branch main --quiet $CLONE_URL /tmp/mokocli
|
||||
cd /tmp/mokocli
|
||||
composer install --no-dev --no-interaction --quiet
|
||||
|
||||
@@ -50,7 +50,7 @@ jobs:
|
||||
for BRANCH in $BRANCHES; do
|
||||
# Skip protected branches
|
||||
case "$BRANCH" in
|
||||
main|master|develop|release/*|hotfix/*) continue ;;
|
||||
main|master|dev|develop|rc|beta|alpha|release|release/*|production|stable|staging|hotfix/*|version/*) continue ;;
|
||||
esac
|
||||
|
||||
# Check if branch is merged into main
|
||||
|
||||
@@ -15,9 +15,9 @@ name: "Universal: Notifications"
|
||||
on:
|
||||
workflow_run:
|
||||
workflows:
|
||||
- "Joomla Build & Release"
|
||||
- "Joomla Extension CI"
|
||||
- "Deploy"
|
||||
- "Universal: Build & Release"
|
||||
- "Joomla: Extension CI"
|
||||
- "Generic: Project CI"
|
||||
types:
|
||||
- completed
|
||||
|
||||
|
||||
+14
-49
@@ -1,55 +1,20 @@
|
||||
# Changelog
|
||||
## [Unreleased]
|
||||
|
||||
## [02.56.05] --- 2026-07-05
|
||||
|
||||
## [02.56.05] --- 2026-07-05
|
||||
|
||||
## [02.56.00] --- 2026-07-04
|
||||
|
||||
|
||||
## [02.56.00] --- 2026-07-04
|
||||
|
||||
## [02.56.00] --- 2026-07-04
|
||||
|
||||
|
||||
All notable changes to this project are documented in this file. The format is
|
||||
based on [Keep a Changelog](https://keepachangelog.com/); versions use
|
||||
zero-padded `MAJOR.MINOR.PATCH`.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [02.55.00] --- 2026-07-04
|
||||
|
||||
### Removed
|
||||
- Legacy single-remote storage: the per-profile `remote_storage` column and all
|
||||
FTP/SFTP/S3/Google Drive credential columns. Remote destinations are now sourced
|
||||
exclusively from the `#__mokosuitebackup_remotes` table.
|
||||
- Orphaned `SftpPath` form field and the `ajax.browseSftpDir` endpoint (leftovers
|
||||
of the removed single-SFTP path picker).
|
||||
|
||||
### Changed
|
||||
- Package installer script adopts the standard licensing and install-completion
|
||||
pattern: the download key is preserved across updates (backed up in preflight,
|
||||
restored in postflight), an "installed successfully" notice shows on install and
|
||||
update, and the license-key prompt shows on fresh install only.
|
||||
- Akeeba import no longer copies legacy remote settings onto the profile; re-add
|
||||
remote destinations on the profile's Remote tab after importing.
|
||||
|
||||
### Fixed
|
||||
- Schema migration `02.52.25.sql` uses plain `DROP COLUMN` (portable to both
|
||||
Oracle MySQL 8.x and MariaDB) instead of the MariaDB-only `DROP COLUMN IF EXISTS`.
|
||||
|
||||
## [02.54.00] --- 2026-07-04
|
||||
|
||||
### Added
|
||||
- Per-profile backup retention is now enforced. After each backup, completed
|
||||
backups older than `retention_days` or beyond the newest `retention_count`
|
||||
copies are pruned, along with their archive and log files (`0` = unlimited for
|
||||
either rule). The retention fields are now shown on the profile editor's
|
||||
Archive tab.
|
||||
|
||||
### Fixed
|
||||
- "Purge Old Backups" toolbar button now opens the purge modal under the Joomla 6
|
||||
Atum toolbar (it was bound to markup the toolbar no longer renders).
|
||||
|
||||
### Changed
|
||||
- All Joomla package manifests hardcode their titles and descriptions (no language
|
||||
strings), and `<name>` follows the `Type - Name` convention (e.g.
|
||||
`Component - MokoSuiteBackup`, `Module - MokoSuiteBackup - cPanel`).
|
||||
|
||||
## [02.53.00] --- 2026-07-04
|
||||
|
||||
### Added
|
||||
- `COM_MOKOJOOMBACKUP_SHORT` short-name language constant.
|
||||
|
||||
### Changed
|
||||
- Admin views and the administrator sidebar menu use the short "Backup" name
|
||||
(e.g. "Backup: Dashboard", "Backup: Records").
|
||||
## [02.56.00] --- 2026-07-04
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ DEFGROUP: Template-Joomla
|
||||
INGROUP: Template-Joomla.Documentation
|
||||
REPO: https://git.mokoconsulting.tech/MokoConsulting/Template-Joomla
|
||||
PATH: /SECURITY.md
|
||||
VERSION: 02.55.00
|
||||
VERSION: 02.56.05
|
||||
BRIEF: Security vulnerability reporting and handling policy
|
||||
-->
|
||||
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package MokoSuiteBackup
|
||||
* @subpackage plg_webservices_mokosuitebackup
|
||||
* @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;
|
||||
|
||||
use Joomla\CMS\Extension\PluginInterface;
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Plugin\PluginHelper;
|
||||
use Joomla\DI\Container;
|
||||
use Joomla\DI\ServiceProviderInterface;
|
||||
use Joomla\Event\DispatcherInterface;
|
||||
use Joomla\Plugin\WebServices\MokoSuiteBackup\Extension\MokoSuiteBackupWebServices;
|
||||
|
||||
return new class () implements ServiceProviderInterface {
|
||||
public function register(Container $container): void
|
||||
{
|
||||
$container->set(
|
||||
PluginInterface::class,
|
||||
function (Container $container) {
|
||||
$plugin = new MokoSuiteBackupWebServices(
|
||||
$container->get(DispatcherInterface::class),
|
||||
(array) PluginHelper::getPlugin('webservices', 'mokosuitebackup')
|
||||
);
|
||||
$plugin->setApplication(Factory::getApplication());
|
||||
|
||||
return $plugin;
|
||||
}
|
||||
);
|
||||
}
|
||||
};
|
||||
Submodule source/packages/MokoSuiteClient updated: 9df6bea4b7...464b5da929
@@ -7,7 +7,7 @@
|
||||
-->
|
||||
<extension type="component" method="upgrade">
|
||||
<name>Component - MokoSuiteBackup</name>
|
||||
<version>02.55.00</version>
|
||||
<version>02.56.05</version>
|
||||
<creationDate>2026-06-02</creationDate>
|
||||
<author>Moko Consulting</author>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
/* 02.55.03 — no schema changes */
|
||||
@@ -0,0 +1 @@
|
||||
/* 02.56.00 — no schema changes */
|
||||
@@ -0,0 +1,32 @@
|
||||
-- Purge legacy single-remote storage columns from installs where they are still present.
|
||||
--
|
||||
-- Background: 02.52.25.sql originally used `DROP COLUMN IF EXISTS`, which is a
|
||||
-- MariaDB-only extension and errors on Oracle MySQL 8.x. On MySQL 8 installs the
|
||||
-- migration failed but Joomla still recorded the schema as applied, leaving all 26
|
||||
-- legacy remote_storage/ftp_*/sftp_*/gdrive_*/s3_* columns stranded on the profiles
|
||||
-- table. This migration removes them portably.
|
||||
--
|
||||
-- It must be safe on BOTH engines AND on installs where the columns are already gone
|
||||
-- (MariaDB, or anyone who ran the corrected 02.52.25). Plain `DROP COLUMN` errors when
|
||||
-- a column is absent, and `DROP COLUMN IF EXISTS` errors on MySQL 8 — so neither works
|
||||
-- unconditionally. We gate the drop on INFORMATION_SCHEMA and build the ALTER via a
|
||||
-- prepared statement, which runs on MySQL 8 and MariaDB alike. All 26 columns were
|
||||
-- created and dropped together, so the presence of `remote_storage` gates the whole set.
|
||||
-- When the columns are absent this is a no-op (`DO 0`).
|
||||
|
||||
SET @moko_has_legacy_remote := (
|
||||
SELECT COUNT(*)
|
||||
FROM INFORMATION_SCHEMA.COLUMNS
|
||||
WHERE TABLE_SCHEMA = DATABASE()
|
||||
AND TABLE_NAME = '#__mokosuitebackup_profiles'
|
||||
AND COLUMN_NAME = 'remote_storage'
|
||||
);
|
||||
|
||||
SET @moko_drop_legacy_remote := IF(@moko_has_legacy_remote > 0,
|
||||
'ALTER TABLE `#__mokosuitebackup_profiles` DROP COLUMN `remote_storage`, DROP COLUMN `ftp_host`, DROP COLUMN `ftp_port`, DROP COLUMN `ftp_username`, DROP COLUMN `ftp_password`, DROP COLUMN `ftp_path`, DROP COLUMN `ftp_passive`, DROP COLUMN `ftp_ssl`, DROP COLUMN `sftp_host`, DROP COLUMN `sftp_port`, DROP COLUMN `sftp_username`, DROP COLUMN `sftp_auth_type`, DROP COLUMN `sftp_password`, DROP COLUMN `sftp_key_data`, DROP COLUMN `sftp_passphrase`, DROP COLUMN `sftp_path`, DROP COLUMN `gdrive_client_id`, DROP COLUMN `gdrive_client_secret`, DROP COLUMN `gdrive_refresh_token`, DROP COLUMN `gdrive_folder_id`, DROP COLUMN `s3_endpoint`, DROP COLUMN `s3_region`, DROP COLUMN `s3_access_key`, DROP COLUMN `s3_secret_key`, DROP COLUMN `s3_bucket`, DROP COLUMN `s3_path`',
|
||||
'DO 0'
|
||||
);
|
||||
|
||||
PREPARE moko_stmt FROM @moko_drop_legacy_remote;
|
||||
EXECUTE moko_stmt;
|
||||
DEALLOCATE PREPARE moko_stmt;
|
||||
@@ -0,0 +1 @@
|
||||
/* 02.56.05 — no schema changes */
|
||||
@@ -17,6 +17,7 @@ use Joomla\CMS\Session\Session;
|
||||
|
||||
HTMLHelper::_('behavior.formvalidator');
|
||||
HTMLHelper::_('behavior.keepalive');
|
||||
HTMLHelper::_('bootstrap.modal');
|
||||
|
||||
$profileId = (int) $this->item->id;
|
||||
$token = Session::getFormToken();
|
||||
@@ -274,7 +275,11 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
const emptyMsg = document.getElementById('remoteDestEmpty');
|
||||
const loadingTr = document.getElementById('remoteDestLoading');
|
||||
const modalEl = document.getElementById('remoteModal');
|
||||
const modal = bootstrap.Modal.getOrCreateInstance(modalEl);
|
||||
// Lazy: resolve the Bootstrap modal at click-time. Bootstrap loads as a
|
||||
// deferred ES module, so `bootstrap` is not defined yet at DOMContentLoaded;
|
||||
// referencing it here would throw and abort the whole handler (leaving the
|
||||
// table stuck at "Loading…" and the Add button unbound).
|
||||
const getModal = () => bootstrap.Modal.getOrCreateInstance(modalEl);
|
||||
|
||||
// Type badge colours
|
||||
const typeBadge = {sftp: 'bg-primary', s3: 'bg-warning text-dark', google_drive: 'bg-success'};
|
||||
@@ -507,7 +512,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
}
|
||||
|
||||
updateTypeFields();
|
||||
modal.show();
|
||||
getModal().show();
|
||||
}
|
||||
|
||||
// ---- Type selector toggles field visibility ----
|
||||
@@ -587,7 +592,7 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
return;
|
||||
}
|
||||
|
||||
modal.hide();
|
||||
getModal().hide();
|
||||
loadRemotes();
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
-->
|
||||
<extension type="module" client="administrator" method="upgrade">
|
||||
<name>Module - MokoSuiteBackup - cPanel</name>
|
||||
<version>02.55.00</version>
|
||||
<version>02.56.05</version>
|
||||
<creationDate>2026-06-23</creationDate>
|
||||
<author>Moko Consulting</author>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
-->
|
||||
<extension type="plugin" group="actionlog" method="upgrade">
|
||||
<name>Action Log - MokoSuiteBackup</name>
|
||||
<version>02.55.00</version>
|
||||
<version>02.56.05</version>
|
||||
<creationDate>2026-06-04</creationDate>
|
||||
<author>Moko Consulting</author>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
-->
|
||||
<extension type="plugin" group="console" method="upgrade">
|
||||
<name>Console - MokoSuiteBackup</name>
|
||||
<version>02.55.00</version>
|
||||
<version>02.56.05</version>
|
||||
<creationDate>2026-06-04</creationDate>
|
||||
<author>Moko Consulting</author>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
-->
|
||||
<extension type="plugin" group="content" method="upgrade">
|
||||
<name>Content - MokoSuiteBackup</name>
|
||||
<version>02.55.00</version>
|
||||
<version>02.56.05</version>
|
||||
<creationDate>2026-06-04</creationDate>
|
||||
<author>Moko Consulting</author>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<extension type="plugin" group="quickicon" method="upgrade">
|
||||
<name>Quick Icon - MokoSuiteBackup</name>
|
||||
<version>02.55.00</version>
|
||||
<version>02.56.05</version>
|
||||
<creationDate>2026-06-02</creationDate>
|
||||
<author>Moko Consulting</author>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
-->
|
||||
<extension type="plugin" group="system" method="upgrade">
|
||||
<name>System - MokoSuiteBackup</name>
|
||||
<version>02.55.00</version>
|
||||
<version>02.56.05</version>
|
||||
<creationDate>2026-06-02</creationDate>
|
||||
<author>Moko Consulting</author>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
-->
|
||||
<extension type="plugin" group="task" method="upgrade">
|
||||
<name>Task - MokoSuiteBackup</name>
|
||||
<version>02.55.00</version>
|
||||
<version>02.56.05</version>
|
||||
<creationDate>2026-06-02</creationDate>
|
||||
<author>Moko Consulting</author>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
-->
|
||||
<extension type="plugin" group="webservices" method="upgrade">
|
||||
<name>Web Services - MokoSuiteBackup</name>
|
||||
<version>02.55.00</version>
|
||||
<version>02.56.05</version>
|
||||
<creationDate>2026-06-02</creationDate>
|
||||
<author>Moko Consulting</author>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<extension type="package" method="upgrade">
|
||||
<name>Package - MokoSuiteBackup</name>
|
||||
<packagename>mokosuitebackup</packagename>
|
||||
<version>02.55.00</version>
|
||||
<version>02.56.05</version>
|
||||
<creationDate>2026-06-02</creationDate>
|
||||
<author>Moko Consulting</author>
|
||||
<authorEmail>hello@mokoconsulting.tech</authorEmail>
|
||||
|
||||
Reference in New Issue
Block a user