From 80cc601da481599a4baaff44160c2308d7002571 Mon Sep 17 00:00:00 2001 From: steve-lad <72376554+steve-lad@users.noreply.github.com> Date: Wed, 2 Jun 2021 08:17:35 +0200 Subject: [PATCH] Update Installer - WIP Add database definitions in module.xml Catch exception if PHP Zip not installed --- install.php | 10 ++++- module.xml | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 119 insertions(+), 5 deletions(-) diff --git a/install.php b/install.php index 1b256cd..1b16c27 100644 --- a/install.php +++ b/install.php @@ -746,7 +746,7 @@ function InstallDB_CreateSccpDeviceConfigView($sccp_compatible) function CreateBackUpConfig() { global $amp_conf; - outn("
  • " . _("Create Config BackUp") . "
  • "); + outn("
  • " . _("Creating Config BackUp") . "
  • "); $cnf_int = \FreePBX::Config(); $backup_files = array('extensions','extconfig','res_mysql', 'res_config_mysql','sccp','sccp_hardware','sccp_extensions'); $backup_ext = array('_custom.conf', '_additional.conf','.conf'); @@ -755,7 +755,13 @@ function CreateBackUpConfig() $fsql = $dir.'/sccp_backup_'.date("Ymd").'.sql'; $result = exec('mysqldump '.$amp_conf['AMPDBNAME'].' --password='.$amp_conf['AMPDBPASS'].' --user='.$amp_conf['AMPDBUSER'].' --single-transaction >'.$fsql, $output); - $zip = new \ZipArchive(); + try { + $zip = new \ZipArchive(); + } catch (\Exception $e) { + outn("
    "); + outn("PHPx.x-zip not installed where x.x is the installed PHP version. Install it before continuing !"); + die_freepbx(); + } $filename = $dir . "/sccp_instal_backup" . date("Ymd"). ".zip"; if ($zip->open($filename, \ZIPARCHIVE::CREATE)) { foreach ($backup_files as $file) { diff --git a/module.xml b/module.xml index bf879e7..8ed6ab6 100644 --- a/module.xml +++ b/module.xml @@ -1,7 +1,7 @@ sccp_manager SCCP Manager - 14.1.0.1 + 14.2.0.1 setup SCCP Connectivity Steve Lad @@ -15,9 +15,10 @@ * Version 13.0.0.1 * - Alfa Release tested on freepbx v.13.0.192.16, v.14.0.1.5 - * Version 13.0.0.2 * - Release tested - * Version 14.0.0.1 * - Alfa Release new DB structure Add User mobility + * Version 13.0.0.2 * - Release tested + * Version 14.0.0.1 * - Alfa Release new DB structure Add User mobility * Version 14.1.0.1 * - Migrated to chan-sccp repo + * Version 14.2.0.1 * - Retired old interface - min chan-sccp v433 @@ -26,4 +27,111 @@ https://github.com/chan-sccp/sccp_manager GPL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + +
    +