Compare commits

...

3 Commits

Author SHA1 Message Date
Clemens Schwaighofer
799cff4e00 Update config base files 2016-07-12 17:55:10 +09:00
Clemens Schwaighofer
72ef4a24c5 Check in neutral config.inc file before we set it to update ignore 2016-07-12 17:42:54 +09:00
Clemens Schwaighofer
0f44aaf3e4 Update config.inc file 2016-07-12 17:37:58 +09:00
2 changed files with 51 additions and 39 deletions

View File

@@ -9,9 +9,9 @@
/************* SESSION NAMES *************/ /************* SESSION NAMES *************/
// backend // backend
DEFINE('EDIT_SESSION_NAME', "ADMIN_SESSION_NAME"); DEFINE('EDIT_SESSION_NAME', "<ADMIN SESSION NAME>");
// frontend // frontend
DEFINE('SESSION_NAME', "SESSION_NAME"); DEFINE('SESSION_NAME', "<SESSION NAME>");
/************* LANGUAGE / ENCODING *******/ /************* LANGUAGE / ENCODING *******/
DEFINE('DEFAULT_LANG', "en_utf8"); DEFINE('DEFAULT_LANG', "en_utf8");
@@ -34,7 +34,7 @@
DEFINE('ROOT', getcwd()."/"); DEFINE('ROOT', getcwd()."/");
// libs path // libs path
DEFINE('LIBS', "libs/"); DEFINE('LIBS', "libs/");
// includes (strings, arrays for stati, etc) // includes (strings, arrays for static, etc)
DEFINE('INCLUDES', "includes/"); DEFINE('INCLUDES', "includes/");
// layout base path // layout base path
DEFINE('LAYOUT', 'layout/'); DEFINE('LAYOUT', 'layout/');
@@ -85,7 +85,7 @@
/************* HASH / ACL DEFAULT / ERROR SETTINGS / SMARTY *************/ /************* HASH / ACL DEFAULT / ERROR SETTINGS / SMARTY *************/
// default hash type // default hash type
DEFINE('DEFAULT_HASH', 'ripemd160'); DEFINE('DEFAULT_HASH', 'sha256');
// default acl level // default acl level
DEFINE('DEFAULT_ACL_LEVEL', 80); DEFINE('DEFAULT_ACL_LEVEL', 80);
// default levels for certain actions // default levels for certain actions
@@ -97,7 +97,7 @@
DEFINE('DEFAULT_ACL_DEL', 80); DEFINE('DEFAULT_ACL_DEL', 80);
DEFINE('DEFAULT_ACL_ADMIN', 100); */ DEFINE('DEFAULT_ACL_ADMIN', 100); */
// SSL host name // SSL host name
// DEFINE('SSL_HOST', "www4.adidas.co.jp"); // DEFINE('SSL_HOST', "ssl.host.name");
// error page strictness, Default is 3 // error page strictness, Default is 3
// 1: only show error page as the last mesure if really no mid & aid can be loaded and found at all // 1: only show error page as the last mesure if really no mid & aid can be loaded and found at all
// 2: if template not found, do not search, show error template // 2: if template not found, do not search, show error template
@@ -106,7 +106,7 @@
// DEFINE('ERROR_STRICT', 3); // DEFINE('ERROR_STRICT', 3);
// allow page caching in general, set to "FALSE" if you do debugging or development! // allow page caching in general, set to "FALSE" if you do debugging or development!
// DEFINE('ALLOW_SMARTY_CACHE', FALSE); // DEFINE('ALLOW_SMARTY_CACHE', FALSE);
// cache life time, in second', default here is 2 days (172800s) // cache life time, in seconds, default here is 2 days (172800s)
// -1 is never expire cache // -1 is never expire cache
// DEFINE('SMARTY_CACHE_LIFETIME', -1); // DEFINE('SMARTY_CACHE_LIFETIME', -1);
@@ -135,17 +135,23 @@
// live_queue is a global queue system // live_queue is a global queue system
// DEFINE('QUEUE', 'live_queue'); // DEFINE('QUEUE', 'live_queue');
/************* DB PATHS (PostgreSQL) *****************/
// schema names, can also be defined per <DB INFO>
DEFINE('PUBLIC_SCHEMA', 'public');
DEFINE('DEV_SCHEMA', 'public');
DEFINE('TEST_SCHEMA', 'public');
// non constant part // non constant part
/************* DB ACCESS *****************/ /************* DB ACCESS *****************/
// please be VERY carefull only to change the right side // please be VERY carefull only to change the right side
$DB_CONFIG = array( $DB_CONFIG = array(
"test" => array ( "<db id>" => array (
"db_name" => "gullevek", "db_name" => "<database>",
"db_user" => "gullevek", "db_user" => "<user>",
"db_pass" => "gullevek", "db_pass" => "<password>",
"db_host" => "db.tokyo.tequila.jp", "db_host" => "<host>",
"db_port" => "5432", "db_port" => "5432",
"db_schema" => "public", "db_schema" => "public", // if not set, uses public
"db_type" => "pgsql", "db_type" => "pgsql",
"db_encoding" => '', "db_encoding" => '',
"db_ssl" => 'disable' // allow, disable, require, prefer "db_ssl" => 'disable' // allow, disable, require, prefer
@@ -160,27 +166,19 @@
// each host has a different db_host // each host has a different db_host
// development host // development host
$DB_HOST['soba'] = "test"; $DB_HOST['<host>'] = "<db id>";
$DB_HOST['soba.tokyo.tequila.jp'] = "test";
// target host (live) // target host (live)
// $DB_TARGET_HOST['soba'] = "<DB ID>"; // $DB_TARGET_HOST['<host>'] = "<DB ID>";
// url redirect database // url redirect database
// $DB_URL_REDIRECT_HOST['soba'] = "<DB ID>"; // $DB_URL_REDIRECT_HOST['<host>'] = "<DB ID>";
// location flagging // location flagging
// test/dev/live // test/dev/live
$LOCATION['soba'] = 'test'; $LOCATION['<host>'] = '<test|live|remote|etc>';
$LOCATION['soba.tokyo.tequila.jp'] = 'test';
// show DEBUG override // show DEBUG override
// true/false // true/false
$DEBUG_FLAG['soba'] = true; $DEBUG_FLAG['<host>'] = true;
$DEBUG_FLAG['soba.tokyo.tequila.jp'] = true; // set postgresql paths (schemas)
// schema names, can also be defined per <DB INFO> $DB_PATH['<host>'] = PUBLIC_SCHEMA;
DEFINE('PUBLIC_SCHEMA', 'public');
DEFINE('DEV_SCHEMA', 'public');
DEFINE('TEST_SCHEMA', 'public');
// and set to domain
$DB_PATH['soba'] = PUBLIC_SCHEMA;
$DB_PATH['soba.tokyo.tequila.jp'] = PUBLIC_SCHEMA;
// set the USE_DATABASE var, if there is nothing set, we assume TRUE // set the USE_DATABASE var, if there is nothing set, we assume TRUE
$USE_DATABASE = defined('USE_DATABASE') ? USE_DATABASE : true; $USE_DATABASE = defined('USE_DATABASE') ? USE_DATABASE : true;
@@ -206,7 +204,7 @@
// DEFINE('TEST_SCHEMA', $DB_CONFIG[MAIN_DB]['db_schema']); // DEFINE('TEST_SCHEMA', $DB_CONFIG[MAIN_DB]['db_schema']);
// DEFINE('PUBLIC_SCHEMA', $DB_CONFIG[TARGET_DB]['db_schema']); // DEFINE('PUBLIC_SCHEMA', $DB_CONFIG[TARGET_DB]['db_schema']);
DEFINE('LOGIN_DB_SCHEMA', 'public'); // where the edit* tables are DEFINE('LOGIN_DB_SCHEMA', 'public'); // where the edit* tables are
DEFINE('GLOBAL_DB_SCHEMA', 'public'); // where global tables are that are used by all schemas (eg queue tables for online', etc) DEFINE('GLOBAL_DB_SCHEMA', 'public'); // where global tables are that are used by all schemas (eg queue tables for online, etc)
DEFINE('TARGET', $LOCATION[$HOST_NAME]); DEFINE('TARGET', $LOCATION[$HOST_NAME]);
// DEFINE('CSV_PATH', $PATHS[TARGET]['csv_path']); // DEFINE('CSV_PATH', $PATHS[TARGET]['csv_path']);
// DEFINE('EXPORT_SCRIPT', $PATHS[TARGET]['perl_bin']); // DEFINE('EXPORT_SCRIPT', $PATHS[TARGET]['perl_bin']);

View File

@@ -30,11 +30,11 @@
DEFINE('TABLEARRAYDIR', DIR.'table_arrays/'); DEFINE('TABLEARRAYDIR', DIR.'table_arrays/');
// ** OLD DIR DECLARATIONS ** // ** OLD DIR DECLARATIONS **
// path to document root // path to document root of file called
DEFINE('ROOT', getcwd()."/"); DEFINE('ROOT', getcwd()."/");
// libs path // libs path
DEFINE('LIBS', "libs/"); DEFINE('LIBS', "libs/");
// includes (strings', arrays for stati, etc) // includes (strings, arrays for static, etc)
DEFINE('INCLUDES', "includes/"); DEFINE('INCLUDES', "includes/");
// layout base path // layout base path
DEFINE('LAYOUT', 'layout/'); DEFINE('LAYOUT', 'layout/');
@@ -85,7 +85,7 @@
/************* HASH / ACL DEFAULT / ERROR SETTINGS / SMARTY *************/ /************* HASH / ACL DEFAULT / ERROR SETTINGS / SMARTY *************/
// default hash type // default hash type
DEFINE('DEFAULT_HASH', 'ripemd160'); DEFINE('DEFAULT_HASH', 'sha256');
// default acl level // default acl level
DEFINE('DEFAULT_ACL_LEVEL', 80); DEFINE('DEFAULT_ACL_LEVEL', 80);
// default levels for certain actions // default levels for certain actions
@@ -97,7 +97,7 @@
DEFINE('DEFAULT_ACL_DEL', 80); DEFINE('DEFAULT_ACL_DEL', 80);
DEFINE('DEFAULT_ACL_ADMIN', 100); */ DEFINE('DEFAULT_ACL_ADMIN', 100); */
// SSL host name // SSL host name
// DEFINE('SSL_HOST', "www4.adidas.co.jp"); // DEFINE('SSL_HOST', "ssl.host.name");
// error page strictness, Default is 3 // error page strictness, Default is 3
// 1: only show error page as the last mesure if really no mid & aid can be loaded and found at all // 1: only show error page as the last mesure if really no mid & aid can be loaded and found at all
// 2: if template not found, do not search, show error template // 2: if template not found, do not search, show error template
@@ -135,6 +135,12 @@
// live_queue is a global queue system // live_queue is a global queue system
// DEFINE('QUEUE', 'live_queue'); // DEFINE('QUEUE', 'live_queue');
/************* DB PATHS (PostgreSQL) *****************/
// schema names, can also be defined per <DB INFO>
DEFINE('PUBLIC_SCHEMA', 'public');
DEFINE('DEV_SCHEMA', 'public');
DEFINE('TEST_SCHEMA', 'public');
// non constant part // non constant part
/************* DB ACCESS *****************/ /************* DB ACCESS *****************/
// please be VERY carefull only to change the right side // please be VERY carefull only to change the right side
@@ -145,8 +151,9 @@
"db_pass" => "<DB PASSWORD>", "db_pass" => "<DB PASSWORD>",
"db_host" => "<DB HOST>", "db_host" => "<DB HOST>",
"db_port" => "5432", "db_port" => "5432",
"db_schema" => "<DB SCHEMA>", "db_schema" => "<DB SCHEMA>", // if not set, uses public
"db_type" => "pgsql", "db_type" => "pgsql",
"db_encoding" => '',
"db_ssl" => 'disable' // allow, disable, require, prefer "db_ssl" => 'disable' // allow, disable, require, prefer
) )
); );
@@ -166,15 +173,11 @@
// $DB_URL_REDIRECT_HOST['<HOST NAME>'] = "<DB ID>"; // $DB_URL_REDIRECT_HOST['<HOST NAME>'] = "<DB ID>";
// location flagging // location flagging
// test/dev/live // test/dev/live
$LOCATION['<HOST NAME>'] = 'test'; $LOCATION['<HOST NAME>'] = '<test|live|remote|etc>';
// show DEBUG override // show DEBUG override
// true/false // true/false
$DEBUG_FLAG['<HOST NAME>'] = true; $DEBUG_FLAG['<HOST NAME>'] = true;
// schema names, can also be defined per <DB INFO> // set postgresql paths (schemas)
DEFINE('PUBLIC_SCHEMA', 'public');
DEFINE('DEV_SCHEMA', 'public');
DEFINE('TEST_SCHEMA', 'public');
// and set to domain
$DB_PATH['<HOST NAME>'] = PUBLIC_SCHEMA; $DB_PATH['<HOST NAME>'] = PUBLIC_SCHEMA;
// set the USE_DATABASE var, if there is nothing set, we assume TRUE // set the USE_DATABASE var, if there is nothing set, we assume TRUE
@@ -207,6 +210,7 @@
// DEFINE('EXPORT_SCRIPT', $PATHS[TARGET]['perl_bin']); // DEFINE('EXPORT_SCRIPT', $PATHS[TARGET]['perl_bin']);
// DEFINE('REDIRECT_URL', $PATHS[TARGET]['redirect_url']); // DEFINE('REDIRECT_URL', $PATHS[TARGET]['redirect_url']);
DEFINE('DEBUG', $DEBUG_FLAG[$HOST_NAME]); DEFINE('DEBUG', $DEBUG_FLAG[$HOST_NAME]);
DEFINE('SHOW_ALL_ERRORS', false); // show all errors if debug_all & show_error_handling are enabled
/************* GENERAL PAGE TITLE ********/ /************* GENERAL PAGE TITLE ********/
$G_TITLE = '<OVERALL PAGE TITLE>'; $G_TITLE = '<OVERALL PAGE TITLE>';
@@ -234,6 +238,16 @@
} }
} }
// turn off debug if debug flag is OFF
if (DEBUG == false)
{
$ECHO_ALL = 0;
$DEBUG_ALL = 0;
$PRINT_ALL = 0;
$DB_DEBUG = 0;
$ENABLE_ERROR_HANDLING = 0;
}
// any other global definitons here // any other global definitons here
// DEFINE('SOME_ID', <SOME VALUE>); // DEFINE('SOME_ID', <SOME VALUE>);