init
This commit is contained in:
28
include/asterisk/ast_metadata.php
Executable file
28
include/asterisk/ast_metadata.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
function astPatch($ast_number, $ast_id, $ast_location)
|
||||
{
|
||||
require_once('data/SugarBean.php');
|
||||
require_once('include/asterisk/asterisk_inc.php');
|
||||
|
||||
global $system_config;
|
||||
global $current_user;
|
||||
|
||||
if(isset($system_config->settings['system_asterisk_on']) && $system_config->settings['system_asterisk_on'] == 1 && $current_user->asterisk_extension !="")
|
||||
{
|
||||
$ast_links = new asterisk_popup_link($ast_location, $ast_id);
|
||||
/*
|
||||
* Check which type of link is selected and apply code
|
||||
*/
|
||||
|
||||
if(isset($system_config->settings['system_asterisk_phoneicon_on']) && $system_config->settings['system_asterisk_phoneicon_on'] == 1 )
|
||||
return '<script type="text/javascript"> var number = "'.$ast_number.'"; if(number.length > 2) document.write("'.addslashes($ast_links->create_icon_link($ast_number)).'");</script>';
|
||||
|
||||
|
||||
else
|
||||
return '<script type="text/javascript"> var number = "'.$ast_number.'"; if(number.length > 2) document.write("'.addslashes($ast_links->create_phone_link($ast_number)).'");</script>';
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user