function cidlookup_hookProcess_core($viewing_itemid, $request) { if (!isset($request['action'])) { return; } switch ($request['action']) { case 'addIncoming': cidlookup_did_add($request['cidlookup_id'], $request['extension'], $request['cidnum']); break; case 'delIncoming': $extarray = explode('/', $request['extdisplay'], 2); cidlookup_did_del($extarray[0], $extarray[1]); break; case 'edtIncoming': // deleting and adding as in core module $extarray = explode('/', $request['extdisplay'], 2); cidlookup_did_del($extarray[0], $extarray[1]); cidlookup_did_add($request['cidlookup_id'], $request['extension'], $request['cidnum']); break; } }
function cidlookup_hookProcess_core($viewing_itemid, $request) { if (!isset($request['action'])) { return; } switch ($request['action']) { case 'addIncoming': $invalidDIDChars = array('<', '>'); $extension = trim(str_replace($invalidDIDChars, "", $request['extension'])); $cidnum = trim(str_replace($invalidDIDChars, "", $request['cidnum'])); cidlookup_did_add($request['cidlookup_id'], $extension, $cidnum); break; case 'delIncoming': $extarray = explode('/', $request['extdisplay'], 2); cidlookup_did_del($extarray[0], $extarray[1]); break; case 'edtIncoming': // deleting and adding as in core module $extarray = explode('/', $request['extdisplay'], 2); $invalidDIDChars = array('<', '>'); $extension = trim(str_replace($invalidDIDChars, "", $request['extension'])); $cidnum = trim(str_replace($invalidDIDChars, "", $request['cidnum'])); cidlookup_did_del($extarray[0], $extarray[1]); cidlookup_did_add($request['cidlookup_id'], $extension, $cidnum); break; } }