Change paths to absolute pathname

This commit is contained in:
Vasily Komrakov 2017-02-05 22:28:55 +03:00
commit 064175c67d
No known key found for this signature in database
GPG key ID: 558236680C20A69A
81 changed files with 297 additions and 303 deletions

View file

@ -129,8 +129,8 @@ $data = array(
$this->store('jumpbox', $data);
file_write($data['guest'], AJAX_HTML_DIR . 'jumpbox_guest.html', false, true, true);
file_write($data['user'], AJAX_HTML_DIR . 'jumpbox_user.html', false, true, true);
file_write($data['guest'], AJAX_HTML_DIR . '/jumpbox_guest.html', false, true, true);
file_write($data['user'], AJAX_HTML_DIR . '/jumpbox_user.html', false, true, true);
//
// viewtopic_forum_select

View file

@ -32,7 +32,7 @@ class datastore_common
/**
* Директория с builder-скриптами (внутри INC_DIR)
*/
public $ds_dir = 'datastore/';
public $ds_dir = 'datastore';
/**
* Готовая к употреблению data
* array('title' => data)
@ -132,8 +132,9 @@ class datastore_common
public function _build_item($title)
{
if (!empty($this->known_items[$title])) {
require(INC_DIR . $this->ds_dir . $this->known_items[$title]);
$file = INC_DIR . '/' . $this->ds_dir . '/' . $this->known_items[$title];
if (isset($this->known_items[$title]) && file_exists($file)) {
require $file;
} else {
trigger_error("Unknown datastore item: $title", E_USER_ERROR);
}