From 3429e4ca4d09633838fcfe62f2c85c15479edba0 Mon Sep 17 00:00:00 2001 From: Alex Glavan Date: Tue, 16 Jan 2018 11:35:43 +0200 Subject: [PATCH] EasyPIBA 5.1.0 Fix admin paths --- Model/Model.class.php | 3 ++- admin/Template.class.php | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Model/Model.class.php b/Model/Model.class.php index e1daac2..47ee154 100644 --- a/Model/Model.class.php +++ b/Model/Model.class.php @@ -437,7 +437,8 @@ public function getOneResult($key, $val) { $nc = new Model($table); $this->$table = $nc; } - $this->$table->$matches[2] = $val; + $tc = $matches[2]; + $this->$table->$tc = $val; } } } diff --git a/admin/Template.class.php b/admin/Template.class.php index 2c3e663..034b80b 100644 --- a/admin/Template.class.php +++ b/admin/Template.class.php @@ -72,13 +72,19 @@ public function loadTemplate() { } if(property_exists($this->page, 'css') && count($this->page->css)) { $replacement = ''; - foreach($this->page->css AS $script) $replacement .= ' ' . PHP_EOL; + foreach($this->page->css AS $script) { + $scriptFolder = (strpos($script, 'Module/') !== 0)?$adminFolder:_FOLDER_URL_; + $replacement .= ' ' . PHP_EOL; + } $pos = strripos($this->template, "\t"); $this->template = substr_replace($this->template, $replacement, $pos, 0); } if(property_exists($this->page, 'js') && count($this->page->js)) { $replacement = ''; - foreach($this->page->js AS $script) $replacement .= ' ' . PHP_EOL; + foreach($this->page->js AS $script) { + $scriptFolder = (strpos($script, 'Module/') !== 0)?$adminFolder:_FOLDER_URL_; + $replacement .= ' ' . PHP_EOL; + } $pos = strripos($this->template, "\t"); $this->template = substr_replace($this->template, $replacement, $pos, 0); }