Show
Ignore:
Timestamp:
08/29/11 18:34:11 (2 years ago)
Author:
p_lindheimer
Message:

Merged revisions 12185,12190,12192,12194,12214-12215,12218,12256,12294,12305,12383-12384,12424,12434,12455 via svnmerge from
http://www.freepbx.org/v2/svn/modules/branches/2.9

................

r12185 | mickecarlsson | 2011-05-21 15:00:11 -0700 (Sat, 21 May 2011) | 1 line


Closes #5161 fixes bad validation code

................

r12190 | p_lindheimer | 2011-05-24 20:12:30 -0700 (Tue, 24 May 2011) | 1 line


fixes #5175 and fixes #5176 initialize state of feature code and allow enable/disable from within the gui, some sanity testing would be helpful before I publish this widely

................

r12192 | p_lindheimer | 2011-05-25 10:52:02 -0700 (Wed, 25 May 2011) | 1 line


display default code outside of tooltip re #5175 and re #5176

................

r12194 | GameGamer?43 | 2011-05-25 21:53:13 -0700 (Wed, 25 May 2011) | 1 line


closes #5182 - misspelling in tooltip

................

r12214 | mbrevda | 2011-06-06 07:42:06 -0700 (Mon, 06 Jun 2011) | 1 line


merge to 2.9 for #5127, #5054, #5049, #5140

................

r12215 | mbrevda | 2011-06-06 07:56:21 -0700 (Mon, 06 Jun 2011) | 1 line


merge to 2.9 re #5127, #5054, #5049, #5140, #5142

................

r12218 | mbrevda | 2011-06-06 08:16:19 -0700 (Mon, 06 Jun 2011) | 1 line


unervert the unrevert re #5127, #5054, #5049, #5140, #5142

................

r12256 | mbrevda | 2011-06-13 11:33:13 -0700 (Mon, 13 Jun 2011) | 1 line


revert 12255

................

r12294 | p_lindheimer | 2011-07-07 12:29:11 -0700 (Thu, 07 Jul 2011) | 1 line


fixes #5159 don't set to empty quotes, thanks spermega and Lantizia

................

r12305 | mbrevda | 2011-07-17 04:32:10 -0700 (Sun, 17 Jul 2011) | 1 line


re #5262 should resolve

................

r12383 | p_lindheimer | 2011-08-09 12:10:52 -0700 (Tue, 09 Aug 2011) | 9 lines


Merged revisions 12382 via svnmerge from
http://www.freepbx.org/v2/svn/modules/branches/2.8


........

r12382 | p_lindheimer | 2011-08-09 12:07:06 -0700 (Tue, 09 Aug 2011) | 1 line


fixes #5312 don't include in from-internal

........

................

r12384 | p_lindheimer | 2011-08-09 12:17:04 -0700 (Tue, 09 Aug 2011) | 1 line


fixes #5313 delete the record

................

r12424 | mbrevda | 2011-08-19 06:17:52 -0700 (Fri, 19 Aug 2011) | 1 line


closes #5320, call eval on mixmon_dir

................

r12434 | mickecarlsson | 2011-08-21 21:45:22 -0700 (Sun, 21 Aug 2011) | 1 line


Close #5187, add check for offline endpoints in macro-dial-one

................

r12455 | p_lindheimer | 2011-08-29 14:28:53 -0700 (Mon, 29 Aug 2011) | 9 lines


Merged revisions 11567-11569,11572,11754,11896-11897,11899,12018-12019,12233-12234,12382,12385,12387,12452,12454 via svnmerge from
http://www.freepbx.org/v2/svn/modules/branches/2.8


........

r12387 | p_lindheimer | 2011-08-09 15:12:07 -0700 (Tue, 09 Aug 2011) | 1 line


should fix custom trunk destination re #5314 pls test and provide feedback then will put in and merge up

........

................

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.10/timeconditions/functions.inc.php

    r12456 r12460  
    266266  $fcc = new featurecode('timeconditions', 'toggle-mode-'.$id); 
    267267  $c = $fcc->getCodeActive(); 
     268  $results['tcval'] = $fcc->getCode(); 
    268269  unset($fcc); 
    269270  if ($c == '') { 
     
    383384  /* 
    384385  */ 
    385 function timeconditions_create_fc($id, $displayname='') { 
     386function timeconditions_create_fc($id, $displayname='',$state=false) { 
     387  global $astman; 
     388  global $amp_conf; 
     389  $DEVSTATE = $amp_conf['AST_FUNC_DEVICE_STATE']; 
     390 
    386391  $fcc = new featurecode('timeconditions', 'toggle-mode-'.$id); 
    387392  if ($displayname) { 
     
    390395    $fcc->setDescription($id._(": Time Condition Override")); 
    391396  } 
    392   $fcc->setDefault('*27'.$id,false); 
     397  $fcc->setDefault('*27'.$id,$state); 
    393398  $fcc->setProvideDest(); 
    394399  $fcc->update(); 
    395400  unset($fcc);   
     401 
     402  $astman->database_put("TC",$id,''); 
     403  // We do not try to figure out the blf value here, as soon as the call script is called or a call flows through the time 
     404  // condition it will get properly intiialized 
     405  // 
     406  if ($DEVSTATE) { 
     407    $astman->send_request('Command',array('Command'=>"core set global ".$DEVSTATE."(Custom:TC".$id.") NOT_INUSE")); 
     408    $astman->send_request('Command',array('Command'=>"core set global ".$DEVSTATE."(Custom:TCSTICKY".$id.") NOT_INUSE")); 
     409  } 
    396410} 
    397411 
     
    406420  $deptname = $db->escapeSimple($post['deptname']); 
    407421  $generate_hint = $post['generate_hint'] == '1' ? '1' : '0'; 
     422  $override_fc = $post['override_fc'] == '1' ? '1' : '0'; 
    408423 
    409424  if($displayname == '') { 
     
    412427  $results = sql("INSERT INTO timeconditions (displayname,time,truegoto,falsegoto,deptname,generate_hint) values (\"$displayname\",\"$time\",\"$truegoto\",\"$falsegoto\",\"$deptname\",\"$generate_hint\")"); 
    413428  $id = $amp_conf["AMPDBENGINE"] == "sqlite3" ? sqlite_last_insert_rowid($db->connection) : mysql_insert_id($db->connection); 
    414   timeconditions_create_fc($id, $displayname); 
     429  timeconditions_create_fc($id, $displayname, $override_fc); 
     430  return $id; 
    415431} 
    416432 
     
    427443  $deptname = $db->escapeSimple($post['deptname']); 
    428444  $generate_hint = $post['generate_hint'] == '1' ? '1' : '0'; 
     445  $override_fc = $post['override_fc'] == '1' ? '1' : '0'; 
    429446 
    430447  if(empty($displayname)) {  
     
    475492    } 
    476493  } 
     494 
     495  $fcc = new featurecode('timeconditions', 'toggle-mode-'.$id); 
     496  $fcc->setEnabled($override_fc); 
     497  $fcc->update(); 
     498  unset($fcc);   
    477499} 
    478500 
  • modules/branches/2.10/timeconditions/module.xml

    r12445 r12460  
    33  <repo>standard</repo> 
    44  <name>Time Conditions</name> 
    5   <version>2.9.0.6</version> 
     5  <version>2.9.0.7</version> 
    66  <publisher>FreePBX</publisher> 
    77  <license>GPLv2+</license> 
     
    1111  </description> 
    1212  <changelog> 
     13    *2.9.0.7* #5175, #5176 
    1314    *2.9.0.6* #5030, spelling errors 
    1415    *2.9.0.5* #4725 
  • modules/branches/2.10/timeconditions/page.timeconditions.php

    r12445 r12460  
    1717 
    1818$generate_hint = isset($_POST['generate_hint'])?$_POST['generate_hint']:'0'; 
     19$override_fc = isset($_POST['override_fc'])?$_POST['override_fc']:'0'; 
    1920 
    2021$dispnum = "timeconditions"; //used for switch on config.php 
     
    2425switch ($action) { 
    2526  case "add": 
    26     timeconditions_add($_POST); 
     27    $_REQUEST['itemid'] = timeconditions_add($_POST); 
    2728    needreload(); 
    28     redirect_standard(); 
     29    redirect_standard('itemid'); 
    2930  break; 
    3031  case "delete": 
     
    8283    $tccode = ''; 
    8384  } 
     85  $tcval = $thisItem['tcval']; 
    8486?> 
    8587  <form autocomplete="off" name="edit" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return edit_onsubmit();"> 
     
    100102<?php if ($amp_conf['USEDEVSTATE']) { ?> 
    101103  <tr> 
    102   <td><a href="#" class="info"><?php echo _("Generate BLF Hint")?><span><?php echo sprintf(_("If set an Asterisk hint will be created for the override feature code %s associated with this Time Condition that can be used to light BLF buttons on a phone programmed to enable/disable this Time Condition. If not using a BLF it is better to leave this un-checked as additional system resources are required to keep the hint updated. This Feature Code can be found and enabled/disabled on the Feature Codes tab under Time Conditions."),$tccode)?></span></a></td> 
     104  <td><a href="#" class="info"><?php echo _("Generate BLF Hint")?><span><?php echo sprintf(_("If set an Asterisk hint will be created for the override feature code %s associated with this Time Condition that can be used to light BLF buttons on a phone programmed to enable/disable this Time Condition. If not using a BLF it is better to leave this un-checked as additional system resources are required to keep the hint updated. This Feature Code can be found and enabled/disabled on the Feature Codes tab under Time Conditions."),$tcval)?></span></a></td> 
    103105    <td> 
    104106      <input name="generate_hint" type="checkbox" value="1" <?php echo ($generate_hint == '1' ? 'checked' : ''); ?>  tabindex="<?php echo ++$tabindex;?>"/> 
     
    106108  </tr> 
    107109<?php } ?> 
    108  
     110  <tr> 
     111    <td><a href="#" class="info"><?php echo _("Enable Override Code")?><span><?php echo sprintf(_("Check to enable the override feature code %s that allows manual changes to the timecondition."),$tcval)?></span></a></td> 
     112    <td> 
     113      <input name="override_fc" type="checkbox" value="1" <?php echo ($tccode != '' ? 'checked' : ''); ?>  tabindex="<?php echo ++$tabindex;?>"/><?php if ($tcval) { echo "<small>($tcval)</small>"; } ?> 
     114    </td> 
     115  </tr> 
    109116<?php  
    110117  if ($itemid && $thisItem['tcstate'] !== false) { 
     
    136143  </tr> 
    137144  <tr> 
    138     <td><a href="#" class="info"><?php echo _("Change Override:")?><span><?php echo sprintf(_("This Time Condition can be set to Temporarily go to the 'matched' or 'unmatched' destination in which case the override will automatically reset once the current time span has elapsed. If set to Permanent it will stay overridden until manually reset. All overrides can be removed with the Reset Override option. Temporary Overrides can also be toggled with the %s feature code, which will also remove a Permanent Override if set but can not set a Permanent Override which must be done here or with other applications such as an XML based phone options."),$tccode)?></span></a></td> 
     145    <td><a href="#" class="info"><?php echo _("Change Override:")?><span><?php echo sprintf(_("This Time Condition can be set to Temporarily go to the 'matched' or 'unmatched' destination in which case the override will automatically reset once the current time span has elapsed. If set to Permanent it will stay overridden until manually reset. All overrides can be removed with the Reset Override option. Temporary Overrides can also be toggled with the %s feature code, which will also remove a Permanent Override if set but can not set a Permanent Override which must be done here or with other applications such as an XML based phone options."),$tcval)?></span></a></td> 
    139146    <td> 
    140147      <select name="tcstate_new" tabindex="<?php echo ++$tabindex;?>">