Changeset 12284

Show
Ignore:
Timestamp:
06/29/11 05:46:32 (2 years ago)
Author:
mbrevda
Message:

re #5170 - more migration tweaks

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.10/ivr/install.php

    r12281 r12284  
    340340        if ($i['invalid_loops'] < 0) { 
    341341          $ivr[$my]['invalid_loops'] = 'disabled'; 
     342          $ivr[$my]['invalid_retry_recording'] = ''; 
     343          $ivr[$my]['invalid_recording'] = ''; 
     344          $ivr[$my]['invalid_destination'] = ''; 
    342345 
    343346        //if there are zero disabled loops, we dont need a retry recording 
    344347        } elseif ($i['invalid_loops'] === 0) { 
    345348          $ivr[$my]['invalid_retry_recording'] = ''; 
     349          $ivr[$my]['invalid_recording'] = 'default'; 
    346350 
    347351        //otherwise, set invalid retry to the save as invalid_recording 
    348352        } elseif ($i['invalid_loops'] > 0) { 
    349353          $ivr[$my]['invalid_retry_recording'] = $i['invalid_recording']; 
     354          $ivr[$my]['invalid_recording'] = 'default'; 
    350355        } 
    351356 
     
    361366      //if we have an invalid destination in entires, move it here 
    362367      if (isset($e[$i['id']]['t']) && $e[$i['id']]['t']) { 
    363         $ivr[$my]['timeout_destination'] = $e[$i['id']]['i']['dest']; 
     368        $ivr[$my]['timeout_destination'] = $e[$i['id']]['t']['dest']; 
    364369 
    365370        //if there are no timeout loops, set to disabled 
    366371        if ($i['timeout_loops'] < 0) { 
    367372          $ivr[$my]['timeout_loops'] = 'disabled'; 
     373          $ivr[$my]['timeout_retry_recording'] = ''; 
     374          $ivr[$my]['timeout_recording'] = ''; 
     375          $ivr[$my]['timeout_destination'] = ''; 
    368376 
    369377        //if there are zero disabled loops, we dont need a retry recording 
    370378        } elseif ($i['timeout_loops'] === 0) { 
    371379          $ivr[$my]['timeout_retry_recording'] = ''; 
    372  
     380          $ivr[$my]['timeout_recording'] = 'default'; 
     381           
    373382        //otherwise, set timeout retry to the save as invalid_recording 
    374383        } elseif ($i['timeout_loops'] > 0) { 
    375384          $ivr[$my]['timeout_retry_recording'] = $i['timeout_recording']; 
     385          $ivr[$my]['timeout_recording'] = 'default'; 
    376386        } 
    377387 
     
    398408  } 
    399409   
     410  //remove all legacy t or i dests 
     411  sql('DELETE FROM ivr_entries WHERE selection IN("t", "i")'); 
     412   
    400413  out('Migration 2.10 done!'); 
    401414}  
  • modules/branches/2.10/ivr/uninstall.php

    r12274 r12284  
    11<?php 
    22sql('DROP TABLE IF EXISTS ivr_details'); 
    3 sql('DROP TABLE IF EXISTS ivr_entires'); 
     3sql('DROP TABLE IF EXISTS ivr_entries'); 
    44 
    55if (function_exists('queues_ivr_delete_event')) {