From ae0693d074a63412e7ab9587520096cb60a48e64 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Sun, 9 Dec 2018 12:10:16 +0100 Subject: media parser --- app/class/art2.php | 2 ++ app/class/modelhome.php | 2 +- app/class/modelrender.php | 11 +++++++++-- 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'app/class') diff --git a/app/class/art2.php b/app/class/art2.php index 6a61687..2029895 100644 --- a/app/class/art2.php +++ b/app/class/art2.php @@ -169,6 +169,8 @@ class Art2 return $this->date->format('Y-m-d'); } elseif ($option == 'ptime') { return $this->date->format('H:i'); + } elseif ($option = 'dmy') { + return $this->date->format('d/m/Y'); } diff --git a/app/class/modelhome.php b/app/class/modelhome.php index 5d16062..bb271d6 100644 --- a/app/class/modelhome.php +++ b/app/class/modelhome.php @@ -11,7 +11,7 @@ class Modelhome extends Modeldb { $opt = new Opt(Art2::classvarlist()); - $opt->setcol(['id', 'tag', 'linkfrom', 'linkto', 'description', 'title', 'datemodif', 'datecreation', 'secure']); + $opt->setcol(['id', 'tag', 'linkfrom', 'linkto', 'description', 'title', 'datemodif', 'datecreation', 'date', 'secure']); $opt->settaglist($table); $opt->submit(); diff --git a/app/class/modelrender.php b/app/class/modelrender.php index d2cdbb4..c36417d 100644 --- a/app/class/modelrender.php +++ b/app/class/modelrender.php @@ -177,8 +177,8 @@ class Modelrender extends Modelart public function parser(string $text) { - $text = str_replace('