From 566b995bab45355d814ac5a8bfbf18e3a59c14ba Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Wed, 14 Aug 2019 10:23:53 +0200 Subject: Change : externaljs become customhead --- app/class/art2.php | 14 +++++++------- app/class/modelrender.php | 5 ++--- 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'app/class') diff --git a/app/class/art2.php b/app/class/art2.php index 81b6569..56bc74e 100644 --- a/app/class/art2.php +++ b/app/class/art2.php @@ -20,7 +20,7 @@ class Art2 protected $aside; protected $footer; protected $externalcss; - protected $externalscript; + protected $customhead; protected $renderhead; protected $renderbody; protected $secure; @@ -91,7 +91,7 @@ class Art2 $this->setaside(''); $this->setfooter(''); $this->setexternalcss([]); - $this->setexternalscript([]); + $this->setcustomhead(''); $this->setrenderhead(''); $this->setrenderbody(''); $this->setsecure(Config::defaultprivacy()); @@ -294,9 +294,9 @@ class Art2 return $this->externalcss; } - public function externalscript($type = "array") + public function customhead($type = "string") { - return $this->externalscript; + return $this->customhead; } public function footer($type = "string") @@ -609,10 +609,10 @@ class Art2 } } - public function setexternalscript(array $externalscript) + public function setcustomhead(string $customhead) { - if(is_array($externalscript)) { - $this->externalscript = array_values(array_filter($externalscript)); + if(is_string($customhead)) { + $this->customhead = $customhead; } } diff --git a/app/class/modelrender.php b/app/class/modelrender.php index fb6e002..aa444f0 100644 --- a/app/class/modelrender.php +++ b/app/class/modelrender.php @@ -225,9 +225,8 @@ class Modelrender extends Modelart } } - foreach ($this->art->externalscript() as $externalscript) { - $head .= '' . PHP_EOL; - } + $head .= PHP_EOL . $this->art->customhead() . PHP_EOL; + $head .= '' . PHP_EOL; $head .= '' . PHP_EOL; -- cgit v1.2.3