Fork me on GitHub

feproc substitution variable fix  Bottom

  • feproc does not replace the substitution variables(e.g. ${area:name}) correctly.
    Here's a fix that has worked for me:
    ( pnuserapi.php, line 1032: )

    // Do string replacements from the form data.
    if (is_array($handlerinfo['form']))
    {
    foreach ($handlerinfo['form'] as $itemName => $itemValue)
    {
    //modified by Payman
    //corrected the RegExp
    $attrValue = preg_replace("'\\\$\\{form:$itemName\\}'i", $itemValue, $attrValue);
    }
    }

    // Do string replacements from the system data.
    if (is_array($handlerinfo['system']))
    {
    foreach ($handlerinfo['system'] as $itemName => $itemValue)
    {
    //modified by Payman
    //corrected the RegExp
    $attrValue = preg_replace("'\\\$\\{system:$itemName\\}'i", $itemValue, $attrValue);
    }
    }

    // Do string replacements from the links data.
    if (is_array($handlerinfo['links']))
    {
    foreach ($handlerinfo['links'] as $itemName => $itemValue)
    {
    //modified by Payman
    //corrected the RegExp
    $attrValue = preg_replace("'\\\$\\{link:$itemName\\}'i", $itemValue, $attrValue);
    }
    }


    Hope that helps someone someday!
    Cheers!
  • 0 users

This list is based on users active over the last 60 minutes.