Skip to content

Commit

Permalink
Merge pull request #9 from POSSA/working
Browse files Browse the repository at this point in the history
Update to 0.0.6
  • Loading branch information
lgaetz committed Aug 8, 2013
2 parents 7014f89 + 6c899b3 commit 1e81d6e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
2 changes: 2 additions & 0 deletions functions.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ function lenny_hookGet_config($engine) {
}
}

/*** *** *** temporarily removing this function to debug *** ***
function lenny_hook_blacklist() {
$lenconfig = lenny_config();
Expand All @@ -98,6 +99,7 @@ function lenny_hook_blacklist() {
return $html;
}
*** *** *** *** *** *** *** ***/

function lenny_vercheck() {
$newver = false;
Expand Down
3 changes: 2 additions & 1 deletion module.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<module>
<rawname>lenny</rawname>
<name>Lenny Blacklist Mod</name>
<version>0.0.5</version>
<version>0.0.6</version>
<publisher>POSSA</publisher>
<license>GPLv2+</license>
<category>Other</category>
<menuitems>
<lenny>Lenny Blacklist Mod</lenny>
</menuitems>
<changelog>
*0.0.6* Remove Blacklist html hook for debug
*0.0.5* Updated to use html hook in Blacklist module
*0.0.4* Typos and note about respecing TOS
*0.0.3* Added core 2.10 dependency
Expand Down
26 changes: 25 additions & 1 deletion page.lenny.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,31 @@
</tr>
</table>
<?php
echo $foo=lenny_hook_blacklist();

if (function_exists(lenny_hook_blacklist)) {
echo $foo=lenny_hook_blacklist();
} else {

$lenconfig = lenny_config();

//if submitting form, update database
if(isset($_POST['submit'])) {
lenny_edit(1,$_POST);
}
$html = "<table>";
$html .= "<tr><td colspan='2'><h5><a href='#' class='info'>Lenny Blacklist Mod Config<span>This is used to modify the FreePBX blacklist module so that blacklisted callers are automatically redirected to SIP/[email protected]:5060 or another user specified destination.</span></a><hr></h5></td></tr>";
$html .= "<tr>";
$html .= "<td><a href='#' class='info'>Enable redirect<span>If this is disabled, the blacklist reverts to default behavior. Clicking this box certifies compliance with the Terms of Service of the receiving destination.</span></a></td>";
$html .= "<td><input type='checkbox' name='enable' value='CHECKED' ".$lenconfig[0]['enable']."></td>";
$html .= "</tr><tr>";
$html .= "<td><a href='#' class='info'>Enable Recording<span>If enabled, the call is recorded locally</span></a></td>";
$html .= "<td><input type='checkbox' name='record' value='CHECKED' ".$lenconfig[0]['record']."></td>";
$html .= "</tr><tr>";
$html .= "<td><a href='#' class='info'>Destination<span>SIP/URI destination to send blacklisted caller in the format SIP/[email protected]:port</span></a></td>";
$html .= "<td><input type='text' name='destination' size=40 value='".htmlspecialchars(isset($lenconfig[0]['destination']) ? $lenconfig[0]['destination'] : '')."' ></td>";
$html .= "</tr></table>";
echo $html;
}
?>
<table>
<tr>
Expand Down

0 comments on commit 1e81d6e

Please sign in to comment.