<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>Using OpenSIPS Control Panel 5.0, I am unable to edit entries made in the dialplan module. Adding works fine. Clicking the pencil icon to edit and then saving results in losing any text in the matching expression, substitution expression and replacement expression fields. (Bogdan this issue was identified during the OpenSIPS eBootcamp that began Nov 2013)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>In dialplan.php (dated 2011-10-20), after if ($action==”modify”) (line 253) there are three instances where the PHP function my_real_escape_string is used. Line 289 processes $match_exp, line 317 is $subst_exp and line 319 is $repl_exp. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>In each instance, the format is: mysql_real_escape_string( $var, $link). This function (in my case) seems to always return an empty string thus explaining why saving loses the value of these three variables. If the function is called without the $link parameter: mysql_real_escape_string( $var ) then the return value is not an empty string and the values are retained.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>When I add a debug statement to see what the value of the $link variable is I get: MDB2_Driver_mysql: (phptype = mysql, dbsyntax = mysql) [connected] . I don’t know enough about how PHP is connecting to the database to say whether or not this is the problem but not using $link results in the edits saving as expected. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Jim<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>