fix: pretty names for all sub-extensions, default backup dir to ./backups

- Component: MokoSuiteBackup
- Plugins: System/Task/Console/Content/QuickIcon/ActionLog/WebServices - MokoSuiteBackup
- Default backup_dir changed to ./backups (relative to site root)
- Auto-migrate old defaults on upgrade
This commit is contained in:
Jonathan Miller
2026-06-11 12:48:11 -05:00
parent 9a20f23c12
commit 5c697b9eeb
12 changed files with 16 additions and 16 deletions
+4 -4
View File
@@ -191,8 +191,8 @@ class Pkg_MokoSuiteBackupInstallerScript
$db->setQuery($query);
$db->execute();
// Create default backup directory (outside web root)
$backupDir = JPATH_ROOT . '/../backups';
// Create default backup directory in site root
$backupDir = JPATH_ROOT . '/backups';
if (!is_dir($backupDir)) {
@mkdir($backupDir, 0755, true);
@@ -250,10 +250,10 @@ class Pkg_MokoSuiteBackupInstallerScript
$db->setQuery($query);
if ((int) $db->loadResult() > 0) {
// Auto-migrate old defaults to the new ../backups convention
// Auto-migrate old defaults to the new ./backups convention
$update = $db->getQuery(true)
->update($db->quoteName('#__mokosuitebackup_profiles'))
->set($db->quoteName('backup_dir') . ' = ' . $db->quote('../backups'))
->set($db->quoteName('backup_dir') . ' = ' . $db->quote('./backups'))
->where('(' . $db->quoteName('backup_dir') . ' IN ('
. implode(',', array_map([$db, 'quote'], $oldDefaults))
. ') OR ' . $db->quoteName('backup_dir') . ' = ' . $db->quote('')