Uploaded image for project: 'FreePBX'
  1. FreePBX
  2. FREEPBX-23168

CID Superfecta Who-Called UK plugin doesn't handle "Average: Negative" response

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 15.0.17.55
    • Fix Version/s: None
    • Component/s: CID Superfecta
    • Labels:
      None
    • Distro Version:
      15.0.17.64
    • Distro:
      FreePBX Distro

      Description

      The Who-Called UK module (WhoCalled_UK.module) doesn't handle a "Negative" average response from the website.

      Plugin code is here: https://git.freepbx.org/projects/FREEPBX/repos/superfecta/browse/sources/source-WhoCalled_UK.module

      The plugin contains a code block around line 87 which parses these responses:

      
      			switch (strtolower($average_rate)) {
      				case "dangerous":
      					if($number_of_searches <= $run_param['Search_Number_Threshold'] || $number_of_comments <= $run_param['Comment_Number_Threshold']) {
      						$this->DebugPrint("Number flagged as Dangerous, but comment/search threshold not met");
      					} else {
      						$this->DebugPrint("Number flagged as Dangerous, comment/search threshold met, setting call as SPAM");
      						$this->spam = true;
      					}
      					break; 

      To handle the negative case, a new case statement needs to be introduced – this should be handled the same as Dangerous or Harassing.

      If there was a desire to clean up the code, Dangerous, Harassing and Negative could be all combined into the same 'case' statement body, as they are handled the same way.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                philpem Phil Pemberton
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:

                  NextupJiraPlusStatus

                  Error rendering 'slack.nextup.jira:nextup-jira-plus-status'. Please contact your Jira administrators.