fix backend
This commit is contained in:
@@ -74,22 +74,21 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
$active_group = 'default';
|
||||
$query_builder = TRUE;
|
||||
|
||||
// load back end here -----
|
||||
require_once('backend.php');
|
||||
|
||||
$show_database_error = true;
|
||||
$is_live = $wrenchboard->cfgReadChar("system.live");
|
||||
if ($is_live == false) {
|
||||
$show_database_error = false;
|
||||
}
|
||||
|
||||
$arr = array();
|
||||
$arr["host"] = "127.0.0.1";
|
||||
$arr["name"] = "wrenchboard";
|
||||
$arr["user"] = "wrenchboard";
|
||||
$arr["pass"] = "wrenchboard";
|
||||
$arr["port"] = 5432;
|
||||
|
||||
$db['default'] = array(
|
||||
'dsn' => '',
|
||||
'hostname' => $wrenchboard->cfgReadChar("database.host"),
|
||||
'username' => $wrenchboard->cfgReadChar("database.user"),
|
||||
'password' => $wrenchboard->cfgReadChar("database.pass"),
|
||||
'database' => $wrenchboard->cfgReadChar("database.name"),
|
||||
'hostname' => $arr["host"],
|
||||
'username' => $arr["user"],
|
||||
'password' => $arr["pass"],
|
||||
'database' => $arr["name"],
|
||||
'dbdriver' => 'postgre',
|
||||
'dbprefix' => '',
|
||||
'pconnect' => FALSE,
|
||||
@@ -106,4 +105,3 @@ $db['default'] = array(
|
||||
'failover' => array(),
|
||||
'save_queries' => TRUE
|
||||
);
|
||||
|
||||
|
||||
+22
@@ -1,4 +1,5 @@
|
||||
<?
|
||||
/*
|
||||
if (!array_key_exists('wrenchboard', $GLOBALS)) {
|
||||
$USER = $_SERVER['SCRIPT_FILENAME'];
|
||||
$USER = str_replace('/home', '', $USER);
|
||||
@@ -9,4 +10,25 @@ if (!array_key_exists('wrenchboard', $GLOBALS)) {
|
||||
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
|
||||
$wrenchboard = new $wrenchboard_class();
|
||||
}
|
||||
*/
|
||||
class wrenchboard_class {
|
||||
|
||||
|
||||
public function wrenchboard_api(array $in, array $out){
|
||||
$arr = array();
|
||||
|
||||
return $arr;
|
||||
}
|
||||
|
||||
public function cfgReadChar($whatSetting){
|
||||
$arr = array();
|
||||
|
||||
return $arr;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$wrenchboard = new wrenchboard_class();
|
||||
|
||||
|
||||
?>
|
||||
|
||||
@@ -14,6 +14,7 @@ RUN apt-get install -y \
|
||||
libmcrypt-dev \
|
||||
libreadline-dev \
|
||||
libfreetype6-dev \
|
||||
libpq-dev \
|
||||
g++
|
||||
|
||||
RUN docker-php-ext-install \
|
||||
@@ -23,7 +24,9 @@ RUN docker-php-ext-install \
|
||||
opcache \
|
||||
calendar \
|
||||
pdo_mysql \
|
||||
mysqli
|
||||
mysqli \
|
||||
pdo \
|
||||
pdo_pgsql
|
||||
|
||||
# 2. set up document root for apache
|
||||
COPY docker/apache/000-default.conf /etc/apache2/sites-available/000-default.conf
|
||||
|
||||
Reference in New Issue
Block a user