Changeset 10635

Show
Ignore:
Timestamp:
11/29/10 17:21:23 (2 years ago)
Author:
p_lindheimer
Message:

Merged revisions 10416-10493,10495-10634 via svnmerge from
http://www.freepbx.org/v2/svn/freepbx/branches/2.8

........

r10443 | mbrevda | 2010-10-24 10:49:06 -0700 (Sun, 24 Oct 2010) | 1 line


re #4603 - no need to connect to asterisk to archive recoded calls

........

r10453 | p_lindheimer | 2010-11-01 10:34:27 -0700 (Mon, 01 Nov 2010) | 1 line


fixes #4615 XSS to Module Admin

........

r10513 | GameGamer?43 | 2010-11-01 15:39:24 -0700 (Mon, 01 Nov 2010) | 1 line


closes #4616 - if trunk, assume 1.8 not 1.6

........

r10602 | p_lindheimer | 2010-11-20 13:13:57 -0800 (Sat, 20 Nov 2010) | 1 line


undefined variable could be resulting in hints not being defined when in DYNAMICHINTS mode

........

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/trunk

    • Property svnmerge-integrated changed from /freepbx/branches/2.8:1-10415 to /freepbx/branches/2.8:1-10634
  • freepbx/trunk/amp_conf/bin/archive_recordings

    r10122 r10635  
    33 
    44define("AMP_CONF", "/etc/amportal.conf"); 
    5 define("PHP_ASMANAGER", "php-asmanager.php"); 
    65define("MONITOR_DIR", "/var/spool/asterisk/monitor"); 
    76 
     
    4746    'USECATEGORIES' => true, 
    4847    'ASTETCDIR' => '/etc/asterisk', 
    49     'ASTMANAGERPORT' => '5038', 
    5048    'CDRDBNAME' => 'asteriskcdrdb', 
    5149    ); 
     
    242240    $cdrRecord['extension']=substr($cdrRecord['dstchannel'],strpos($cdrRecord['dstchannel'],"/")+1,(strpos($cdrRecord['dstchannel'],"-")-strpos($cdrRecord['dstchannel'],"/")-1)); //cut out the channel number 
    243241    outn("Checking if ".$cdrRecord['extension']." has recordings enabled.."); 
    244     $extrecord = check_recording_option($cdrRecord['extension']); 
    245242    $cdrRecord['direction']="in"; 
    246     if ($extrecord == "ENABLED") { 
    247       out("YES"); 
    248     } else { 
    249       out("NO"); 
    250       unset($cdrRecord['extension']); 
    251     } 
    252243  } else if (strpos($calltype,"queue") === 0) { 
    253244    if($debug) debug("Getting queue destination from dst: ".$cdrRecord['dst']); 
     
    262253  return($cdrRecord); 
    263254} 
    264  
    265  
    266 function check_recording_option($extension) { 
    267   global $amp_conf; 
    268   global $astman; 
    269  
    270   if ($astman) { 
    271     return $astman->database_get("RECORD-IN",$extension); 
    272   } else { 
    273     fatal("Cannot connect to Asterisk Manager with ".$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"]);   
    274   } 
    275    
    276 } 
    277  
    278255 
    279256// Create list of all files  
     
    412389out("OK"); 
    413390 
    414 // **** Make sure we have php-asmanager.php, and include it 
    415  
    416 outn("Checking for PHP_ASMANAGER.."); 
    417 $myfile = $amp_conf['AMPWEBROOT'] . "/admin/common/" .  PHP_ASMANAGER ; 
    418 if (! @ include( $myfile  ) ) { 
    419   out("FAILED"); 
    420   fatal("Cannot include $myfile"); 
    421 } 
    422 out("OK"); 
    423  
    424 // **** now make the global manager connection 
    425 $astman = new AGI_AsteriskManager(); 
    426 $res = $astman->connect("127.0.0.1", $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"] ); 
    427 if (!$res) { 
    428   fatal("Cannot connect to Asterisk Manager with ".$amp_conf["AMPMGRUSER"]."/".$amp_conf["AMPMGRPASS"]); 
    429 } 
    430  
    431  
    432391// **** Connect to database 
    433392outn("Connecting to database.."); 
  • freepbx/trunk/amp_conf/bin/generate_hints.php

    r10381 r10635  
    9292 
    9393    $device_array = explode( '&', $devices ); 
     94    $dialstring = ''; 
    9495    foreach ($device_array as $adevice) { 
    9596      $dds = $astman->database_get('DEVICE',$adevice.'/dial'); 
  • freepbx/trunk/amp_conf/htdocs/admin/functions.inc.php

    r10578 r10635  
    155155        return array('engine'=>'asterisk', 'version' => $matches[1].'.'.$matches[4], 'additional' => $matches[4], 'raw' => $verinfo); 
    156156      } elseif (preg_match('/Asterisk SVN-trunk-r(-?(\S*))/', $verinfo, $matches)) { 
    157         return array('engine'=>'asterisk', 'version' => '1.6', 'additional' => $matches[1], 'raw' => $verinfo); 
     157        return array('engine'=>'asterisk', 'version' => '1.8', 'additional' => $matches[1], 'raw' => $verinfo); 
    158158      } elseif (preg_match('/Asterisk SVN-.+-(\d+(\.\d+)*)-r(-?(\S*))-(.+)/', $verinfo, $matches)) { 
    159159        return array('engine'=>'asterisk', 'version' => $matches[1], 'additional' => $matches[3], 'raw' => $verinfo); 
  • freepbx/trunk/amp_conf/htdocs/admin/page.modules.php

    r10442 r10635  
    1414 
    1515$extdisplay = isset($_REQUEST['extdisplay'])?$_REQUEST['extdisplay']:''; 
    16 $module_repo = isset($_REQUEST['module_repo'])?$_REQUEST['module_repo']:'supported'; 
     16$module_repo = isset($_REQUEST['module_repo'])?htmlentities($_REQUEST['module_repo']):'supported'; 
    1717$repo = "http://mirror.freepbx.org/"; 
    1818if ($module_repo == "extended") { 
     
    2121 
    2222// can't go online if external management is on 
    23 $online = (isset($_REQUEST['online']) && !EXTERNAL_PACKAGE_MANAGEMENT) ? $_REQUEST['online'] : false
     23$online = (isset($_REQUEST['online']) && !EXTERNAL_PACKAGE_MANAGEMENT) ? 1 : 0
    2424 
    2525// fix php errors from undefined variable. Not sure if we can just change the reference below to use 
    2626// online since it changes values so just setting to what we decided it is here. 
    27 $_REQUEST['online'] = $online ? 1 : 0; 
    2827 
    2928$moduleaction = isset($_REQUEST['moduleaction'])?$_REQUEST['moduleaction']:false; 
     
    126125    freepbx_modal_hide('moduleBox'); 
    127126    if (goback) { 
    128       location.href = 'config.php?display=modules&amp;type=<?php echo $type ?>&amp;online=<?php echo ($_REQUEST['online']?1:0); ?>'; 
     127      location.href = 'config.php?display=modules&amp;type=<?php echo $type ?>&amp;online=<?php echo $online; ?>'; 
    129128    } 
    130129  } 
     
    153152  if ($module_getonlinexml_error) { 
    154153    echo "<div class=\"warning\"><p>".sprintf(_("Warning: Cannot connect to online repository (%s). Online modules are not available."), "mirror.freepbx.org")."</p></div><br />"; 
    155     $online = false
     154    $online = 0
    156155    unset($modules_online); 
    157156  } else if (!is_array($modules_online)) { 
    158157    echo "<div class=\"warning\"><p>".sprintf(_("Warning: Error retrieving updates from online repository (%s). Online modules are not available."), "mirror.freepbx.org")."</p></div><br />"; 
    159     $online = false
     158    $online = 0
    160159    unset($modules_online); 
    161160  } else { 
     
    280279      echo "\t<a href=\"#\" onclick=\"parent.close_module_actions(true);\" />"._("Return")."</a>"; 
    281280    } else { 
    282       echo "\t<input type=\"button\" value=\""._("Return")."\" onclick=\"location.href = 'config.php?display=modules&amp;type=$type&amp;online=".($_REQUEST['online']?1:0)."';\" />"; 
     281      echo "\t<input type=\"button\" value=\""._("Return")."\" onclick=\"location.href = 'config.php?display=modules&amp;type=$type&amp;online=".$online."';\" />"; 
    283282    echo "</div>"; 
    284283    } 
     
    447446      echo "<p>"._("Please select at least one action to perform by clicking on the module, and selecting an action on the \"Action\" tab.")."</p>"; 
    448447    } 
    449     echo "\t<input type=\"button\" value=\""._("Cancel")."\" onclick=\"location.href = 'config.php?display=modules&amp;type=$type&amp;online=".($_REQUEST['online']?1:0)."';\" />"; 
     448    echo "\t<input type=\"button\" value=\""._("Cancel")."\" onclick=\"location.href = 'config.php?display=modules&amp;type=$type&amp;online=$online';\" />"; 
    450449    echo "</form>"; 
    451450