From 3f1a405575545d01ecaf35e0cfd07da3931293d7 Mon Sep 17 00:00:00 2001 From: Prasad <prasad@vtiger.com> Date: Fri, 1 Sep 2023 14:04:10 +0530 Subject: [PATCH] Fixes #1612: Adjusted function signature and parameter forwarding --- modules/Vtiger/dashboards/MiniList.php | 3 ++- modules/Vtiger/dashboards/Notebook.php | 5 +++-- modules/Vtiger/views/ShowWidget.php | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/Vtiger/dashboards/MiniList.php b/modules/Vtiger/dashboards/MiniList.php index 69f0f433a..a4560b2da 100644 --- a/modules/Vtiger/dashboards/MiniList.php +++ b/modules/Vtiger/dashboards/MiniList.php @@ -10,7 +10,8 @@ class Vtiger_MiniList_Dashboard extends Vtiger_IndexAjax_View { - public function process(Vtiger_Request $request, $widget=NULL) { + public function process(Vtiger_Request $request) { + $widget = null; $currentUser = Users_Record_Model::getCurrentUserModel(); $viewer = $this->getViewer($request); $moduleName = $request->getModule(); diff --git a/modules/Vtiger/dashboards/Notebook.php b/modules/Vtiger/dashboards/Notebook.php index 460b31dad..a5014655d 100644 --- a/modules/Vtiger/dashboards/Notebook.php +++ b/modules/Vtiger/dashboards/Notebook.php @@ -10,7 +10,8 @@ class Vtiger_Notebook_Dashboard extends Vtiger_IndexAjax_View { - public function process(Vtiger_Request $request, $widget=NULL) { + public function process(Vtiger_Request $request) { + $widget = null; $viewer = $this->getViewer($request); $moduleName = $request->getModule(); @@ -70,4 +71,4 @@ class Vtiger_Notebook_Dashboard extends Vtiger_IndexAjax_View { return $metriclists; } -} \ No newline at end of file +} diff --git a/modules/Vtiger/views/ShowWidget.php b/modules/Vtiger/views/ShowWidget.php index fb59dea58..3c4a8db4f 100644 --- a/modules/Vtiger/views/ShowWidget.php +++ b/modules/Vtiger/views/ShowWidget.php @@ -46,7 +46,8 @@ class Vtiger_ShowWidget_View extends Vtiger_IndexAjax_View { if ($request->has('data')) { $widget->set('data', $request->get('data')); } - $widget->add(); + $widget->add(); + $request->set('widgetid', $widget->get('id')); } //Date conversion from user format to database format -- GitLab