From b52971d0a224c6de4f13d520ad1c548f246c0829 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 12 Jun 2017 16:00:38 +0200 Subject: [PATCH] Fix template --- .../template/class/actions_mymodule.class.php | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/htdocs/modulebuilder/template/class/actions_mymodule.class.php b/htdocs/modulebuilder/template/class/actions_mymodule.class.php index 7f1897c80ae..a3ba3baeaad 100644 --- a/htdocs/modulebuilder/template/class/actions_mymodule.class.php +++ b/htdocs/modulebuilder/template/class/actions_mymodule.class.php @@ -29,6 +29,20 @@ */ class ActionsMyModule { + /** + * @var DoliDB Database handler. + */ + public $db; + /** + * @var string Error + */ + public $error = ''; + /** + * @var array Errors + */ + public $errors = array(); + + /** * @var array Hook results. Propagated to $hookmanager->resArray for later reuse */ @@ -39,16 +53,13 @@ class ActionsMyModule */ public $resprints; - /** - * @var array Errors - */ - public $errors = array(); /** * Constructor */ - public function __construct() + public function __construct($db) { + $this->db = $db; } /**