From ad496b3108f4cba6a4edf575b009af7de98559b1 Mon Sep 17 00:00:00 2001 From: Dan Garner Date: Thu, 10 Aug 2023 15:17:55 +0100 Subject: [PATCH] Default enable stat setting for a widget xibosignageltd/xibo-private#354 --- lib/Controller/Widget.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/Controller/Widget.php b/lib/Controller/Widget.php index 2cfbba56c2..e1e5afbadf 100644 --- a/lib/Controller/Widget.php +++ b/lib/Controller/Widget.php @@ -226,6 +226,13 @@ public function addWidget(Request $request, Response $response, $type, $id) $module->schemaVersion ); + // Default status setting + $widget->setOptionValue( + 'enableStat', + 'attrib', + $this->getConfig()->getSetting('WIDGET_STATS_ENABLED_DEFAULT') + ); + // Get the template if ($module->isTemplateExpected()) { $templateId = $params->getString('templateId', [