Skip to content

Commit

Permalink
Add lexicons for new system setting, update build version, update tra…
Browse files Browse the repository at this point in the history
…nsport package
  • Loading branch information
joeke committed Aug 29, 2024
1 parent 3900e06 commit 279a6ff
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ SEO Suite 3.1.5
- Do not create redirect on resource drag/drop when resource does not have SeoSuite activated (issue#100)
- Replace deprecated PHPExcel with PhpSpreadsheet
- Fix saving redirect old url when created from 404 urls tab
- Add system setting to control the position of the SEO Suite panel (top or bottom)

SEO Suite 3.1.4
==============
Expand Down
3 changes: 2 additions & 1 deletion _build/gpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ lowCaseName: seosuite
namespace: Sterc\SeoSuite
description: Toolset for optimising your websites online presence.
author: Sterc
version: 3.1.6
version: 3.1.5

build:
setupOptions: "setup.options.php"
Expand Down Expand Up @@ -107,6 +107,7 @@ systemSettings:
- key: panel_position_top
type: combo-boolean
value: "0"
area: seosuite_tab_meta

menus:
- text: seosuite.menu.seosuite
Expand Down
5 changes: 3 additions & 2 deletions _build/gpm_resolvers/gpm.resolve.element_property_set.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use xPDO\Transport\xPDOTransport;

/**
* Include bootstrap when installing the package
* Handle relation between elements and property sets
*
* THIS RESOLVER IS AUTOMATICALLY GENERATED, NO CHANGES WILL APPLY
*
Expand Down Expand Up @@ -30,8 +30,9 @@
foreach ($elementClasses as $type => $elementClass) {
if (isset($fileMeta[$type]) && is_array($fileMeta[$type])) {
foreach ($fileMeta[$type] as $elementName => $propertySets) {
$nameColumn = $type === 'templates' ? 'templatename' : 'name';
/** @var \MODX\Revolution\modElement $element */
$element = $modx->getObject($elementClass, ['name' => $elementName]);
$element = $modx->getObject($elementClass, [$nameColumn => $elementName]);
if (!$element) continue;

if (empty($propertySets)) {
Expand Down
53 changes: 53 additions & 0 deletions _build/gpm_scripts/gpm.script.reload_system_settings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?php
/**
*
* THIS RESOLVER IS AUTOMATICALLY GENERATED, NO CHANGES WILL APPLY
*
* @package seosuite
* @subpackage build
*
* @var \xPDO\Transport\xPDOTransport $transport
* @var array $object
* @var array $options
*/

use Fred\Model\FredThemedTemplate;
use Fred\Model\FredBlueprint;
use Fred\Model\FredTheme;
use xPDO\Transport\xPDOTransport;
use MODX\Revolution\modSystemSetting;
use xPDO\xPDO;
use xPDO\Cache\xPDOCacheManager;

if ($options[xPDOTransport::PACKAGE_ACTION] === xPDOTransport::ACTION_UNINSTALL) {
return true;
}

$modx =& $transport->xpdo;

$modx->getCacheManager();
$modx->cacheManager->refresh();

$config = $modx->cacheManager->get('config', [
xPDO::OPT_CACHE_KEY => $modx->getOption('cache_system_settings_key', null, 'system_settings'),
xPDO::OPT_CACHE_HANDLER => $modx->getOption('cache_system_settings_handler', null, $modx->getOption(xPDO::OPT_CACHE_HANDLER)),
xPDO::OPT_CACHE_FORMAT => (integer) $modx->getOption('cache_system_settings_format', null, $modx->getOption(xPDO::OPT_CACHE_FORMAT, null, xPDOCacheManager::CACHE_PHP)),
]);

if (empty($config)) {
$config = $modx->cacheManager->generateConfig();
}

if (empty($config)) {
$config = [];
if (!$settings = $modx->getCollection(modSystemSetting::class)) {
return;
}
/** @var modSystemSetting $setting */
foreach ($settings as $setting) {
$config[$setting->get('key')]= $setting->get('value');
}
}

$modx->config = array_merge($modx->config, $config);
$modx->_systemConfig = $modx->config;
Binary file modified _packages/seosuite-3.1.5-pl.transport.zip
Binary file not shown.
Binary file removed _packages/seosuite-3.1.6-pl.transport.zip
Binary file not shown.
2 changes: 2 additions & 0 deletions core/components/seosuite/lexicon/en/mgr.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
$_lang['setting_seosuite.meta.preview.length_mobile_description_desc'] = 'Determines the maximum length as shown in the preview.';
$_lang['setting_seosuite.meta.default_alternate_context'] = 'Default alternate context';
$_lang['setting_seosuite.meta.default_alternate_context_desc'] = 'Specify the context to be marked as default alternate link (x-default).';
$_lang['setting_seosuite.panel_position_top'] = 'Show SEO Suite panel at top of resource page';
$_lang['setting_seosuite.panel_position_top_desc'] = 'Specify if the SEO Suite panel should be shown at the top or bottom of the resource page. Default is bottom.';

/* Sitemap settings. */
$_lang['setting_seosuite.sitemap.default_changefreq'] = 'Default resource setting: update frequency';
Expand Down

0 comments on commit 279a6ff

Please sign in to comment.