Skip to content

Commit

Permalink
#133 CID Superfecta module - CID Prefix URL don't work
Browse files Browse the repository at this point in the history
  • Loading branch information
kguptasangoma committed May 6, 2024
1 parent d574199 commit dd0308e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Superfecta.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@ public function execute($scheme='ALL', $request=[], $debug=0, $keepGoing=false)
//if a prefix lookup is enabled, look it up, and truncate the result to 10 characters
///Clean these up, set NULL values instead of blanks then don't check for ''
$superfecta->set_Prefix('');
if ((isset($scheme_param['Prefix_URL'])) && (trim($scheme_param['Prefix_URL']) != '')) {
if ((isset($options['scheme_settings']['Prefix_URL'])) && (trim($options['scheme_settings']['Prefix_URL'])) != '') {


$start_time = $superfecta->mctime_float();

$superfecta->set_Prefix($superfecta->get_url_contents(str_replace("[thenumber]", $cnum, $options['scheme_settings']['Prefix_URL'])));
Expand All @@ -199,7 +201,7 @@ public function execute($scheme='ALL', $request=[], $debug=0, $keepGoing=false)
} else {
$this->out(_("Prefix Url defined but result was empty"));
}
$this->out(sprintf(_("Prefix Url result took %s seconds."),number_format((mctime_float() - $start_time), 4)));
$this->out(sprintf(_("Prefix Url result took %s seconds."),number_format(($superfecta->mctime_float() - $start_time), 4)));
}

$trunk_info['callerid'] = $cnum;
Expand Down Expand Up @@ -866,4 +868,4 @@ public function didList($id = false){
$results = $stmt->fetchAll(PDO::FETCH_ASSOC);
return is_array($results) ? $results : array();
}
}
}
2 changes: 1 addition & 1 deletion includes/superfecta_base.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class superfecta_base {
protected $caller_id = '';
protected $charsetIA5 = true;
protected $first_caller_id = '';
protected $prefix = '';
public $prefix = '';
protected $spam_text = '';
protected $cache_found = false;
protected $single_source = false;
Expand Down

0 comments on commit dd0308e

Please sign in to comment.