Enable photoswipe addon by default, both on PC and mobile

This commit is contained in:
Kijin Sung 2021-01-22 01:24:26 +09:00
parent e507cd9684
commit a3d2682744
3 changed files with 14 additions and 3 deletions

View file

@ -236,7 +236,16 @@ class addonAdminController extends addonController
{
$args = new stdClass;
$args->addon = $addon;
$args->is_used = $isUsed;
if (strlen($isUsed) == 2)
{
$args->is_used = substr($isUsed, 0, 1) === 'Y' ? 'Y' : 'N';
$args->is_used_m = substr($isUsed, 1, 1) === 'Y' ? 'Y' : 'N';
}
else
{
$args->is_used = $isUsed === 'Y' ? 'Y' : 'N';
}
if($gtype == 'global')
{
$output = executeQuery('addon.insertAddon', $args);

View file

@ -17,8 +17,9 @@ class addon extends ModuleObject
{
// Register to add a few
$oAddonController = getAdminController('addon');
$oAddonController->doInsert('autolink', 0, 'site', 'Y');
$oAddonController->doInsert('resize_image', 0, 'site', 'Y');
$oAddonController->doInsert('autolink', 0, 'site', 'YY');
$oAddonController->doInsert('photoswipe', 0, 'site', 'YY');
$oAddonController->doInsert('resize_image', 0, 'site', 'YY');
$oAddonController->makeCacheFile(0);
}

View file

@ -5,6 +5,7 @@
<columns>
<column name="addon" var="addon" notnull="notnull" />
<column name="is_used" var="is_used" default="N" notnull="notnull" />
<column name="is_used_m" var="is_used_m" default="N" />
<column name="regdate" var="regdate" default="curdate()" />
<column name="extra_vars" var="extra_vars" />
</columns>