// Page
$this->page = new Page([
'css' => $this->css,
+ 'js' => $this->js,
'sep' => $this->sep_title,
# NB 05.01.18 'expires' => $this->expires,
]);
+ // Bass base preffix
+ if ($this->base) {
+ foreach( (array)$this->page->css as $k=>$v ) { $this->page->css[$k] = $this->base . $v; }
+ foreach( (array)$this->page->js as $k=>$v ) { $this->page->js[$k] = $this->base . $v; }
+ }
+
// Http
$this->http = new Http();
$this->page->headers_no_cache();
if (empty($this->_nopage)) {
- $this->page->js = $this->js;
-
- if ($this->base) {
- if (!empty($this->db)) $this->db->base = $this->base . $this->db->base;
- if (!empty($this->table)) $this->table->base = $this->base . $this->table->base;
- foreach( (array)$this->page->css as $k=>$v ) { $this->page->css[$k] = $this->base . $v; }
- foreach( (array)$this->page->js as $k=>$v ) { $this->page->js[$k] = $this->base . $v; }
- }
-
$this->conf = [
'db.base' => ( empty($this->db) ? '' : $this->db->base ),
'table.base' => ( empty($this->table) ? '' : $this->table->base ),
$this->db->__construct($connect);
$this->db->connect();
- $this->db->base = '/'.$this->db->id;
+ $this->db->base = $this->base.'/'.$this->db->id;
return $this->db;
}
}
$this->db = new Db(['conf'=>$DB_CONFS]);
- $this->db->base = '';
+ $this->db->base = $this->base;
return $this->db;
}