From 22dff2511dd7acd12b0ef373f758e73140fa58ea Mon Sep 17 00:00:00 2001 From: Luca Date: Thu, 3 May 2018 12:53:30 +0200 Subject: [PATCH] =?UTF-8?q?Aggiunta=20possibilit=C3=A0=20di=20specificare?= =?UTF-8?q?=20porta=20servizio=20mysql=20+=20help=20text=20per=20plugins?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config.example.php | 1 + include/configuration.php | 2 +- include/manager.php | 3 ++- src/Database.php | 5 ++++- update/2_4_1.sql | 8 +++++++- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/config.example.php b/config.example.php index 6beba5d7e..9b411ee4e 100644 --- a/config.example.php +++ b/config.example.php @@ -5,6 +5,7 @@ $db_host = '|host|'; $db_username = '|username|'; $db_password = '|password|'; $db_name = '|database|'; +//$port = '|port|'; // Percorso della cartella di backup $backup_dir = __DIR__.'/backup/'; diff --git a/include/configuration.php b/include/configuration.php index a87c3735b..62d8cee51 100644 --- a/include/configuration.php +++ b/include/configuration.php @@ -483,7 +483,7 @@ if (empty($creation) && (!file_exists('config.inc.php') || !$valid_config)) { // PARAMETRI echo '
- '.tr('Aiuto').' + '.tr('Aiuto').'

'.tr('Non hai ancora configurato OpenSTAManager').'.

'.tr('Configura correttamente il software con i seguenti parametri (modificabili successivamente dal file _FILE_)', [ diff --git a/include/manager.php b/include/manager.php index c0430b7e1..2354a6a42 100644 --- a/include/manager.php +++ b/include/manager.php @@ -19,7 +19,8 @@ if (!empty($id_plugin)) { echo '

- '.$element['name']; + + '.$element['title'].(!empty($element['help']) ? ' ' : '').''; if (file_exists($docroot.'/plugins/'.$element['directory'].'/add.php')) { echo ' diff --git a/src/Database.php b/src/Database.php index ce613f5b8..fb96791bd 100644 --- a/src/Database.php +++ b/src/Database.php @@ -56,7 +56,10 @@ class Database extends Util\Singleton $host = $temp[0]; $port = !empty($temp[1]) ? $temp[1] : null; } - + + //possibilità di specificare una porta per il servizio mysql diversa dalla standard 3306 + $port = (!empty(App::getConfig()['port'])) ? App::getConfig()['port'] : $port; + $this->host = $host; if (!empty($port) && is_int($port * 1)) { $this->port = $port; diff --git a/update/2_4_1.sql b/update/2_4_1.sql index 89e714c6c..100232484 100644 --- a/update/2_4_1.sql +++ b/update/2_4_1.sql @@ -25,4 +25,10 @@ UPDATE `zz_group_module` SET `name` = 'Mostra interventi ai clienti coinvolti' W UPDATE `zz_plugins` SET `enabled` = '1' WHERE `zz_plugins`.`name` = 'Pianificazione fatturazione'; -- Abilito widget Rate contrattuali in dashboard -UPDATE `zz_widgets` SET `enabled` = '1' WHERE `zz_widgets`.`name` = 'Rate contrattuali'; \ No newline at end of file +UPDATE `zz_widgets` SET `enabled` = '1' WHERE `zz_widgets`.`name` = 'Rate contrattuali'; + +-- Help text per i plugins +ALTER TABLE `zz_plugins` ADD `help` VARCHAR(255) NOT NULL AFTER `directory`; + +-- Help text per plugin Ddt del cliente +UPDATE `zz_plugins` SET `help` = 'Righe ddt del cliente. I ddt senza righe non saranno visualizzati.' WHERE `zz_plugins`.`name` = 'Ddt del cliente'; \ No newline at end of file