Ticket #1108 (closed Bugs: fixed)

Opened 7 years ago

Last modified 7 years ago

CDR: Call Log not applying AMP_CLAUSE

Reported by: nobbie Assigned to:
Priority: minor Milestone:
Component: Web interface Version: 2.1
Keywords: Cc:
Confirmation: Distro:
Backend Engine: All Distro Ver:
Backend Ver: SVN Revision (if applicable):

Description

Hi,

In version 2.1.1

Reports, Call Logs doesn't apply the AMP_CLAUSE to restrict the viewing of CDR's to _extension_low, _extension_high etc....

Heres a proposed patch:

--- admin/cdr/call-log.php      2006-08-28 14:34:21.370754368 +0200
+++ admin/cdr/call-log.php.orig 2006-08-28 14:39:16.914824840 +0200
@@ -249,12 +249,21 @@
 }
 //--$list_total = $instance_table_graph -> Get_list ($FG_TABLE_CLAUSE, null, null, null, null, null, null);

+/* --AMP BEGIN-- */
+//enforce restrictions for this AMP User
+session_start();
+$AMP_CLAUSE = $HTTP_SESSION_VARS['AMP_SQL'];
+if (!isset($AMP_CLAUSE)) {
+        $AMP_CLAUSE = " AND src = 'NeverReturnAnything'";
+}
+$FG_TABLE_CLAUSE .= $AMP_CLAUSE;
+/* --AMP END-- */

 if ($posted==1){

        /* --AMP BEGIN-- */
        //enforce restrictions for this AMP User
-       $FG_TABLE_CLAUSE .= $AMP_CLAUSE;
+//     $FG_TABLE_CLAUSE .= $AMP_CLAUSE;
        /* --AMP END-- */

        //> function Get_list ($clause=null, $order=null, $sens=null, $field_order_letter=null, $letters = null, $limite=null, $current_record = NULL)

Change History

09/15/06 08:51:47 changed by vgster

Is the CDR code maintained by the freePBX team?

11/05/06 18:43:11 changed by RobThomas

  • status changed from new to closed.
  • resolution set to fixed.

No, but areski don't seem to care too much about it. 8-\. Applied. Thanks, nobbie!

--Rob