aboutsummaryrefslogtreecommitdiff
path: root/app/class
diff options
context:
space:
mode:
Diffstat (limited to 'app/class')
-rw-r--r--app/class/controllerart.php7
-rw-r--r--app/class/modelrender.php7
2 files changed, 11 insertions, 3 deletions
diff --git a/app/class/controllerart.php b/app/class/controllerart.php
index 8511243..7bc8c23 100644
--- a/app/class/controllerart.php
+++ b/app/class/controllerart.php
@@ -202,6 +202,13 @@ class Controllerart extends Controller
$_SESSION['workspace']['showrightpanel'] = isset($_POST['workspace']['showrightpanel']);
$_SESSION['workspace']['showleftpanel'] = isset($_POST['workspace']['showleftpanel']);
+ if(!empty($_POST['fontsize']) && $_POST['fontsize'] !== Config::fontsize()) {
+ Config::setfontsize($_POST['fontsize']);
+ Config::savejson();
+ }
+
+
+
$date = new DateTimeImmutable($_POST['pdate'] . $_POST['ptime'], new DateTimeZone('Europe/Paris'));
$date = ['date' => $date];
diff --git a/app/class/modelrender.php b/app/class/modelrender.php
index 8139d6d..7b7539c 100644
--- a/app/class/modelrender.php
+++ b/app/class/modelrender.php
@@ -198,7 +198,6 @@ class Modelrender extends Modelart
public function parser(string $text)
{
-
$text = $this->media($text);
$text = $this->headerid($text);
@@ -220,8 +219,10 @@ class Modelrender extends Modelart
public function media(string $text): string
{
- $rend = $this;
- $text = preg_replace('%(src|href)="((\/?[\w-_]+)+\.[a-z0-9]{1,5})"%', '$1="'.Model::mediapath() . '$2" target="_blank" class="media"', $text);
+ $text = preg_replace('%(src|href)="((\/?[\w-_]+)\.[a-z0-9]{1,5})"%', '$1="'.Model::mediapath() . '$2" target="_blank" class="media"', $text);
+ if(!is_string($text)) {
+ throw new Exception('Rendering error -> media module');
+ }
return $text;
}