Files
oc-server3/htdocs/okapi_settings.php
Wojciech Rygielski 624efe7196 Added okapi_settings.php for OCDE
Recent versions of OKAPI (since r438) are indepentant - OKAPI does NOT
include OC code at all, not even the settings file (since various OC
installations had the settings file in various locations). Instead,
OKAPI requires one new file present in the root path -
okapi_settings.php file.

More information:

[1] http://code.google.com/p/opencaching-pl/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
2012-10-27 15:37:50 +02:00

1 line
1.2 KiB
PHP

<?
namespace okapi;
function get_okapi_settings()
{
# Settings for OKAPI. See the following URLs for more info:
#
# [1] http://code.google.com/p/opencaching-pl/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
require($GLOBALS['rootpath'].'lib/settings.inc.php'); # (into the *local* scope!)
return array(
# Settings which ARE NOT present in settings.inc.php:
'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' => null, # TODO!
# Settings which ARE present in settings.inc.php:
'ADMINS' => array($sql_errormail),
'FROM_FIELD' => $emailaddr,
'DEBUG' => $debug_page,
'DB_SERVER' => $dbserver,
'DB_NAME' => $dbname,
'DB_USERNAME' => $dbusername,
'DB_PASSWORD' => $dbpasswd,
'SITELANG' => $lang,
'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',
);
}