switched okapi settings from lib/ to config2/settings.inc.php
This commit is contained in:
@@ -10,7 +10,10 @@ function get_okapi_settings()
|
||||
# [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
|
||||
|
||||
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(
|
||||
|
||||
@@ -18,24 +21,25 @@ function get_okapi_settings()
|
||||
|
||||
'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.
|
||||
'DATA_LICENSE_URL' => $opt['logic']['license']['terms'],
|
||||
|
||||
# Settings which ARE present in settings.inc.php:
|
||||
|
||||
'ADMINS' => array($sql_errormail,'rygielski@mimuw.edu.pl'),
|
||||
'FROM_FIELD' => $emailaddr,
|
||||
'DEBUG' => $debug_page,
|
||||
'DEBUG_PREVENT_SEMAPHORES' => $disable_semaphores, # not available on current developer system
|
||||
'DB_SERVER' => $dbserver,
|
||||
'DB_NAME' => $dbname,
|
||||
'DB_USERNAME' => $dbusername,
|
||||
'DB_PASSWORD' => $dbpasswd,
|
||||
'SITELANG' => $lang,
|
||||
'TIMEZONE' => $timezone, # BTW, OCPL doesn't have it in settings.inc.php
|
||||
'SITE_URL' => $absolute_server_URI,
|
||||
'VAR_DIR' => $GLOBALS['rootpath'].'var',
|
||||
'IMAGES_DIR' => rtrim($picdir, '/'),
|
||||
'OC_NODE_ID' => $oc_nodeid,
|
||||
'OC_COOKIE_NAME' => $opt['cookie']['name'].'data',
|
||||
'ADMINS' => array($opt['db']['warn']['mail'],'rygielski@mimuw.edu.pl'),
|
||||
'FROM_FIELD' => $opt['mail']['contact'],
|
||||
'DATA_LICENSE_URL' => $opt['page']['absolute_url'] . $opt['logic']['license']['terms'],
|
||||
'DEBUG' => ($opt['debug'] & DEBUG_DEVELOPER != 0),
|
||||
'DEBUG_PREVENT_SEMAPHORES'
|
||||
=> !$opt['php']['semaphores'], # not available on current developer system
|
||||
'DB_SERVER' => $opt['db']['servername'],
|
||||
'DB_NAME' => $opt['db']['placeholder']['db'],
|
||||
'DB_USERNAME' => $opt['db']['username'],
|
||||
'DB_PASSWORD' => $opt['db']['password'],
|
||||
'SITELANG' => strtolower($opt['template']['default']['locale']),
|
||||
'TIMEZONE' => $opt['php']['timezone'], # BTW, OCPL doesn't have it in settings.inc.php
|
||||
'SITE_URL' => $opt['page']['absolute_url'],
|
||||
'VAR_DIR' => $GLOBALS['rootpath'].'var',
|
||||
'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