switched okapi settings from lib/ to config2/settings.inc.php
This commit is contained in:
@@ -34,6 +34,7 @@
|
|||||||
* mysql.trace_mode = On
|
* mysql.trace_mode = On
|
||||||
*/
|
*/
|
||||||
$opt['php']['debug'] = PHP_DEBUG_ON;
|
$opt['php']['debug'] = PHP_DEBUG_ON;
|
||||||
|
$opt['php']['semaphores'] = false;
|
||||||
|
|
||||||
/* settings for the template engine
|
/* settings for the template engine
|
||||||
*
|
*
|
||||||
@@ -75,7 +76,7 @@
|
|||||||
/* other template options
|
/* other template options
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
$opt['page']['absolute_url'] = $dev_baseurl;
|
$opt['page']['absolute_url'] = $dev_baseurl . "/";
|
||||||
$opt['page']['develsystem'] = true;
|
$opt['page']['develsystem'] = true;
|
||||||
$opt['mail']['from'] = 'root';
|
$opt['mail']['from'] = 'root';
|
||||||
$opt['mail']['subject'] = '[local.opencaching.de] ';
|
$opt['mail']['subject'] = '[local.opencaching.de] ';
|
||||||
@@ -83,7 +84,7 @@
|
|||||||
/* location of uploaded images
|
/* location of uploaded images
|
||||||
*/
|
*/
|
||||||
$opt['logic']['pictures']['dir'] = $dev_basepath . $dev_codepath . 'htdocs/images/uploads';
|
$opt['logic']['pictures']['dir'] = $dev_basepath . $dev_codepath . 'htdocs/images/uploads';
|
||||||
$opt['logic']['pictures']['url'] = $opt['page']['absolute_url'] . '/images/uploads';
|
$opt['logic']['pictures']['url'] = $opt['page']['absolute_url'] . 'images/uploads';
|
||||||
$opt['logic']['pictures']['thumb_url'] = $opt['logic']['pictures']['url'] . '/thumbs';
|
$opt['logic']['pictures']['thumb_url'] = $opt['logic']['pictures']['url'] . '/thumbs';
|
||||||
|
|
||||||
/* E-Mail for notification about news (newstopic.php)
|
/* E-Mail for notification about news (newstopic.php)
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
*/
|
*/
|
||||||
$opt['php']['debug'] = PHP_DEBUG_SKIP;
|
$opt['php']['debug'] = PHP_DEBUG_SKIP;
|
||||||
$opt['php']['timezone'] = 'Europe/Berlin';
|
$opt['php']['timezone'] = 'Europe/Berlin';
|
||||||
|
$opt['php']['semaphores'] = true;
|
||||||
|
|
||||||
// database connection
|
// database connection
|
||||||
|
|
||||||
@@ -364,7 +365,7 @@
|
|||||||
$opt['logic']['license']['newusers'] = 2; // see license constants in lib2/logic/const.inc.php
|
$opt['logic']['license']['newusers'] = 2; // see license constants in lib2/logic/const.inc.php
|
||||||
$opt['logic']['license']['admin'] = true;
|
$opt['logic']['license']['admin'] = true;
|
||||||
$opt['logic']['license']['disclaimer'] = false;
|
$opt['logic']['license']['disclaimer'] = false;
|
||||||
$opt['logic']['license']['terms'] = 'http://www.opencaching.de/articles.php?page=impressum#datalicense';
|
$opt['logic']['license']['terms'] = 'articles.php?page=impressum#datalicense';
|
||||||
// 'disclaimer' and 'terms' also in lib/settings.inc.php
|
// 'disclaimer' and 'terms' also in lib/settings.inc.php
|
||||||
|
|
||||||
/* Database charset
|
/* Database charset
|
||||||
|
|||||||
@@ -174,7 +174,4 @@
|
|||||||
$opt['template']['locales']['DA']['show'] = false;
|
$opt['template']['locales']['DA']['show'] = false;
|
||||||
$opt['template']['locales']['PT']['show'] = false;
|
$opt['template']['locales']['PT']['show'] = false;
|
||||||
$opt['template']['locales']['JA']['show'] = false;
|
$opt['template']['locales']['JA']['show'] = false;
|
||||||
|
|
||||||
// OKAPI settings
|
|
||||||
$disable_semaphores = true;
|
|
||||||
?>
|
?>
|
||||||
@@ -211,10 +211,6 @@
|
|||||||
// you can use -1 to use the master (not recommended, because replicated to slaves)
|
// you can use -1 to use the master (not recommended, because replicated to slaves)
|
||||||
$opt['db']['slave']['primary'] = -1;
|
$opt['db']['slave']['primary'] = -1;
|
||||||
|
|
||||||
// OKAPI settings
|
|
||||||
$disable_semaphores = false;
|
|
||||||
|
|
||||||
|
|
||||||
/* post_config() is invoked directly before the first HTML line of the main.tpl.php is sent to the client.
|
/* post_config() is invoked directly before the first HTML line of the main.tpl.php is sent to the client.
|
||||||
*/
|
*/
|
||||||
function post_config()
|
function post_config()
|
||||||
|
|||||||
@@ -10,7 +10,10 @@ function get_okapi_settings()
|
|||||||
# [2] http://code.google.com/p/opencaching-api/source/browse/trunk/okapi/settings.php
|
# [2] http://code.google.com/p/opencaching-api/source/browse/trunk/okapi/settings.php
|
||||||
# [3] http://code.google.com/p/opencaching-api/issues/detail?id=132
|
# [3] http://code.google.com/p/opencaching-api/issues/detail?id=132
|
||||||
|
|
||||||
require($GLOBALS['rootpath'].'lib/settings.inc.php'); # (into the *local* scope!)
|
$opt['rootpath'] = $GLOBALS['rootpath'];
|
||||||
|
require($opt['rootpath'].'lib2/const.inc.php'); # (into the *local* scope!)
|
||||||
|
require($opt['rootpath'].'config2/settings-dist.inc.php');
|
||||||
|
require($opt['rootpath'].'config2/settings.inc.php');
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
|
|
||||||
@@ -18,24 +21,25 @@ function get_okapi_settings()
|
|||||||
|
|
||||||
'OC_BRANCH' => 'oc.de', # Tell OKAPI to work in "OCDE mode".
|
'OC_BRANCH' => 'oc.de', # Tell OKAPI to work in "OCDE mode".
|
||||||
'SUPPORTS_LOGTYPE_NEEDS_MAINTENANCE' => false, # OCDE doesn't support it, see [2] for more info.
|
'SUPPORTS_LOGTYPE_NEEDS_MAINTENANCE' => false, # OCDE doesn't support it, see [2] for more info.
|
||||||
'DATA_LICENSE_URL' => $opt['logic']['license']['terms'],
|
|
||||||
|
|
||||||
# Settings which ARE present in settings.inc.php:
|
# Settings which ARE present in settings.inc.php:
|
||||||
|
|
||||||
'ADMINS' => array($sql_errormail,'rygielski@mimuw.edu.pl'),
|
'ADMINS' => array($opt['db']['warn']['mail'],'rygielski@mimuw.edu.pl'),
|
||||||
'FROM_FIELD' => $emailaddr,
|
'FROM_FIELD' => $opt['mail']['contact'],
|
||||||
'DEBUG' => $debug_page,
|
'DATA_LICENSE_URL' => $opt['page']['absolute_url'] . $opt['logic']['license']['terms'],
|
||||||
'DEBUG_PREVENT_SEMAPHORES' => $disable_semaphores, # not available on current developer system
|
'DEBUG' => ($opt['debug'] & DEBUG_DEVELOPER != 0),
|
||||||
'DB_SERVER' => $dbserver,
|
'DEBUG_PREVENT_SEMAPHORES'
|
||||||
'DB_NAME' => $dbname,
|
=> !$opt['php']['semaphores'], # not available on current developer system
|
||||||
'DB_USERNAME' => $dbusername,
|
'DB_SERVER' => $opt['db']['servername'],
|
||||||
'DB_PASSWORD' => $dbpasswd,
|
'DB_NAME' => $opt['db']['placeholder']['db'],
|
||||||
'SITELANG' => $lang,
|
'DB_USERNAME' => $opt['db']['username'],
|
||||||
'TIMEZONE' => $timezone, # BTW, OCPL doesn't have it in settings.inc.php
|
'DB_PASSWORD' => $opt['db']['password'],
|
||||||
'SITE_URL' => $absolute_server_URI,
|
'SITELANG' => strtolower($opt['template']['default']['locale']),
|
||||||
'VAR_DIR' => $GLOBALS['rootpath'].'var',
|
'TIMEZONE' => $opt['php']['timezone'], # BTW, OCPL doesn't have it in settings.inc.php
|
||||||
'IMAGES_DIR' => rtrim($picdir, '/'),
|
'SITE_URL' => $opt['page']['absolute_url'],
|
||||||
'OC_NODE_ID' => $oc_nodeid,
|
'VAR_DIR' => $GLOBALS['rootpath'].'var',
|
||||||
'OC_COOKIE_NAME' => $opt['cookie']['name'].'data',
|
'IMAGES_DIR' => rtrim($opt['logic']['pictures']['dir'], '/'),
|
||||||
|
'OC_NODE_ID' => $opt['logic']['node']['id'],
|
||||||
|
'OC_COOKIE_NAME' => $opt['session']['cookiename'].'data',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user