aboutsummaryrefslogtreecommitdiff
path: root/app/class/Modelrender.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2020-01-20 01:58:42 +0100
committervincent-peugnet <v.peugnet@free.fr>2020-01-20 01:58:42 +0100
commit526dc66454a56ea4ccb0ed220e498bf6611cc666 (patch)
tree49acf50c0c007e37224b73f8db01b0761f0c7aee /app/class/Modelrender.php
parent8e10d770c74acdbb5795e8fc73fd220b900d75aa (diff)
parent49273cba81ea86639a23dfd5a43bda2f6b01f075 (diff)
downloadwcms-526dc66454a56ea4ccb0ed220e498bf6611cc666.tar.gz
wcms-526dc66454a56ea4ccb0ed220e498bf6611cc666.zip
Merge branch 'implement-better-ui'
Diffstat (limited to 'app/class/Modelrender.php')
-rw-r--r--app/class/Modelrender.php7
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;