Ticket #1784: sqlite3-new.patch
| File sqlite3-new.patch, 3.1 kB (added by diego_iastrubni, 1 year ago) |
|---|
-
install.sql
old new -
module.xml
old new 1 1 <module> 2 2 <rawname>disa</rawname> 3 3 <name>DISA</name> 4 <version>2. 2</version>4 <version>2.3</version> 5 5 <type>setup</type> 6 6 <category>Remote Access</category> 7 7 <menuitems> 8 8 <disa>DISA</disa> 9 9 </menuitems> 10 10 <description>DISA Allows you 'Direct Inward System Access'. This gives you the ability to have an option on an IVR that gives you a dial tone, and you're able to dial out from the freePBX machine as if you were connected to a standard extension. It appears as a Destination.</description> 11 <changelog>*2.2* First release for FreePBX 2.2 - Fixed compatibility issue with new UI</changelog> 11 <changelog> 12 *2.3* Add SQLite3 support, fixes http://freepbx.org/trac/ticket/1784 13 *2.2* First release for FreePBX 2.2 - Fixed compatibility issue with new UI 14 </changelog> 12 15 <location>release/2.2/disa-2.2.tgz</location> 13 16 <info>http://aussievoip.com.au/wiki/freePBX-DISA</info> 14 17 <md5sum>252f44814486f33bb06b71485678c79f</md5sum> -
uninstall.sql
old new -
install.php
old new 1 1 <?php 2 2 3 3 global $db; 4 global $amp_conf; 4 5 6 $autoincrement = (($amp_conf["AMPDBENGINE"] == "sqlite") || ($amp_conf["AMPDBENGINE"] == "sqlite3")) ? "AUTOINCREMENT":"AUTO_INCREMENT"; 7 8 $sql = "CREATE TABLE IF NOT EXISTS manager ( 9 `manager_id` INTEGER NOT NULL PRIMARY KEY $autoincrement, 10 `name` VARCHAR( 15 ) NOT NULL , 11 `secret` VARCHAR( 50 ) , 12 `deny` VARCHAR( 255 ) , 13 `permit` VARCHAR( 255 ) , 14 `read` VARCHAR( 50 ) , 15 `write` VARCHAR( 50 ) 16 )"; 17 18 $sql = "CREATE TABLE IF NOT EXISTS disa ( 19 disa_id INTEGER NOT NULL PRIMARY KEY $autoincrement, 20 displayname VARCHAR( 50 ), 21 pin VARCHAR ( 50 ), 22 cid VARCHAR ( 50 ), 23 context VARCHAR ( 50 ), 24 digittimeout INTEGER, 25 resptimeout INTEGER, 26 needconf VARCHAR( 10 ) 27 );"; 28 29 $check = $db->query($sql); 30 if (DB::IsError($check)) { 31 die( "Can not create `disa` table: " . $check->getMessage() . "\n"); 32 } 33 5 34 // Manage upgrade from DISA 1.0 6 35 // r2.0 Add Timeouts and add wait for confirmation 7 36 $sql = "SELECT digittimeout FROM disa"; 8 37 $check = $db->getRow($sql, DB_FETCHMODE_ASSOC); 9 if (DB::IsError($check)) {38 if (DB::IsError($check)) { 10 39 // add new fields - Digit Timeout 11 40 $sql = 'ALTER TABLE disa ADD COLUMN digittimeout INT DEFAULT "5"'; 12 41 $result = $db->query($sql); … … 26 55 } 27 56 } 28 57 29 30 58 ?>
