Freepbx core 2.5.2.2 - inbound routes

Hi,

I have been upgrade to freepbx core 2.5.2.2 and now i can not edit my “inbound route” !!!

When i click to edit a inbound route i get a list of all my inbound routes !!!

http://www.freepbx.org/forum/freepbx/users/incoming-routes-stopped-working-after-core-2-6-0-2-update

i Mikael,

It’s not work i put the code after global db; but the problem continues !!!

PS:Goto line 2476 and add after that line: - This line on my file is blank line right ?

To see my file check this link http://pastebin.com/d3556ade4

i put the code between the tag \jrebola

OK, remove your changes, search for text function core_did_get, you will find this:

function core_did_get($extension="",$cidnum=""){
        $cidnum = $db->escapeSimple($cidnum);
        $sql = "SELECT * FROM incoming WHERE cidnum = \"$cidnum\" AND extension = \"$extension\"";
        return sql($sql,"getRow",DB_FETCHMODE_ASSOC);
}
 
function core_did_del($extension,$cidnum){
        $cidnum = $db->escapeSimple($cidnum);
        $sql="DELETE FROM incoming WHERE cidnum = \"$cidnum\" AND extension = \"$extension\"";
        sql($sql);
}

Add the text global $db according to this:

function core_did_get($extension="",$cidnum=""){
        global $db;
        $cidnum = $db->escapeSimple($cidnum);
        $sql = "SELECT * FROM incoming WHERE cidnum = \"$cidnum\" AND extension = \"$extension\"";
        return sql($sql,"getRow",DB_FETCHMODE_ASSOC);
}

function core_did_del($extension,$cidnum){
        global $db;
        $cidnum = $db->escapeSimple($cidnum);
        $sql="DELETE FROM incoming WHERE cidnum = \"$cidnum\" AND extension = \"$extension\"";
        sql($sql);
}

Save changes and it will work

ok thanks a lot, now it’s working.

where is this file located i need to fix my system asap as i have work to do

If you follow the link in my previous post you wold have found all information.
It is in /var/www/html/admin/modules/core/functions.inc.php

yes it works thank you