Enhance Call Blocking [master] (#2988)
* Added support for regular expressions in the numbers to be blocked. Reduced the caching timeout, as the counter is only incremented when a call is blocked and the number is not cached. * Added default sort order. * Added option to switch on/off use of regular expression matching for pgsql and mysql. * Added support for sqlite and updated default number match to "LIKE" as suggested by MafooUK on IRC. * Selection of behavior (default [=], regex or like matching) is now done via the variable call_block_matching = regex|like|EMPTY - type text - in the Call Block section of Default Settings. * Updated comment to match new matching.
This commit is contained in:
@@ -90,7 +90,11 @@ require_once "resources/require.php";
|
||||
//get the list
|
||||
$sql = "select * from v_call_block ";
|
||||
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
|
||||
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
|
||||
if (strlen($order_by)> 0) {
|
||||
$sql .= "order by $order_by $order ";
|
||||
} else {
|
||||
$sql .= "order by call_block_number asc ";
|
||||
}
|
||||
$sql .= " limit $rows_per_page offset $offset ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
@@ -177,4 +181,4 @@ require_once "resources/require.php";
|
||||
//include the footer
|
||||
require_once "resources/footer.php";
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user