forked from opencaching/opencaching-pl
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathokapi_settings.php
More file actions
62 lines (52 loc) · 2.81 KB
/
okapi_settings.php
File metadata and controls
62 lines (52 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php
namespace okapi;
function get_okapi_settings()
{
# This comment is here for all international OC developers. This
# file serves as an example of how to implement it on other sites.
# These settings are for OCPL site, but they should work with most
# others too.
# Note, that this file should be located outside of OKAPI directory,
# directly in your root path.
# OKAPI needs this file present. Every OC site has to provide it.
# Since OC sites differ (they don't even have a common-structured
# settings file), all sites have to provide a valid mapping from
# *their* settings to OKAPI settings.
# Note, that this function needs to execute FAST. If your default
# settings file is not a simple $variable="value" mapping, then you
# *should* *hardcode* the settings below, instead of including your
# slow settings file!
# OKAPI defines only *one* global variable, named 'rootpath'.
# You may access it to get a proper path to your own settings file.
require(__DIR__.'/lib/settingsGlue.inc.php'); # (into the *local* scope)
return array(
# These first section of settings is OKAPI-specific, OCPL's
# settings.inc.php file does not provide them. For more
# OKAPI-specific settings, see okapi/settings.php file.
'OC_BRANCH' => 'oc.pl',
'EXTERNAL_AUTOLOADER' => __DIR__.'/lib/ClassPathDictionary.php',
# Copy the rest from settings.inc.php:
'DATA_LICENSE_URL' => $config['okapi']['data_license_url'],
'ADMINS' => ($config['okapi']['admin_emails'] ? $config['okapi']['admin_emails'] : array($sql_errormail, 'rygielski@mimuw.edu.pl', 'following@online.de')),
'FROM_FIELD' => $emailaddr,
'DEBUG' => $debug_page,
'DB_SERVER' => $dbserver,
'DB_NAME' => $dbname,
'DB_USERNAME' => $dbusername,
'DB_PASSWORD' => $dbpasswd,
'SITELANG' => 'en', //TODO: how to read it from I18n class?
'SITELANGS' => array_map('strtolower', $config['defaultLanguageList']),
'SITE_URL' => isset($OKAPI_server_URI) ? $OKAPI_server_URI : $absolute_server_URI,
'VAR_DIR' => rtrim($dynbasepath, '/'),
'TILEMAP_FONT_PATH' => $config['okapi']['tilemap_font_path'],
'IMAGES_DIR' => rtrim($picdir, '/'),
'IMAGES_URL' => rtrim($picurl, '/').'/',
'IMAGE_MAX_UPLOAD_SIZE' => $config['limits']['image']['filesize'] * 1024 * 1024,
'IMAGE_MAX_PIXEL_COUNT' => $config['limits']['image']['height'] * $config['limits']['image']['width'],
'OC_NODE_ID' => $oc_nodeid,
'OC_COOKIE_NAME' => $config['cookie']['name'].'_auth',
//'OCPL_ENABLE_GEOCACHE_ACCESS_LOGS' => isset($enable_cache_access_logs) ? $enable_cache_access_logs : false
'OCPL_ENABLE_GEOCACHE_ACCESS_LOGS' => false,
'USE_SQL_SUBQUERIES' => true,
);
}