Skip to content

Commit

Permalink
EasyPIBA 5.1.0
Browse files Browse the repository at this point in the history
Fix admin paths
  • Loading branch information
al3x2508 committed Jan 16, 2018
1 parent d17f3a8 commit 3429e4c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Model/Model.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand Down
10 changes: 8 additions & 2 deletions admin/Template.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 .= ' <link rel="stylesheet" href="' . $adminFolder . $script . '" />' . PHP_EOL;
foreach($this->page->css AS $script) {
$scriptFolder = (strpos($script, 'Module/') !== 0)?$adminFolder:_FOLDER_URL_;
$replacement .= ' <link rel="stylesheet" href="' . $scriptFolder . $script . '" />' . PHP_EOL;
}
$pos = strripos($this->template, "\t</body>");
$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 .= ' <script src="' . $adminFolder . $script . '"></script>' . PHP_EOL;
foreach($this->page->js AS $script) {
$scriptFolder = (strpos($script, 'Module/') !== 0)?$adminFolder:_FOLDER_URL_;
$replacement .= ' <script src="' . $scriptFolder . $script . '"></script>' . PHP_EOL;
}
$pos = strripos($this->template, "\t</body>");
$this->template = substr_replace($this->template, $replacement, $pos, 0);
}
Expand Down

0 comments on commit 3429e4c

Please sign in to comment.