| 1 |
<?php /* $Id: install.php $ */ |
|---|
| 2 |
// |
|---|
| 3 |
//This program is free software; you can redistribute it and/or |
|---|
| 4 |
//modify it under the terms of the GNU General Public License |
|---|
| 5 |
//as published by the Free Software Foundation; either version 2 |
|---|
| 6 |
//of the License, or (at your option) any later version. |
|---|
| 7 |
// |
|---|
| 8 |
//This program is distributed in the hope that it will be useful, |
|---|
| 9 |
//but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 10 |
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 11 |
//GNU General Public License for more details. |
|---|
| 12 |
?> |
|---|
| 13 |
<!-- |
|---|
| 14 |
<font color="red"><strong>You have installed the Custom Contexts Module!<BR> |
|---|
| 15 |
</strong></font><BR> |
|---|
| 16 |
--> |
|---|
| 17 |
<?php |
|---|
| 18 |
customcontexts_updatedb(); |
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
//bring db up to date on install/upgrade |
|---|
| 23 |
function customcontexts_updatedb() { |
|---|
| 24 |
global $db; |
|---|
| 25 |
$sql = "ALTER IGNORE TABLE `customcontexts_includes` ADD `timegroupid` INT NULL AFTER `include` ;"; |
|---|
| 26 |
$db->query($sql); |
|---|
| 27 |
$sql = "ALTER IGNORE TABLE `customcontexts_includes_list` ADD `missing` BOOL NOT NULL DEFAULT '0';"; |
|---|
| 28 |
$db->query($sql); |
|---|
| 29 |
$sql = "ALTER IGNORE TABLE `customcontexts_contexts` ADD `dialrules` VARCHAR( 1000 ) NULL;"; |
|---|
| 30 |
$db->query($sql); |
|---|
| 31 |
$sql = "ALTER IGNORE TABLE `customcontexts_includes` ADD `userules` VARCHAR( 10 ) NULL ;"; |
|---|
| 32 |
$db->query($sql); |
|---|
| 33 |
$sql = "ALTER IGNORE TABLE `customcontexts_contexts` ADD `faildestination` VARCHAR( 250 ) NULL , ADD `featurefaildestination` VARCHAR( 250 ) NULL ;"; |
|---|
| 34 |
$db->query($sql); |
|---|
| 35 |
//0.3.0 |
|---|
| 36 |
$sql = "ALTER IGNORE TABLE `customcontexts_contexts` ADD `failpin` VARCHAR( 100 ) NULL , ADD `failpincdr` BOOL NOT NULL DEFAULT '0', ADD `featurefailpin` VARCHAR( 100 ) NULL , ADD `featurefailpincdr` BOOL NOT NULL DEFAULT '0';"; |
|---|
| 37 |
$db->query($sql); |
|---|
| 38 |
//0.3.2 |
|---|
| 39 |
$sql = "ALTER IGNORE TABLE `customcontexts_includes_list` ADD `sort` INT NOT NULL DEFAULT '0';"; |
|---|
| 40 |
$db->query($sql); |
|---|
| 41 |
} |
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
?> |
|---|