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:
+4
-4
@@ -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('')
|
||||
|
||||
Reference in New Issue
Block a user