Changeset 10747

Show
Ignore:
Timestamp:
12/29/10 14:00:55 (2 years ago)
Author:
p_lindheimer
Message:

Merged revisions 10637 via svnmerge from
http://www.freepbx.org/v2/svn/modules/branches/bootstrap-2.9

........

r10637 | mbrevda | 2010-11-30 12:18:34 -0800 (Tue, 30 Nov 2010) | 1 line


closes #4655. Thanks Philippe for the breadbord!

........
adds ability to change a conference room number when updating (vs. adding)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.9

    • Property svnmerge-integrated changed from /modules/branches/bootstrap-2.9:1-10625 /modules/branches/2.8:1-10714 to /modules/branches/bootstrap-2.9:1-10625,10637 /modules/branches/2.8:1-10714
  • modules/branches/2.9/announcement/functions.inc.php

    r8038 r10747  
    234234} 
    235235 
     236function announcement_change_destination($old_dest, $new_dest) { 
     237  $sql = 'UPDATE announcement SET post_dest = "' . $new_dest . '" WHERE post_dest= "' . $old_dest . '"'; 
     238  sql($sql, "query"); 
     239} 
    236240?> 
  • modules/branches/2.9/callback/functions.inc.php

    r10565 r10747  
    8282  return $destlist; 
    8383} 
     84 
     85function callback_change_destination($old_dest, $new_dest) { 
     86  $sql = 'UPDATE callback SET destination = "' . $new_dest . '" WHERE destination = "' . $old_dest . '"'; 
     87  sql($sql, "query"); 
     88} 
     89 
    8490 
    8591/*  Generates dialplan for callback 
  • modules/branches/2.9/conferences/page.conferences.php

    r10152 r10747  
    2020 
    2121$account = isset($_REQUEST['account']) ? $_REQUEST['account'] : ''; 
     22$orig_account = isset($_REQUEST['orig_account']) ? $_REQUEST['orig_account'] : ''; 
    2223$music = isset($_REQUEST['music']) ? $_REQUEST['music'] : ''; 
    2324$users = isset($_REQUEST['users']) ? $_REQUEST['users'] : '0'; 
     
    4748    break; 
    4849    case "edit":  //just delete and re-add 
    49       conferences_del($account); 
     50      //check to see if the room number has changed 
     51      if ($orig_account != '' && $orig_account != $account) { 
     52        conferences_del($orig_account); 
     53        $_REQUEST['extdisplay'] = $account;//redirect to the new ext 
     54        $old = conferences_getdest($orig_account); 
     55        $new = conferences_getdest($account); 
     56        framework_change_destination($old[0], $new[0]); 
     57      } else { 
     58        conferences_del($account); 
     59      } 
     60       
    5061      conferences_add($account,$_REQUEST['name'],$_REQUEST['userpin'],$_REQUEST['adminpin'],$_REQUEST['options'],$_REQUEST['joinmsg_id'],$music,$users); 
    5162      needreload(); 
     
    151162  <form autocomplete="off" name="editMM" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return checkConf();"> 
    152163  <input type="hidden" name="display" value="<?php echo $dispnum?>"> 
    153   <input type="hidden" name="action" value="<?php echo ($extdisplay ? 'edit' : 'add') ?>"> 
     164  <input type="hidden" name="action" value="<?php echo ($extdisplay != '' ? 'edit' : 'add') ?>"> 
    154165  <input type="hidden" name="options" value="<?php echo $options; ?>"> 
    155166<?php   if ($extdisplay != ""){ ?> 
    156     <input type="hidden" name="account" value="<?php echo $extdisplay; ?>"> 
     167    <input type="hidden" name="orig_account" value="<?php echo $extdisplay; ?>"> 
    157168<?php   }?> 
    158169  <table> 
    159170  <tr><td colspan="2"><h5><?php echo ($extdisplay != "" ? _("Edit Conference") : _("Add Conference")) ?><hr></h5></td></tr> 
    160171  <tr> 
    161 <?php   if ($extdisplay == ""){ ?> 
    162172    <td><a href="#" class="info"><?php echo _("Conference Number:")?><span><?php echo _("Use this number to dial into the conference.")?></span></a></td> 
    163     <td><input type="text" name="account" value="" tabindex="<?php echo ++$tabindex;?>"></td> 
    164 <?php   } ?> 
     173    <td><input type="text" name="account" value="<?php echo $extdisplay ?>" tabindex="<?php echo ++$tabindex;?>"></td> 
    165174  </tr> 
    166175  <tr> 
  • modules/branches/2.9/core/functions.inc.php

    r10730 r10747  
    43794379} 
    43804380 
     4381function core_change_destination($old_dest, $new_dest) { 
     4382  $sql = 'UPDATE users SET noanswer_dest = "' . $new_dest . '" WHERE noanswer_dest = "' . $old_dest . '"'; 
     4383  sql($sql, "query"); 
     4384   
     4385  $sql = 'UPDATE users SET busy_dest = "' . $new_dest . '" WHERE busy_dest = "' . $old_dest . '"'; 
     4386  sql($sql, "query"); 
     4387   
     4388  $sql = 'UPDATE users SET chanunavail_dest = "' . $new_dest . '" WHERE chanunavail_dest = "' . $old_dest . '"'; 
     4389  sql($sql, "query"); 
     4390   
     4391  $sql = 'UPDATE incoming SET destination = "' . $new_dest . '" WHERE destination = "' . $old_dest . '"'; 
     4392  sql($sql, "query"); 
     4393} 
     4394 
     4395 
    43814396function core_sipname_check($sipname, $extension) { 
    43824397  global $db; 
     
    65136528  return true; 
    65146529} 
    6515  
    65166530?> 
  • modules/branches/2.9/daynight/functions.inc.php

    r10609 r10747  
    438438  } 
    439439  return $destlist; 
     440} 
     441 
     442function daynight_change_destination($old_dest, $new_dest) { 
     443  $sql = 'UPDATE daynight SET dest = "' . $new_dest . '" WHERE dest = "' . $old_dest . '"'; 
     444  sql($sql, "query"); 
    440445} 
    441446 
     
    629634  } 
    630635} 
    631  
    632636?> 
  • modules/branches/2.9/directory/functions.inc.php

    r9897 r10747  
    487487} 
    488488 
     489function directory_change_destination($old_dest, $new_dest) { 
     490  $sql = 'UPDATE directory_details SET invalid_destination = "' . $new_dest . '" WHERE invalid_destination = "' . $old_dest . '"'; 
     491  sql($sql, "query"); 
     492} 
     493 
    489494function directory_getdest($id) { 
    490495  return array("directory,$id,1"); 
     
    530535  } 
    531536} 
    532  
    533537?> 
  • modules/branches/2.9/fax/functions.inc.php

    r10528 r10747  
    5252  } 
    5353  return $destlist; 
     54} 
     55 
     56function fax_change_destination($old_dest, $new_dest) { 
     57  $sql = 'UPDATE fax_incoming SET destination = "' . $new_dest . '" WHERE destination = "' . $old_dest . '"'; 
     58  sql($sql, "query"); 
    5459} 
    5560 
  • modules/branches/2.9/featurecodeadmin/functions.inc.php

    r10608 r10747  
    106106    $text_domain = Array(); 
    107107    foreach ($featurecodes as $result) { 
    108       freepbx_debug($result); 
    109108      // Ignore disabled codes, and modules, and ones not providing destinations 
    110109      // 
  • modules/branches/2.9/ivr/functions.inc.php

    r9793 r10747  
    505505  return $destlist; 
    506506} 
     507 
     508function ivr_change_destination($old_dest, $new_dest) { 
     509  global $db; 
     510  $sql = "UPDATE ivr_dests SET dest = '$new_dest' WHERE dest = '$old_dest'"; 
     511  $db->query($sql); 
     512 
     513} 
    507514?> 
  • modules/branches/2.9/languages/functions.inc.php

    r10732 r10747  
    332332  return $destlist; 
    333333} 
     334 
     335function languages_change_destination($old_dest, $new_dest) { 
     336  $sql = 'UPDATE languages SET dest = "' . $new_dest . '" WHERE dest = "' . $old_dest . '"'; 
     337  sql($sql, "query"); 
     338} 
    334339?> 
  • modules/branches/2.9/miscapps/functions.inc.php

    r6940 r10747  
    149149} 
    150150 
     151function miscapps_change_destination($old_dest, $new_dest) { 
     152  $sql = 'UPDATE miscapps SET dest = "' . $new_dest . '" WHERE dest = "' . $old_dest . '"'; 
     153  sql($sql, "query"); 
     154} 
    151155?> 
  • modules/branches/2.9/queues/functions.inc.php

    r10669 r10747  
    832832} 
    833833 
     834function queue_change_destination($old_dest, $new_dest) { 
     835  $sql = 'UPDATE queues_config SET dest = "' . $new_dest . '" WHERE dest = "' . $old_dest . '"'; 
     836  sql($sql, "query"); 
     837} 
     838 
    834839function queues_check_compoundrecordings() { 
    835840  global $db; 
  • modules/branches/2.9/ringgroups/functions.inc.php

    r10669 r10747  
    353353} 
    354354 
     355function ringgroups_change_destination($old_dest, $new_dest) { 
     356  $sql = 'UPDATE ringgroups SET postdest = "' . $new_dest . '" WHERE postdest = "' . $old_dest . '"'; 
     357  sql($sql, "query"); 
     358} 
     359 
    355360function ringgroups_get($grpnum) { 
    356361  global $db; 
  • modules/branches/2.9/timeconditions/functions.inc.php

    r10609 r10747  
    231231  return $destlist; 
    232232} 
     233 
     234function timeconditions_change_destination($old_dest, $new_dest) { 
     235  $sql = 'UPDATE timeconditions SET truegoto = "' . $new_dest . '" WHERE truegoto = "' . $old_dest . '"'; 
     236  sql($sql, "query"); 
     237   
     238  $sql = 'UPDATE timeconditions SET falsegoto = "' . $new_dest . '" WHERE falsegoto = "' . $old_dest . '"'; 
     239  sql($sql, "query"); 
     240} 
     241 
    233242 
    234243//get the existing meetme extensions 
     
    14051414 
    14061415//---------------------------end stolen from timeconditions------------------------------------- 
    1407  
    14081416?>