Force installer to update sccpdevmodel

Ensure changes in sccpdevmodel are implimented. Update number of burttons on 894X
This commit is contained in:
steve-lad 2021-10-16 15:32:53 +02:00
parent 5bd1455e91
commit 48ace0574a
2 changed files with 140 additions and 136 deletions

View file

@ -500,14 +500,18 @@ function InstallDB_updateSchema($db_config)
}
}
outn("<li>" . _("Total modify count :") . $count_modify . "</li>");
/*
$stmt = $db->prepare('SELECT CASE WHEN EXISTS(SELECT 1 FROM sccpdevmodel) THEN 0 ELSE 1 END AS IsEmpty;');
$stmt->execute();
$result = $stmt->fetchAll(\PDO::FETCH_ASSOC);
if (!$result[0]['IsEmpty']) {
return;
} else {
outn("Populating sccpdevmodel...");
*/
// Force update of sccp devmodel to ensure changes are taken into account
outn("Updating sccpdevmodel...");
outn("<li>" . _("Fill sccpdevmodel") . "</li>");
$sql = "REPLACE INTO sccpdevmodel (model, vendor, dns, buttons, loadimage, loadinformationid, enabled, nametemplate) VALUES
('12 SP', 'CISCO', 1, 1, '', 'loadInformation3', 0, NULL),
@ -556,8 +560,8 @@ function InstallDB_updateSchema($db_config)
('7971', 'CISCO', 1, 2, 'SCCP70.9-4-2SR3-1S', 'loadInformation119', 0, 'SEP0000000000.cnf.xml_797x_template'),
('7975', 'CISCO', 3, 8, 'SCCP75.9-4-2SR3-1S', 'loadInformation437', 0, 'SEP0000000000.cnf.xml_7975_template'),
('7985', 'CISCO', 3, 8, 'cmterm_7985.4-1-7-0', 'loadInformation302', 0, NULL),
('8941', 'CISCO', 1, 1, 'SCCP894x.9-2-2-0', 'loadInformation586', 0, NULL),
('8945', 'CISCO', 1, 1, 'SCCP894x.9-2-2-0', 'loadInformation585', 0, NULL),
('8941', 'CISCO', 1, 4, 'SCCP894x.9-4-2SR1-2', 'loadInformation586', 0, 'SEP0000000000.cnf.xml_797x_template'),
('8945', 'CISCO', 1, 4, 'SCCP894x.9-4-2SR1-2', 'loadInformation585', 0, 'SEP0000000000.cnf.xml_7975_template'),
('ATA 186', 'CISCO', 1, 1, 'ATA030204SCCP090202A', 'loadInformation12', 0, 'SEP0000000000.cnf.xml_ATA_template'),
('ATA 187', 'CISCO', 1, 1, 'ATA187.9-2-3-1', 'loadInformation550', 0, 'SEP0000000000.cnf.xml_ATA_template'),
('CN622', 'MOTOROLA', 1, 1, '', 'loadInformation335', 0, NULL),
@ -641,7 +645,7 @@ function InstallDB_updateSchema($db_config)
if (DB::IsError($check)) {
die_freepbx("Can not create sccpdevmodel table, error:$check\n");
}
}
//}
return;
}

View file

@ -1,7 +1,7 @@
<module>
<rawname>sccp_manager</rawname>
<name>SCCP Manager</name>
<version>14.3.0.12</version>
<version>14.3.0.13</version>
<type>setup</type>
<category>SCCP Connectivity</category>
<publisher>Steve Lad, Alex GP</publisher>