aboutsummaryrefslogtreecommitdiff
path: root/app/class
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2019-08-14 10:23:53 +0200
committervincent-peugnet <v.peugnet@free.fr>2019-08-14 10:23:53 +0200
commit566b995bab45355d814ac5a8bfbf18e3a59c14ba (patch)
tree304810ec1c8d6c31fe29763472db67e6ec000261 /app/class
parentc097ae87df8476b573cf559c9facd2b8e6e2e865 (diff)
downloadwcms-566b995bab45355d814ac5a8bfbf18e3a59c14ba.tar.gz
wcms-566b995bab45355d814ac5a8bfbf18e3a59c14ba.zip
Change : externaljs become customhead
Diffstat (limited to 'app/class')
-rw-r--r--app/class/art2.php14
-rw-r--r--app/class/modelrender.php5
2 files changed, 9 insertions, 10 deletions
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 .= '<script src="' . $externalscript . '"></script>' . PHP_EOL;
- }
+ $head .= PHP_EOL . $this->art->customhead() . PHP_EOL;
+
$head .= '<link href="' . Model::globalpath() . 'fonts.css" rel="stylesheet" />' . PHP_EOL;
$head .= '<link href="' . Model::globalpath() . 'global.css" rel="stylesheet" />' . PHP_EOL;