Changeset 9423
- Timestamp:
- 03/28/10 06:32:41 (3 years ago)
- Files:
-
- modules/branches/2.8/fax/install.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.8/fax/install.php
r9137 r9423 50 50 } 51 51 } 52 53 //check for 2.6-style tables 54 $sql='describe fax_incoming'; 55 $fields=$db->getAssoc($sql); 56 if(array_key_exists('faxdestination',$fields)){ 57 out(_('Migrating fax_incoming table...')); 58 $sql='alter table fax_incoming 59 change faxdetection detection varchar(20) default NULL, 60 change faxdetectionwait detectionwait varchar(5) default NULL, 61 change faxdestination destination varchar(50) default NULL, 62 add legacy_email varchar(50) default NULL, 63 drop faxenabled, 64 modify extension varchar(50)'; 65 $q=$db->query($sql); 66 if(DB::IsError($q)){ 67 out(_('WARINING: fax_incoming table may still be using the 2.6 schema!')); 68 } else { 69 out(_('Sucsessfuly migraded fax_incoming table!')); 70 } 71 } 72 unset($sql); 73 52 74 /* migrate simu_fax from core to fax module, including in miscdests module in case it is being used as a destination. 53 75 this migration is a bit "messy" but assures that any simu_fax settings or destinations being used in the dialplan … … 94 116 if(!$set['force_detection']){$sql[]='REPLACE INTO fax_details (`key`, `value`) VALUES ("force_detection","no")';} 95 117 96 foreach ($sql as $statement){ 97 $check = $db->query($statement); 98 if (DB::IsError($check)){ 99 die_freepbx( "Can not execute $statement : " . $check->getMessage() . "\n"); 100 } 101 } 102 118 if($sql){ 119 foreach ($sql as $statement){ 120 $check = $db->query($statement); 121 if (DB::IsError($check)){ 122 die_freepbx( "Can not execute $statement : " . $check->getMessage() . "\n"); 123 } 124 } 125 } 103 126 /* 104 127 incoming columns:
