Merge branch 'master' of https://github.com/fusionpbx/fusionpbx
This commit is contained in:
commit
7d92c4e4a4
|
|
@ -0,0 +1,4 @@
|
|||
resources/config.php
|
||||
secure/mailto.bat
|
||||
secure/*.db
|
||||
secure/*.sqlite
|
||||
|
|
@ -183,6 +183,11 @@ else {
|
|||
}
|
||||
}
|
||||
|
||||
// reduce too long app data
|
||||
if(strlen($application_data) > 512) {
|
||||
$application_data = substr($application_data, 0, 512) . ' <b>...</b>';
|
||||
}
|
||||
|
||||
echo "<tr>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".$sip_profile." </td>\n";
|
||||
echo "<td valign='top' class='".$row_style[$c]."'>".$created." </td>\n";
|
||||
|
|
|
|||
|
|
@ -35,10 +35,8 @@ else {
|
|||
}
|
||||
|
||||
//add multi-lingual support
|
||||
require_once "app_languages.php";
|
||||
foreach($text as $key => $value) {
|
||||
$text[$key] = $value[$_SESSION['domain']['language']['code']];
|
||||
}
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//get variables used to control the order
|
||||
$order_by = check_str($_GET["order_by"]);
|
||||
|
|
|
|||
|
|
@ -173,8 +173,8 @@ foreach ($activity as $extension => $ext) {
|
|||
$call_number = $ext['dest'];
|
||||
}
|
||||
else {
|
||||
$call_name = $activity[(int) $ext['dest']]['effective_caller_id_name'];
|
||||
$call_number = format_phone((int) $ext['dest']);
|
||||
$call_name = $activity[$ext['dest']]['effective_caller_id_name'];
|
||||
$call_number = format_phone($ext['dest']);
|
||||
}
|
||||
$dir_icon = 'outbound';
|
||||
}
|
||||
|
|
@ -182,13 +182,13 @@ foreach ($activity as $extension => $ext) {
|
|||
if ($ext['callstate'] == 'ACTIVE') {
|
||||
$ext_state = 'active';
|
||||
if ($ext['direction'] == 'inbound') {
|
||||
$call_name = $activity[(int) $ext['dest']]['effective_caller_id_name'];
|
||||
$call_number = format_phone((int) $ext['dest']);
|
||||
$call_name = $activity[$ext['dest']]['effective_caller_id_name'];
|
||||
$call_number = format_phone($ext['dest']);
|
||||
$dir_icon = 'outbound';
|
||||
}
|
||||
else if ($ext['direction'] == 'outbound') {
|
||||
$call_name = $activity[(int) $ext['cid_num']]['effective_caller_id_name'];
|
||||
$call_number = format_phone((int) $ext['cid_num']);
|
||||
$call_name = $activity[$ext['cid_num']]['effective_caller_id_name'];
|
||||
$call_number = format_phone($ext['cid_num']);
|
||||
$dir_icon = 'inbound';
|
||||
}
|
||||
}
|
||||
|
|
@ -201,8 +201,8 @@ foreach ($activity as $extension => $ext) {
|
|||
$ext_state = 'active';
|
||||
}
|
||||
$dir_icon = 'inbound';
|
||||
$call_name = $activity[(int) $ext['cid_num']]['effective_caller_id_name'];
|
||||
$call_number = format_phone((int) $ext['cid_num']);
|
||||
$call_name = $activity[$ext['cid_num']]['effective_caller_id_name'];
|
||||
$call_number = format_phone($ext['cid_num']);
|
||||
}
|
||||
else {
|
||||
unset($ext_state, $dir_icon, $call_name, $call_number);
|
||||
|
|
|
|||
|
|
@ -33,17 +33,23 @@ class cache {
|
|||
* @var string $value string to be cached
|
||||
*/
|
||||
public function set($key, $value) {
|
||||
//send a custom event
|
||||
|
||||
//run the memcache
|
||||
// connect to event socket
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
$command = "memcache set ".$key." ".$value;
|
||||
return event_socket_request($fp, 'api '.$command);
|
||||
}
|
||||
else {
|
||||
if ($fp === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//send a custom event
|
||||
|
||||
//run the memcache
|
||||
$command = "memcache set ".$key." ".$value;
|
||||
$result = event_socket_request($fp, 'api '.$command);
|
||||
|
||||
//close event socket
|
||||
fclose($fp);
|
||||
|
||||
// return result
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -51,17 +57,23 @@ class cache {
|
|||
* @var string $key cache id
|
||||
*/
|
||||
public function get($key) {
|
||||
//send a custom event
|
||||
|
||||
//run the memcache
|
||||
// connect to event socket
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
$command = "memcache get ".$key;
|
||||
return event_socket_request($fp, 'api '.$command);
|
||||
}
|
||||
else {
|
||||
if ($fp === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//send a custom event
|
||||
|
||||
//run the memcache
|
||||
$command = "memcache get ".$key;
|
||||
$result = event_socket_request($fp, 'api '.$command);
|
||||
|
||||
//close event socket
|
||||
fclose($fp);
|
||||
|
||||
// return result
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -69,52 +81,58 @@ class cache {
|
|||
* @var string $key cache id
|
||||
*/
|
||||
public function delete($key) {
|
||||
//send a custom event
|
||||
// connect to event socket
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
$event = "sendevent CUSTOM\n";
|
||||
$event .= "Event-Name: MEMCACHE\n";
|
||||
$event .= "Event-Subclass: delete\n";
|
||||
$event .= "API-Command: memcache\n";
|
||||
$event .= "API-Command-Argument: delete ".$key."\n";
|
||||
echo event_socket_request($fp, $event);
|
||||
}
|
||||
|
||||
//run the memcache
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
$command = "memcache delete ".$key;
|
||||
return event_socket_request($fp, 'api '.$command);
|
||||
}
|
||||
else {
|
||||
if ($fp === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//send a custom event
|
||||
$event = "sendevent CUSTOM\n";
|
||||
$event .= "Event-Name: MEMCACHE\n";
|
||||
$event .= "Event-Subclass: delete\n";
|
||||
$event .= "API-Command: memcache\n";
|
||||
$event .= "API-Command-Argument: delete ".$key."\n";
|
||||
event_socket_request($fp, $event);
|
||||
|
||||
//run the memcache
|
||||
$command = "memcache delete ".$key;
|
||||
$result = event_socket_request($fp, 'api '.$command);
|
||||
|
||||
//close event socket
|
||||
fclose($fp);
|
||||
|
||||
// return result
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the entire cache
|
||||
*/
|
||||
public function flush() {
|
||||
//send a custom event
|
||||
// connect to event socket
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
$event = "sendevent CUSTOM\n";
|
||||
$event .= "Event-Name: MEMCACHE\n";
|
||||
$event .= "Event-Subclass: flush\n";
|
||||
$event .= "API-Command: memcache\n";
|
||||
$event .= "API-Command-Argument: flush\n";
|
||||
echo event_socket_request($fp, $event);
|
||||
}
|
||||
|
||||
//run the memcache
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
if ($fp) {
|
||||
$command = "memcache flush";
|
||||
return event_socket_request($fp, 'api '.$command);
|
||||
}
|
||||
else {
|
||||
if ($fp === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
//send a custom event
|
||||
$event = "sendevent CUSTOM\n";
|
||||
$event .= "Event-Name: MEMCACHE\n";
|
||||
$event .= "Event-Subclass: flush\n";
|
||||
$event .= "API-Command: memcache\n";
|
||||
$event .= "API-Command-Argument: flush\n";
|
||||
event_socket_request($fp, $event);
|
||||
|
||||
//run the memcache
|
||||
$command = "memcache flush";
|
||||
$result = event_socket_request($fp, 'api '.$command);
|
||||
|
||||
//close event socket
|
||||
fclose($fp);
|
||||
|
||||
// return result
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue