Skip to content

Commit

Permalink
Merge branch 'develop' into local-multisite
Browse files Browse the repository at this point in the history
  • Loading branch information
diosmosis committed Dec 23, 2024
2 parents b445891 + c0aebf1 commit 171bee6
Show file tree
Hide file tree
Showing 13 changed files with 49 additions and 40 deletions.
8 changes: 4 additions & 4 deletions app/core/Updates/5.2.0-b6.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ public function __construct(MigrationFactory $factory)
}
public function getMigrations(Updater $updater)
{
$startOfCurrentYear = Date::now()->toString('Y') . '-01-01';
$commandToExecute = sprintf('./console core:invalidate-report-data --dates=%s,today --plugin=Actions.Actions_hits', $startOfCurrentYear);
$migrations = [new CustomMigration(function () use($startOfCurrentYear) {
$startOfCurrentMonth = Date::now()->toString('Y-m') . '-01';
$commandToExecute = sprintf('./console core:invalidate-report-data --dates=%s,today --plugin=Actions.Actions_hits', $startOfCurrentMonth);
$migrations = [new CustomMigration(function () use($startOfCurrentMonth) {
$invalidator = StaticContainer::get(ArchiveInvalidator::class);
$invalidator->scheduleReArchiving('all', 'Actions', 'Actions_hits', Date::factory($startOfCurrentYear));
$invalidator->scheduleReArchiving('all', 'Actions', 'Actions_hits', Date::factory($startOfCurrentMonth));
}, $commandToExecute)];
return $migrations;
}
Expand Down
2 changes: 1 addition & 1 deletion app/core/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ final class Version
* The current Matomo version.
* @var string
*/
public const VERSION = '5.2.0';
public const VERSION = '5.2.1';
public const MAJOR_VERSION = 5;
public function isStableVersion($version) : bool
{
Expand Down
6 changes: 1 addition & 5 deletions app/lang/dev.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
"General": {
"TranslatorName": "Matomo Development Team"
},
"Intl": {
"OriginalLanguageName": "Development",
"EnglishLanguageName": "Development"
}
}
}
5 changes: 5 additions & 0 deletions app/plugins/CorePluginsAdmin/SettingsMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
class SettingsMetadata
{
public const PASSWORD_PLACEHOLDER = '******';
public const EMPTY_ARRAY = '__empty__';
/**
* @param Settings[] $settingsInstances
* @param array $settingValues array('pluginName' => array('settingName' => 'settingValue'))
Expand All @@ -29,6 +30,10 @@ public function setPluginSettings($settingsInstances, $settingValues)
foreach ($pluginSetting->getSettingsWritableByCurrentUser() as $setting) {
$value = $this->findSettingValueFromRequest($settingValues, $pluginName, $setting->getName());
$fieldConfig = $setting->configureField();
// empty arrays are sent as __empty__ value, so we need to convert it here back to an array
if ($setting->getType() === FieldConfig::TYPE_ARRAY && $value === self::EMPTY_ARRAY) {
$value = [];
}
if (isset($value) && ($fieldConfig->uiControl !== FieldConfig::UI_CONTROL_PASSWORD || $value !== self::PASSWORD_PLACEHOLDER)) {
$setting->setValue($value);
}
Expand Down
32 changes: 18 additions & 14 deletions app/plugins/CorePluginsAdmin/vue/dist/CorePluginsAdmin.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -17267,34 +17267,34 @@ var UI_CONTROLS_TO_TYPE = {
Fieldvue_type_script_lang_ts.render = Fieldvue_type_template_id_5f883444_render

/* harmony default export */ var Field = (Fieldvue_type_script_lang_ts);
// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CorePluginsAdmin/vue/src/PluginSettings/PluginSettings.vue?vue&type=template&id=919e3cb4
// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CorePluginsAdmin/vue/src/PluginSettings/PluginSettings.vue?vue&type=template&id=601e4fc6

var PluginSettingsvue_type_template_id_919e3cb4_hoisted_1 = {
var PluginSettingsvue_type_template_id_601e4fc6_hoisted_1 = {
class: "pluginSettings",
ref: "root"
};
var PluginSettingsvue_type_template_id_919e3cb4_hoisted_2 = ["id"];
var PluginSettingsvue_type_template_id_919e3cb4_hoisted_3 = {
var PluginSettingsvue_type_template_id_601e4fc6_hoisted_2 = ["id"];
var PluginSettingsvue_type_template_id_601e4fc6_hoisted_3 = {
class: "card-content"
};
var PluginSettingsvue_type_template_id_919e3cb4_hoisted_4 = ["id"];
var PluginSettingsvue_type_template_id_919e3cb4_hoisted_5 = ["onClick", "disabled", "value"];
function PluginSettingsvue_type_template_id_919e3cb4_render(_ctx, _cache, $props, $setup, $data, $options) {
var PluginSettingsvue_type_template_id_601e4fc6_hoisted_4 = ["id"];
var PluginSettingsvue_type_template_id_601e4fc6_hoisted_5 = ["onClick", "disabled", "value"];
function PluginSettingsvue_type_template_id_601e4fc6_render(_ctx, _cache, $props, $setup, $data, $options) {
var _component_GroupedSettings = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("GroupedSettings");

var _component_ActivityIndicator = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ActivityIndicator");

var _component_PasswordConfirmation = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("PasswordConfirmation");

return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PluginSettingsvue_type_template_id_919e3cb4_hoisted_1, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.settingsPerPlugin, function (settings) {
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", PluginSettingsvue_type_template_id_601e4fc6_hoisted_1, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.settingsPerPlugin, function (settings) {
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", {
class: "card",
id: "".concat(settings.pluginName, "PluginSettings"),
key: "".concat(settings.pluginName, "PluginSettings")
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PluginSettingsvue_type_template_id_919e3cb4_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", {
}, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", PluginSettingsvue_type_template_id_601e4fc6_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", {
class: "card-title",
id: settings.pluginName
}, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(settings.title), 9, PluginSettingsvue_type_template_id_919e3cb4_hoisted_4), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_GroupedSettings, {
}, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(settings.title), 9, PluginSettingsvue_type_template_id_601e4fc6_hoisted_4), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_GroupedSettings, {
"group-name": settings.pluginName,
settings: settings.settings,
"all-setting-values": _ctx.settingValues,
Expand All @@ -17309,9 +17309,9 @@ function PluginSettingsvue_type_template_id_919e3cb4_render(_ctx, _cache, $props
disabled: _ctx.isLoading,
class: "pluginsSettingsSubmit btn",
value: _ctx.translate('General_Save')
}, null, 8, PluginSettingsvue_type_template_id_919e3cb4_hoisted_5), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ActivityIndicator, {
}, null, 8, PluginSettingsvue_type_template_id_601e4fc6_hoisted_5), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ActivityIndicator, {
loading: _ctx.isLoading || _ctx.isSaving[settings.pluginName]
}, null, 8, ["loading"])])], 8, PluginSettingsvue_type_template_id_919e3cb4_hoisted_2);
}, null, 8, ["loading"])])], 8, PluginSettingsvue_type_template_id_601e4fc6_hoisted_2);
}), 128)), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_PasswordConfirmation, {
modelValue: _ctx.showPasswordConfirmModal,
"onUpdate:modelValue": _cache[0] || (_cache[0] = function ($event) {
Expand All @@ -17320,7 +17320,7 @@ function PluginSettingsvue_type_template_id_919e3cb4_render(_ctx, _cache, $props
onConfirmed: _ctx.confirmPassword
}, null, 8, ["modelValue", "onConfirmed"])], 512);
}
// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/PluginSettings/PluginSettings.vue?vue&type=template&id=919e3cb4
// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/PluginSettings/PluginSettings.vue?vue&type=template&id=601e4fc6

// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/CorePluginsAdmin/vue/src/GroupedSettings/GroupedSettings.vue?vue&type=template&id=566a93cc

Expand Down Expand Up @@ -17807,6 +17807,10 @@ var PluginSettingsvue_type_script_lang_ts_window = window,
postValue = '1';
}

if (Array.isArray(postValue) && postValue.length === 0) {
postValue = '__empty__';
}

values[pluginName].push({
name: settingName,
value: postValue
Expand All @@ -17822,7 +17826,7 @@ var PluginSettingsvue_type_script_lang_ts_window = window,



PluginSettingsvue_type_script_lang_ts.render = PluginSettingsvue_type_template_id_919e3cb4_render
PluginSettingsvue_type_script_lang_ts.render = PluginSettingsvue_type_template_id_601e4fc6_render

/* harmony default export */ var PluginSettings = (PluginSettingsvue_type_script_lang_ts);
// CONCATENATED MODULE: ./plugins/CorePluginsAdmin/vue/src/Plugins/PluginFilter.ts
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ export default defineComponent({
postValue = '1';
}

if (Array.isArray(postValue) && postValue.length === 0) {
postValue = '__empty__';
}

values[pluginName].push({
name: settingName,
value: postValue,
Expand Down
Empty file modified app/tmp/.gitkeep
100755 → 100644
Empty file.
12 changes: 6 additions & 6 deletions app/vendor/composer/installed.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php return array(
'root' => array(
'name' => 'matomo/matomo',
'pretty_version' => '5.2.0',
'version' => '5.2.0.0',
'reference' => 'e3aece1db0c97e59a6421467e0bd6d7fddee26c9',
'pretty_version' => '5.2.1',
'version' => '5.2.1.0',
'reference' => '369c2f1d1bc4d06708a7d476135e6db868dcb746',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down Expand Up @@ -103,9 +103,9 @@
'dev_requirement' => false,
),
'matomo/matomo' => array(
'pretty_version' => '5.2.0',
'version' => '5.2.0.0',
'reference' => 'e3aece1db0c97e59a6421467e0bd6d7fddee26c9',
'pretty_version' => '5.2.1',
'version' => '5.2.1.0',
'reference' => '369c2f1d1bc4d06708a7d476135e6db868dcb746',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down
2 changes: 1 addition & 1 deletion app/vendor/prefixed/vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit0231e01a0f3f0f796509119a717ab9dd::getLoader();
return ComposerAutoloaderInit7f50f704d825c10f2718377a2ae66de5::getLoader();
10 changes: 5 additions & 5 deletions app/vendor/prefixed/vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInit0231e01a0f3f0f796509119a717ab9dd
class ComposerAutoloaderInit7f50f704d825c10f2718377a2ae66de5
{
private static $loader;

Expand All @@ -22,16 +22,16 @@ public static function getLoader()
return self::$loader;
}

spl_autoload_register(array('ComposerAutoloaderInit0231e01a0f3f0f796509119a717ab9dd', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit7f50f704d825c10f2718377a2ae66de5', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit0231e01a0f3f0f796509119a717ab9dd', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit7f50f704d825c10f2718377a2ae66de5', 'loadClassLoader'));

require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit0231e01a0f3f0f796509119a717ab9dd::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit7f50f704d825c10f2718377a2ae66de5::getInitializer($loader));

$loader->register(true);

$filesToLoad = \Composer\Autoload\ComposerStaticInit0231e01a0f3f0f796509119a717ab9dd::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInit7f50f704d825c10f2718377a2ae66de5::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
Expand Down
4 changes: 2 additions & 2 deletions app/vendor/prefixed/vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInit0231e01a0f3f0f796509119a717ab9dd
class ComposerStaticInit7f50f704d825c10f2718377a2ae66de5
{
public static $files = array (
'57561443c5204a2081a57dea43ad4761' => __DIR__ . '/../..' . '/twig/twig/src/Resources/core.php',
Expand Down Expand Up @@ -960,7 +960,7 @@ class ComposerStaticInit0231e01a0f3f0f796509119a717ab9dd
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->classMap = ComposerStaticInit0231e01a0f3f0f796509119a717ab9dd::$classMap;
$loader->classMap = ComposerStaticInit7f50f704d825c10f2718377a2ae66de5::$classMap;

}, null, ClassLoader::class);
}
Expand Down
2 changes: 1 addition & 1 deletion assets/js/asset_manager_core_js.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 171bee6

Please sign in to comment.