mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 17:14:46 +00:00
Firewall, rule parsing. move suffix to parameters for parsePlainCurly() , also for https://github.com/opnsense/core/issues/1326
This commit is contained in:
parent
a347623b41
commit
b291345848
@ -94,15 +94,15 @@ abstract class Rule
|
||||
* parse plain data
|
||||
* @param string $value field value
|
||||
* @param string $prefix prefix when $value is provided
|
||||
* @param string $suffix suffix when $value is provided
|
||||
* @return string
|
||||
*/
|
||||
protected function parsePlainCurly($value, $prefix = "")
|
||||
protected function parsePlainCurly($value, $prefix = "", $suffix = "")
|
||||
{
|
||||
$suffix = "";
|
||||
if (strpos($value, '$') === false) {
|
||||
// don't wrap aliases in curly brackets
|
||||
$prefix = $prefix . "{";
|
||||
$suffix = "}";
|
||||
$suffix = "}" . $suffix;
|
||||
}
|
||||
return $value == null || $value === '' ? '' : $prefix . $value . $suffix . ' ';
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user