2012-12-20 16:22:05 -05:00
|
|
|
<?php
|
2013-05-03 14:44:25 -04:00
|
|
|
/* FreePBX installer file
|
|
|
|
* This file is run when the module is installed through module admin
|
|
|
|
*
|
|
|
|
* Note: install.sql is depreciated and may not work. Its recommended to use this file instead.
|
|
|
|
*
|
|
|
|
* If this file returns false then the module will not install
|
|
|
|
* EX:
|
|
|
|
* return false;
|
|
|
|
*
|
|
|
|
*/
|
2012-12-20 16:22:05 -05:00
|
|
|
$sql = "CREATE TABLE IF NOT EXISTS HelloWorld_settings (
|
2013-05-03 14:44:25 -04:00
|
|
|
`key` varchar(255) NOT NULL default '',
|
|
|
|
`value` varchar(255) NOT NULL default '',
|
|
|
|
PRIMARY KEY (`key`)
|
2012-12-20 16:22:05 -05:00
|
|
|
);";
|
|
|
|
|
2013-05-03 14:44:25 -04:00
|
|
|
$check = sql($sql);
|
2012-12-20 16:22:05 -05:00
|
|
|
if (DB::IsError($check)) {
|
|
|
|
die_freepbx( "Can not create `HelloWorld` table: " . $check->getMessage() . "\n");
|
2013-05-03 14:44:25 -04:00
|
|
|
}
|