Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurício Meneghini Fauth <mauriciofauth@gmail.com>2018-12-21 22:46:13 +0300
committerMaurício Meneghini Fauth <mauriciofauth@gmail.com>2018-12-22 19:37:31 +0300
commit38e5b12c1c20b75d09f4d2bc5f6460adc41a7f00 (patch)
treebe514e711fae88d45c48b39eaea6d95f616423b8 /test/bootstrap-dist.php
parent0e372eac7edc9aa9de959b2e1acb47b00de125ed (diff)
Define an absolute path to use for require statements
Fixes #6167 Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
Diffstat (limited to 'test/bootstrap-dist.php')
-rw-r--r--test/bootstrap-dist.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/bootstrap-dist.php b/test/bootstrap-dist.php
index abc309dcd5..bfee49e952 100644
--- a/test/bootstrap-dist.php
+++ b/test/bootstrap-dist.php
@@ -13,6 +13,10 @@ use PhpMyAdmin\LanguageManager;
use PhpMyAdmin\MoTranslator\Loader;
use PhpMyAdmin\Theme;
+if (! defined('ROOT_PATH')) {
+ define('ROOT_PATH', dirname(__DIR__) . DIRECTORY_SEPARATOR);
+}
+
/**
* Set precision to sane value, with higher values
* things behave slightly unexpectedly, for example
@@ -63,7 +67,7 @@ if (PHP_SAPI == 'cli') {
}
}
-require_once 'libraries/vendor_config.php';
+require_once ROOT_PATH . 'libraries/vendor_config.php';
require_once AUTOLOAD_FILE;
Loader::loadFunctions();
$GLOBALS['PMA_Config'] = new Config();
@@ -94,6 +98,6 @@ session_start();
// Standard environment for tests
$_SESSION[' PMA_token '] = 'token';
-$GLOBALS['PMA_Theme'] = Theme::load('./themes/pmahomme');
+$GLOBALS['PMA_Theme'] = Theme::load(ROOT_PATH . 'themes/pmahomme');
$_SESSION['tmpval']['pftext'] = 'F';
$GLOBALS['lang'] = 'en';