# HG changeset patch # User Tom Fredrik Blenning # Date 1672185933 -3600 # Node ID ef487503dded793fdca732ea817b1b399734acd9 # Parent 14959382c901511be0a74993d5b9b004806c1c19 Remove deprecated create_function, replace with closure. diff -r 14959382c901 -r ef487503dded filters.inc --- a/filters.inc Wed Dec 28 01:05:01 2022 +0100 +++ b/filters.inc Wed Dec 28 01:05:33 2022 +0100 @@ -24,15 +24,13 @@ $pattern = '/
  • ]*)>(.*?)<\/li>/is'; $replacement = "
  • \$3
  • "; - $opt = repMapString($options->getUrlParams()); - - $baseUrl = $options->getBaseUrl(); - $output = preg_replace_callback($pattern, - create_function( - '$matches', - 'return "
  • $matches[1]), array("lang", "name") ) . "\">$matches[3]
  • ";' - ), + function($matches) use ($options){ + $opt = $options->getUrlParams(); + $baseUrl = $options->getBaseUrl(); + $g=genUrl($opt, array("name" => $matches[1]), array("lang", "name") ); + return "
  • $matches[3]
  • "; + }, $output); return $output; @@ -77,4 +75,4 @@ return $output; } -?> \ No newline at end of file +?>