Completed
Push — development ( f93eb8...ffa1a0 )
by Thomas
20s
created

htdocs/lib/settings-dev.inc.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/****************************************************************************
3
 * ./lib/settings.inc.php
4
 * -------------------
5
 * begin                : Mon June 14 2004
6
 *
7
 * For license information see LICENSE.md
8
 ****************************************************************************/
9
10
/****************************************************************************
11
 * Default settings for OC.de developer system. See also
12
 *   - settings-dist.inc.php for sample settings
13
 *   - settings.inc.php for local settings
14
 *   - config2/settings* for version-2-code settings
15
 ****************************************************************************/
16
17
//relative path to the root directory
18
if (!isset($rootpath)) {
19
    $rootpath = __DIR__ . '/../';
20
}
21
22
//default used language
23
if (!isset($lang)) {
24
    $lang = 'de';
25
}
26
27
//default timezone
28
if (!isset($timezone)) {
29
    $timezone = 'Europe/Berlin';
30
}
31
32
//default used style
33
$style = 'ocstyle';
34
35
// include common settings of lib1 and lib2
36
require_once __DIR__ . '/../config2/settings-dist-common.inc.php';
37
38
//id of the node; see config2/settings-dist.inc.php
39
$oc_nodeid = 4;
40
$opt['logic']['node']['id'] = $oc_nodeid;
41
42
//name of the cookie
43
$opt['cookie']['name'] = 'ocvagrant';
44
$opt['cookie']['path'] = '/';
45
$opt['cookie']['domain'] = '.team-opencaching.de';
46
$opt['session']['cookiename'] = 'ocvagrant';
47
48
//name of the cookie
49
if (!isset($cookiename)) {
50
    $cookiename = $opt['cookie']['name'];
51
}
52
if (!isset($cookiepath)) {
53
    $cookiepath = $opt['cookie']['path'];
54
}
55
if (!isset($cookiedomain)) {
56
    $cookiedomain = $opt['cookie']['domain'];
57
}
58
59
//Debug?
60
if (!isset($debug_page)) {
61
    $debug_page = true;
62
}
63
$develWarning = '<div id="debugoc"><font size="5" face="arial" color="red"><center>Entwicklersystem - nur Testdaten</center></font></div>';
64
$sql_debug = isset($_REQUEST['sqldebug']) && $_REQUEST['sqldebug'] == 1;
65
66
set_absolute_urls(
67
    $opt,
68
    $dev_baseurl,
69
    isset($dev_shortlink_domain) ? $dev_shortlink_domain : 'opencaching.de',
70
    1
71
);
72
73
// display error messages on the website - not recommended for productive use!
74
$opt['db']['error']['display'] = true;
75
$opt['db']['error']['mail'] = 'root';
76
77
// EMail address of the sender and team
78
if (!isset($maildomain)) {
79
    $maildomain = 'local.team-opencaching.de';
80
}
81
if (!isset($emailaddr)) {
82
    $emailaddr = 'root@' . $maildomain;
83
}
84
if (!isset($opt['mail']['contact'])) {
85
    $opt['mail']['contact'] = 'contact@' . $maildomain;
86
}
87
88
$opt['page']['showdonations'] = true;
89
$opt['page']['showsocialmedia'] = true;
90
91
// date format
92
$opt['db']['dateformat'] = 'Y-m-d H:i:s';
93
94
// warnlevel for sql-execution
95
$sql_errormail = 'root';
96
$dberrormail = $sql_errormail;
97
$sql_warntime = 100000;
98
99
// replacements for sql()
0 ignored issues
show
Unused Code Comprehensibility introduced by
38% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
100
$sql_replacements['db'] = $dbname;
101
$sql_replacements['tmpdb'] = $tmpdbname;
102
103
// safemode_zip-binary
104
$safemode_zip = '/var/www/html/bin/phpzip.php';
105
$zip_basedir = $dev_basepath . ($dev_codepath == '*' ? '' : $dev_codepath . 'htdocs/') . 'download/zip/';
106
$zip_wwwdir = 'download/zip/';
107
108
$googlemap_key = '<key>';
109
$googlemap_type = 'G_MAP_TYPE'; // alternativ: _HYBRID_TYPE
110
111
$opt['translate']['debug'] = false;
112
113
$opt['tracking']['googleAnalytics'] = 'UA-59334952-4';
114
115
/* maximum number of failed logins per hour before that IP address is blocked
116
 * (used to prevent brute-force-attacks)
117
 */
118
$opt['page']['max_logins_per_hour'] = 1000; // for development ...
119
$opt['page']['headoverlay'] = 'oc_head_alpha3';
120
121
// data license
122
$opt['logic']['license']['disclaimer'] = true; // also in lib2/settings-dist.inc.php
123
$opt['logic']['license']['terms'] = $absolute_server_URI . 'articles.php?page=impressum#datalicense';
124
125
$opt['logic']['admin']['listingadmin_notification'] = 'root';
126
127
// include all locale settings
128
require_once __DIR__ . '/../config2/locale.inc.php';
129
130
/* replicated slave databases
131
 * use same config as in config2/settings.inc.php (!)
132
 */
133
$opt['db']['slaves'] = [];
134
$opt['db']['slave']['max_behind'] = 180;
135
136
// use this slave when a specific slave must be connected
137
// (e.g. xml-interface and mapserver-results)
138
// you can use -1 to use the master (not recommended, because replicated to slaves)
139
$opt['db']['slave']['primary'] = - 1;
140
141
// NL translation is incomplete, but can be tested
142
$opt['template']['locales']['NL']['status'] = OC_LOCALE_ACTIVE;
143