diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2020-01-20 01:58:42 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2020-01-20 01:58:42 +0100 |
commit | 526dc66454a56ea4ccb0ed220e498bf6611cc666 (patch) | |
tree | 49acf50c0c007e37224b73f8db01b0761f0c7aee /app/class/Modelrender.php | |
parent | 8e10d770c74acdbb5795e8fc73fd220b900d75aa (diff) | |
parent | 49273cba81ea86639a23dfd5a43bda2f6b01f075 (diff) | |
download | wcms-526dc66454a56ea4ccb0ed220e498bf6611cc666.tar.gz wcms-526dc66454a56ea4ccb0ed220e498bf6611cc666.zip |
Merge branch 'implement-better-ui'
Diffstat (limited to 'app/class/Modelrender.php')
-rw-r--r-- | app/class/Modelrender.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/class/Modelrender.php b/app/class/Modelrender.php index 778b327..593a420 100644 --- a/app/class/Modelrender.php +++ b/app/class/Modelrender.php @@ -437,16 +437,17 @@ class Modelrender extends Modelpage */ public function automedialist(string $text) { - preg_match_all('~\%MEDIA\?([a-zA-Z0-9\&=\-\/\%]*)\%~', $text, $out); + preg_match_all('~\%MEDIA\?([a-zA-Z0-9\[\]\&=\-\/\%]*)\%~', $text, $out); foreach ($out[0] as $key => $match) { - $matches[$key] = ['fullmatch' => $match, 'options' => $out[1][$key]]; + $matches[$key] = ['fullmatch' => $match, 'filter' => $out[1][$key]]; } if(isset($matches)) { foreach ($matches as $match) { $medialist = new Medialist($match); - $text = str_replace($medialist->fullmatch(), $medialist->content(), $text); + $medialist->readfilter(); + $text = str_replace($medialist->fullmatch(), $medialist->generatecontent(), $text); } } return $text; |