Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[K6.2] Set Aurelia as default in config when migrate from K5.2
- Loading branch information
Showing
3 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/admin/install/sql/updates/php/5.2.15-2021-08-24_configuration_default_template.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
|
||
/** | ||
* Kunena Component | ||
* | ||
* @package Kunena.Installer | ||
* | ||
* @copyright Copyright (C) 2008 - 2023 Kunena Team. All rights reserved. | ||
* @license https://www.gnu.org/copyleft/gpl.html GNU/GPL | ||
* @link https://www.kunena.org | ||
**/ | ||
|
||
defined('_JEXEC') or die(); | ||
|
||
use Joomla\CMS\Language\Text; | ||
use Kunena\Forum\Libraries\Factory\KunenaFactory; | ||
|
||
// Kunena 6.0.0: Set Aurelia as default template in config when update | ||
/** | ||
* @param string $parent parent | ||
* | ||
* @return array | ||
* | ||
* @throws Exception | ||
* @since Kunena 6.0 | ||
*/ | ||
function kunena_5215_2021_08_24_configuration_default_template($parent) | ||
{ | ||
$config = KunenaFactory::getConfig(); | ||
|
||
if (isset($config->template)) { | ||
if ($config->template == 'crypsis' || $config->template == 'crypsisb3' || $config->template == 'crypsisb4' || $config->template == 'blue_eagle5') { | ||
$config->set('template', 'aurelia'); | ||
} | ||
} | ||
|
||
// Save configuration | ||
$config->save(); | ||
|
||
return ['action' => '', 'name' => Text::_('COM_KUNENA_INSTALL_5215_SET_AURELIA_AS_DEFAULT_IN_CONFIGURATION'), 'success' => true]; | ||
} |