summaryrefslogblamecommitdiffstats
path: root/config.php.example
blob: 2ea6950237738072ee043f08b70e2ad6702a3dec (plain) (tree)
1
2
3
4
5
6
7




                                                                     

                                                               














                                                                                                                                                      








                                                                                                     
                           







                                                                                                 
            
<?php

// This might leak sensitive information. Never enable in production!
define('CONFIG_DEBUG', true);
define('CONFIG_PREFIX', '/webif/');
define('CONFIG_SESSION_TIMEOUT', 86400 * 7);
define('CONFIG_FORCE_DOMAIN', 'my.server.address.example.com');
define('CONFIG_ENTITLEMENT', ';http://bwidm.de/entitlement/bwLehrpool;');
define('CONFIG_SUITE', 'bwLehrpool');
define('CONFIG_HELPURL', 'www.bwlehrpool.de');
define('CONFIG_FOOTER_SUPPORT', '//www.hs-offenburg.de/rz/projekte/bwlehrpool-servicedesk/');
define('CONFIG_MASTERWEBIF', 'https://bwlp-masterserver.ruf.uni-freiburg.de/webif/');
define('CONFIG_IDM', 'bwIDM');
define('CONFIG_PROVIDER', 'Universität Freiburg');

define('CONFIG_ADMINS', serialize(array('5fb22037697816a70a847d15245c9f88', '94e48d34587ab9963a2013ddc97e1e45', 'fb91f270a95a5b006be916f2b2da305c')));

define('CONFIG_IDM_LINK_SN', 'https://www.bwidm.de/attribute/#surname');
define('CONFIG_IDM_LINK_GIVENNAME', 'https://www.bwidm.de/attribute/#givenName');
define('CONFIG_IDM_LINK_MAIL', 'https://www.bwidm.de/attribute/#mail');
define('CONFIG_IDM_LINK_PID', 'https://www.bwidm.de/attribute/#IdPPersistentNameIdentifier');
define('CONFIG_IDM_LINK_EPSA', 'https://www.bwidm.de/attribute/#eduPersonScopedAffiliation');

// Have a properties file or set variables here manually.
// Make sure properties file is not in webroot
$lines = @file('/some/where/config/mysql.properties', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
$key = array();
foreach ($lines as $line) {
	if (preg_match('/^\s*(.+?)\s*=\s*(\S*)\s*$/', $line, $out))
		$key[$out[1]] = $out[2];
}
unset($lines, $line, $out);
if (empty($key['host']) || empty($key['db']) || empty($key['user']) || empty($key['password'])) {
	die('Missing database config');
}

define('CONFIG_SQL_DSN', "mysql:dbname={$key['db']};host={$key['host']}");
define('CONFIG_SQL_USER', $key['user']);
define('CONFIG_SQL_PASS', $key['password']);
define('CONFIG_SQL_FORCE_UTF8', true);
unset($key);