Changeset 3036

Show
Ignore:
Timestamp:
11/08/06 18:51:17 (7 years ago)
Author:
qldrob
Message:

Merged revisions 2995-2999,3005-3007,3011,3013-3033 via svnmerge from
https://svn.sourceforge.net/svnroot/amportal/freepbx/trunk

........

r3016 | p_lindheimer | 2006-11-06 14:03:10 +1000 (Mon, 06 Nov 2006) | 1 line


var call_confirmation should be use_confirmation

........

r3018 | gregmac | 2006-11-06 15:00:40 +1000 (Mon, 06 Nov 2006) | 2 lines


Logo changed to small version (this was supposed to be done long ago.. grr sf SVN)

........

r3023 | gregmac | 2006-11-08 02:50:58 +1000 (Wed, 08 Nov 2006) | 2 lines


Warnings for using default passwords

........

r3024 | gregmac | 2006-11-08 02:55:15 +1000 (Wed, 08 Nov 2006) | 2 lines


Rename get_headers to get_headers_assoc (#1286)

........

r3025 | gregmac | 2006-11-08 04:16:34 +1000 (Wed, 08 Nov 2006) | 2 lines


Added warnings for disabled modules, revised look of warning text on config page

........

r3028 | qldrob | 2006-11-08 15:10:49 +1000 (Wed, 08 Nov 2006) | 2 lines


Revert my previous good idea of rebuilding astdb on install. We should probably have a button that does it somewhere. Addresses #1292

........

r3029 | qldrob | 2006-11-08 15:25:32 +1000 (Wed, 08 Nov 2006) | 2 lines


Address PHP5 incompatibility in #1285, can't use HTTP_SESSION_VARS any more.

........

r3030 | qldrob | 2006-11-08 17:48:45 +1000 (Wed, 08 Nov 2006) | 2 lines


Revert to r2240 with OUTKEEPCID changes. Sorry, philippe! 8)

........

r3031 | qldrob | 2006-11-08 20:26:31 +1000 (Wed, 08 Nov 2006) | 2 lines


Fix typo in reversion.

........

r3033 | p_lindheimer | 2006-11-09 02:46:48 +1000 (Thu, 09 Nov 2006) | 1 line


missing values in globals #1299

........

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/2.2

    • Property svnmerge-integrated changed from /freepbx/trunk:1-2993,2995-3012 to /freepbx/trunk:1-2993,2995-3033
  • freepbx/branches/2.2/amp_conf/astetc/extensions.conf

    r2895 r3036  
    693693; macro-user-callerid should be called _before_ using this macro 
    694694[macro-outbound-callerid] 
     695; Keep the original CallerID number, for failover to the next trunk. 
    695696exten => s,1,GotoIf($["${REALCALLERIDNUM:1:2}" != ""]?start) 
    696697exten => s,n,Set(REALCALLERIDNUM=${CALLERID(number)}) 
    697698exten => s,n(start),NoOp(REALCALLERIDNUM is ${REALCALLERIDNUM}) 
    698699 
    699 ; If this came through a ringgroup or CF, then we want to retain original CID 
    700 ; unless there's a TRUNK OVERRIDE. Coz that's usually there because their VSP 
    701 ; or PSTN provider can only accept a limited range of CID's on outbound calls. 
    702  
    703 exten => s,n,Set(TRUNKOUTCID=${OUTCID_${ARG1}}) 
    704 exten => s,n,GotoIf($["${TRUNKOUTCID:1:2}"!=""]?trunkcid) ; Don't set USEROUTCID, so UserCID won't be matched. 
    705  
    706 exten => s,n,GotoIf($["${KEEPCID}" != "TRUE"]?normcid) ;Dialparties sets this to TRUE if coming from ringgroups, CF, etc. 
     700; If this came through a ringgroup or CF, then we want to retain original CID unless 
     701; OUTKEEPCID_${trunknum} is set. 
     702
     703exten => s,n,GotoIf($["${KEEPCID}" != "TRUE"]?normcid) ;Set to TRUE if coming from ringgroups, CF, etc. 
     704exten => s,n,GotoIf($["x${OUTKEEPCID_${ARG1}}"!="xon"]?normcid) 
    707705exten => s,n,GotoIf($["foo${REALCALLERIDNUM}" = "foo"]?normcid) ;if not set to anything, go through normal processing 
    708706exten => s,n,Set(USEROUTCID=${REALCALLERIDNUM}) 
    709707 
    710 ; We now have to make sure the CID is valid. If we find an AMPUSER with the same CID, we assume it is an internal 
    711 ; call (would be quite a conincidence if not) and go through the normal processing to get that CID. If a device 
    712 ; is set for this CID, then it must be internal 
    713 ; 
    714 exten => s,n,GotoIf($["foo${DB(AMPUSER/${REALCALLERIDNUM}/device)}" = "foo"]?bypass:normcid) 
     708; We now have to make sure the CID is valid. If we find an AMPUSER with the same CID, we assume it is an internal  
     709; call (would be quite a conincidence if not) and go through the normal processing to get that CID. If a device  
     710; is set for this CID, then it must be internal  
     711;  
     712exten => s,n,GotoIf($["foo${DB(AMPUSER/${REALCALLERIDNUM}/device)}" = "foo"]?bypass:normcid)  
    715713 
    716714exten => s,n(normcid),Set(USEROUTCID=${DB(AMPUSER/${REALCALLERIDNUM}/outboundcid)}) 
    717715exten => s,n(bypass),Set(EMERGENCYCID=${DB(DEVICE/${REALCALLERIDNUM}/emergency_cid)}) 
     716exten => s,n,Set(TRUNKOUTCID=${OUTCID_${ARG1}}) 
    718717exten => s,n,GotoIf($["${EMERGENCYROUTE:1:2}" = ""]?trunkcid) ; check EMERGENCY ROUTE 
    719718exten => s,n,GotoIf($["${EMERGENCYCID:1:2}" = ""]?trunkcid) ; empty EMERGENCY CID, so default back to trunk 
  • freepbx/branches/2.2/amp_conf/bin/retrieve_conf

    r2993 r3036  
    361361  } 
    362362} 
    363  
    364 // Finally, if this is an install, re-generate ASTDB entries, as they could be restoring from backup,  
    365 // just rebuilt the machine, blah blah.  
    366 if ($run_install) { 
    367   outn("Re-propogating internal device/extensions database..."); 
    368   core_users2astdb(); 
    369   core_devices2astdb(); 
    370   out("OK"); 
    371 } 
    372    
    373363 
    374364 
  • freepbx/branches/2.2/amp_conf/htdocs/admin/cdr/call-comp.php

    r2418 r3036  
    198198//enforce restrictions for this AMP User 
    199199session_start(); 
    200 $AMP_CLAUSE = $HTTP_SESSION_VARS['AMP_SQL']; 
     200$AMP_CLAUSE = $_SESSION['AMP_SQL']; 
    201201if (!isset($AMP_CLAUSE)) { 
    202202        $AMP_CLAUSE = " AND src = 'NeverReturnAnything'"; 
  • freepbx/branches/2.2/amp_conf/htdocs/admin/cdr/call-daily-load.php

    r2418 r3036  
    177177//enforce restrictions for this AMP User 
    178178session_start(); 
    179 $AMP_CLAUSE = $HTTP_SESSION_VARS['AMP_SQL']; 
     179$AMP_CLAUSE = $_SESSION['AMP_SQL']; 
    180180if (!isset($AMP_CLAUSE)) { 
    181181        $AMP_CLAUSE = " AND src = 'NeverReturnAnything'"; 
  • freepbx/branches/2.2/amp_conf/htdocs/admin/cdr/call-last-month.php

    r2418 r3036  
    191191//enforce restrictions for this AMP User 
    192192session_start(); 
    193 $AMP_CLAUSE = $HTTP_SESSION_VARS['AMP_SQL']; 
     193$AMP_CLAUSE = $_SESSION['AMP_SQL']; 
    194194if (!isset($AMP_CLAUSE)) { 
    195195        $AMP_CLAUSE = " AND src = 'NeverReturnAnything'"; 
  • freepbx/branches/2.2/amp_conf/htdocs/admin/cdr/call-log.php

    r3007 r3036  
    252252//enforce restrictions for this AMP User 
    253253session_start(); 
    254 $AMP_CLAUSE = $HTTP_SESSION_VARS['AMP_SQL']; 
     254$AMP_CLAUSE = $_SESSION['AMP_SQL']; 
    255255if (!isset($AMP_CLAUSE)) { 
    256256        $AMP_CLAUSE = " AND src = 'NeverReturnAnything'"; 
  • freepbx/branches/2.2/amp_conf/htdocs/admin/cdr/graph_hourdetail.php

    r2418 r3036  
    137137//enforce restrictions for this AMP User 
    138138session_start(); 
    139 $AMP_CLAUSE = $HTTP_SESSION_VARS['AMP_SQL']; 
     139$AMP_CLAUSE = $_SESSION['AMP_SQL']; 
    140140if (!isset($AMP_CLAUSE)) { 
    141141  $AMP_CLAUSE = " AND src = 'NeverReturnAnything'"; 
  • freepbx/branches/2.2/amp_conf/htdocs/admin/cdr/graph_pie.php

    r2418 r3036  
    180180  //enforce restrictions for this AMP User 
    181181  session_start(); 
    182   $AMP_CLAUSE = $HTTP_SESSION_VARS['AMP_SQL']; 
     182  $AMP_CLAUSE = $_SESSION['AMP_SQL']; 
    183183  if (!isset($AMP_CLAUSE)) { 
    184184    $AMP_CLAUSE = " AND src = 'NeverReturnAnything'"; 
  • freepbx/branches/2.2/amp_conf/htdocs/admin/cdr/graph_stat.php

    r2418 r3036  
    147147//enforce restrictions for this AMP User 
    148148session_start(); 
    149 $AMP_CLAUSE = $HTTP_SESSION_VARS['AMP_SQL']; 
     149$AMP_CLAUSE = $_SESSION['AMP_SQL']; 
    150150if (!isset($AMP_CLAUSE)) { 
    151151        $AMP_CLAUSE = " AND src = 'NeverReturnAnything'"; 
  • freepbx/branches/2.2/amp_conf/htdocs/admin/cdr/graph_statbar.php

    r2418 r3036  
    148148//enforce restrictions for this AMP User 
    149149session_start(); 
    150 $AMP_CLAUSE = $HTTP_SESSION_VARS['AMP_SQL']; 
     150$AMP_CLAUSE = $_SESSION['AMP_SQL']; 
    151151if (!isset($AMP_CLAUSE)) { 
    152152  $AMP_CLAUSE = " AND src = 'NeverReturnAnything'"; 
  • freepbx/branches/2.2/amp_conf/htdocs/admin/common/mainstyle.css

    r3011 r3036  
    7171 
    7272.warning { 
    73   padding:5px 20px; 
     73  padding:10px 10px 0 10px; 
     74  margin:5px 0; 
    7475  background:rgb(255,242,202); 
     76  border:1px dotted #ccc; 
     77} 
     78.warning p { 
     79  margin-top: 0; 
     80  margin-bottom:10px; 
    7581} 
    7682 
  • freepbx/branches/2.2/amp_conf/htdocs/admin/config.php

    r3011 r3036  
    277277    if ($astman) { 
    278278      printf( "<h2>%s</h2>", dgettext("welcome page", "Welcome to freePBX.") ); 
     279 
     280      $modules_needup = module_getinfo(false, MODULE_STATUS_NEEDUPGRADE); 
     281      $modules_broken = module_getinfo(false, MODULE_STATUS_BROKEN); 
     282      if (count($modules_needup) || count($modules_broken)) { 
     283        echo "<div class=\"warning\">"; 
     284        if (count($modules_needup)) { 
     285          echo "<p>"._("Warning: The following modules are disabled because they need upgrading: "); 
     286          echo implode(", ",array_keys($modules_needup)); 
     287          echo "</p>"; 
     288        } 
     289        if (count($modules_broken)) { 
     290          echo "<p>"._("Warning: The following modules are disabled because they are broken: "); 
     291          echo implode(", ",array_keys($modules_broken)); 
     292          echo "</p>"; 
     293        } 
     294        echo "<p>", sprintf(dgettext("welcome page","You should go to the <a href='%s'>Module Admin</a> page to fix these.</p>"), "config.php?display=modules&amp;type=tool"); 
     295        echo "</div>"; 
     296      } 
     297       
    279298// BETA code - remove later. 
    280299      echo "<div class=\"warning\">"; 
     
    285304 
    286305      printf( "<!--[if IE]><p>%s</p><![endif]-->"  , dgettext("welcome page", "Note, presently, Microsoft's Internet Explorer is <b>not</b> a supported web browser, and you must use a standards compliant browser, such as Firefox. There is a link on the <a href='http://www.freepbx.org'>right hand side of freePBX.org</a> that will allow you to download Firefox easily. By using that link, Google will donate US$1 to the freePBX project.") ); 
     306       
     307      if ($amp_conf['AMPMGRPASS'] == 'amp111') { 
     308        printf( "<div class=\"warning\"><p>%s</p></div>", dgettext("welcome text", "Warning: You are running freePBX and ").$amp_conf['AMPENGINE'].dgettext("welcome page", " with the default manager pass. You should consider changing this to something else.") ); 
     309      } 
     310      if ($amp_conf['AMPDBPASS'] == 'amp109') { 
     311        printf( "<div class=\"warning\"><p>%s</p></div>", dgettext("welcome text", "Warning: You are running freePBX and ").$amp_conf['AMPDBENGINE'].dgettext("welcome page", " with the default password ") ); 
     312      } 
     313 
     314 
     315 
    287316      printf( "<p>%s</p>"  , dgettext("welcome page", "If you're new to freePBX, Welcome. Here are some quick instructions to get you started") ); 
    288317       
  • freepbx/branches/2.2/amp_conf/htdocs/admin/functions.inc.php

    r2993 r3036  
    895895} 
    896896 
    897 // get_headers() for php4 (built in for php5) 
    898 if (!function_exists('get_headers')) { 
    899   function get_headers($url ) { 
    900     $url_info=parse_url($url); 
    901     if (isset($url_info['scheme']) && $url_info['scheme'] == 'https') { 
    902       $port = isset($url_info['port']) ? $url_info['port'] : 443; 
    903       @$fp=fsockopen('ssl://'.$url_info['host'], $port, $errno, $errstr, 10); 
    904     } else { 
    905       $port = isset($url_info['port']) ? $url_info['port'] : 80; 
    906       @$fp=fsockopen($url_info['host'], $port, $errno, $errstr, 10); 
    907     } 
    908     if ($fp) { 
    909       stream_set_timeout($fp, 10); 
    910       $head = "HEAD ".@$url_info['path']."?".@$url_info['query']; 
    911       $head .= " HTTP/1.0\r\nHost: ".@$url_info['host']."\r\n\r\n"; 
    912       fputs($fp, $head); 
    913       while(!feof($fp)) { 
    914         if($header=trim(fgets($fp, 1024))) { 
    915           $sc_pos = strpos($header, ':'); 
    916           if ($sc_pos === false) { 
    917             $headers['status'] = $header; 
    918           } else { 
    919             $label = substr( $header, 0, $sc_pos ); 
    920             $value = substr( $header, $sc_pos+1 ); 
    921             $headers[strtolower($label)] = trim($value); 
    922           } 
    923         } 
    924       } 
    925       return $headers; 
    926     } else { 
    927       return false; 
    928     } 
    929   } 
    930 
     897function get_headers_assoc($url ) { 
     898  $url_info=parse_url($url); 
     899  if (isset($url_info['scheme']) && $url_info['scheme'] == 'https') { 
     900    $port = isset($url_info['port']) ? $url_info['port'] : 443; 
     901    @$fp=fsockopen('ssl://'.$url_info['host'], $port, $errno, $errstr, 10); 
     902  } else { 
     903    $port = isset($url_info['port']) ? $url_info['port'] : 80; 
     904    @$fp=fsockopen($url_info['host'], $port, $errno, $errstr, 10); 
     905  } 
     906  if ($fp) { 
     907    stream_set_timeout($fp, 10); 
     908    $head = "HEAD ".@$url_info['path']."?".@$url_info['query']; 
     909    $head .= " HTTP/1.0\r\nHost: ".@$url_info['host']."\r\n\r\n"; 
     910    fputs($fp, $head); 
     911    while(!feof($fp)) { 
     912      if($header=trim(fgets($fp, 1024))) { 
     913        $sc_pos = strpos($header, ':'); 
     914        if ($sc_pos === false) { 
     915          $headers['status'] = $header; 
     916        } else { 
     917          $label = substr( $header, 0, $sc_pos ); 
     918          $value = substr( $header, $sc_pos+1 ); 
     919          $headers[strtolower($label)] = trim($value); 
     920        } 
     921      } 
     922    } 
     923    return $headers; 
     924  } else { 
     925    return false; 
     926  } 
     927
     928 
    931929    
    932930 
     
    15401538  } 
    15411539   
    1542   $headers = get_headers($url); 
     1540  $headers = get_headers_assoc($url); 
    15431541   
    15441542  $totalread = 0;