<?php  if (!defined('BASEPATH')) { exit('No direct script access allowed'); }
/**
 *******************************************************************************
 *
 * The main default values configuration file
 *
 *******************************************************************************
 *
 * <i>DO NOT CHANGE THIS FILE DIRECTLY!!</i>
 * <i>CHANGES WITHIN THIS FILE WILL BE CHANGED BACK AT THE NEXT SOFTWARE UPDATE!!</i>
 * <i>IF YOU WANT TO CHANGE A VALUE copy the entry to your config.php and change it there!!</i>
 *
 * @package config
 * @version $Id$
 */

/**
 *******************************************************************************
 * Date, time and base name
 *******************************************************************************
 */

/**
 * Default timezone used by the system
 *
 * {@source}
 *
 * @global  string $config['date_default_timezone']
 */
$config['date_default_timezone'] = 'Europe/Vienna';

/**
 * Default timezone used for caldav
 *
 * {@source}
 *
 * @global  string $config['date_default_timezone_ical']
 */
$config['date_default_timezone_ical'] = <<<EOT
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
DTSTART:19810329T020000
TZNAME:MESZ
TZOFFSETTO:+0200
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
DTSTART:19961027T030000
TZNAME:MEZ
TZOFFSETTO:+0100
END:STANDARD
EOT;

/**
 * Base Site URL
 *
 * URL to your CodeIgniter root. Typically this will be your base URL,
 * WITH a trailing slash:
 *
 * <samp>http://example.com/</samp>
 *
 * This has to be the full path to your untermStrich installation.
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global string $config['base_url']
 */
$use_https = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https');
$config['base_url'] = ($use_https ? 'https' : 'http');
$config['base_url'] .= ((isset($_SERVER['HTTP_HOST'])) ? '://' . $_SERVER['HTTP_HOST'] : '://localhost');
$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);
define('BASE_URL', $config['base_url']);

$config['base_url_path'] = str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);

/**
 *******************************************************************************
 * Error logging
 *******************************************************************************
 */

/**
 * Error Logging Threshold
 *
 * If you have enabled error logging, you can set an error threshold to
 * determine what gets logged. Threshold options are:
 * You can enable error logging by setting a threshold over zero. The
 * threshold determines what gets logged. Threshold options are:
 *
 *    <samp>0</samp>      Disables logging, Error logging TURNED OFF
 *    <samp>1</samp>      Error Messages (including PHP errors)
 *    <samp>2</samp>      Debug Messages
 *    <samp>3</samp>      Informational Messages
 *    <samp>4</samp>      All Messages
 *
 * For a live site you'll usually only enable Errors (1) to be logged otherwise
 * your log files will fill up very fast.
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global int $config['log_threshold']
 */
$config['log_threshold'] = 0;

/**
 * Error Logging Threshold for CalDAV/CardDAV
 *
 * If you have enabled CalDAV/CardDAV error logging, you can set an error threshold to
 * determine what gets logged. Threshold options are:
 * You can enable error logging by setting a threshold over zero. The
 * threshold determines what gets logged. Threshold options are:
 *
 *    <samp>0</samp>      Disables logging, Error logging TURNED OFF
 *    <samp>1</samp>      Error Messages (including PHP errors)
 *    <samp>2</samp>      Debug Messages
 *    <samp>3</samp>      Informational Messages
 *    <samp>4</samp>      All Messages
 *
 * For the CalDAV/CardDAV synchronizer you'll usually only enable Errors (1)
 * to be logged otherwise your log files will fill up very fast.
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global int $config['log_threshold']
 */
$config['dav_log_threshold'] = 0;

/**
 * Error Logging Threshold for email
 *
 * If you have enabled email error logging, you can set an error threshold to
 * determine what gets logged. Threshold options are:
 * You can enable error logging by setting a threshold over zero. The
 * threshold determines what gets logged. Threshold options are:
 *
 *    <samp>0</samp>      Disables logging, Error logging TURNED OFF
 *    <samp>1</samp>      Error Messages (including PHP errors)
 *    <samp>2</samp>      Debug Messages
 *    <samp>3</samp>      Informational Messages
 *    <samp>4</samp>      All Messages
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global int $config['log_threshold']
 */
$config['email_log_threshold'] = 0;

/**
 * Error Logging Threshold for nterfaces
 *
 * If you have enabled interfaces error logging, you can set an error threshold to
 * determine what gets logged. Threshold options are:
 * You can enable error logging by setting a threshold over zero. The
 * threshold determines what gets logged. Threshold options are:
 *
 *    <samp>0</samp>      Disables logging, Error logging TURNED OFF
 *    <samp>1</samp>      Error Messages (including PHP errors)
 *    <samp>2</samp>      Debug Messages
 *    <samp>3</samp>      Informational Messages
 *    <samp>4</samp>      All Messages
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global int $config['log_threshold']
 */
$config['interfaces_log_threshold'] = 0;

/**
 *******************************************************************************
 * US Authentication method
 *******************************************************************************
 */

/**
 * US Auth mode
 *
 * The US login auth mode
 *
 *    <samp>0</samp>      Undefined => fallback to 1 => just before update
 *    <samp>1</samp>      US => Standard US login
 *    <samp>2</samp>      Kerberos (NTLM/SSPI)
 *    <samp>3</samp>      LDAP Auth
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global int $config['us_auth_mode']
 */
$config['us_auth_mode'] = 0;

/**
 *******************************************************************************
 * Session
 *******************************************************************************
 */

/**
 * Encryption Key
 *
 * If you use the Encryption class or the Sessions class with encryption
 * enabled you MUST set an encryption key.  See the user guide for info.
 *
 * @global string $config['encryption_key']
 */
$config['encryption_key'] = 'rBfh92P4z23H8eNr23zQer9K238jdjPa';

/**
 * The number of SECONDS you want the session to last.
 *
 * By default sessions last 14400 seconds (four hours).  Set to zero for no expiration.
 *
 * <i>DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!</i>
 * @global int $config['sess_expiration']
 */
$config['sess_expiration'] = 14400;

/**
 * Whether to encrypt the cookie
 *
 * <i>DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!</i>
 * @global bool $config['sess_encrypt_cookie']
 */
$config['sess_encrypt_cookie'] = true;

/**
 * Match the session against the ip - For security reasons
 *
 * <i>DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!</i>
 * @global bool $config['sess_match_ip']
 */
$config['sess_match_ip'] = false;

/**
 * Match the session against the useragent - For security reasons
 *
 * <b>Warning: Activate this feature if you are _not_ using Microsoft Internet Explorer 9</b>
 *
 * <i>DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!</i>
 * @global bool $config['sess_match_useragent']
 */
$config['sess_match_useragent'] = false;

/**
 * How many seconds between CI refreshing Session Information
 *
 * 100 = Min value
 *
 * <i>DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!</i>
 * @global int $config['sess_time_to_update']
 */
$config['sess_time_to_update'] = 300;

/**
 * How many times the sess_time_to_update, to log of inactive users
 *
 * 2 = Min value
 *
 * <i>DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!</i>
 * @global int $config['sess_time_to_update_log_of_factor']
 */
$config['sess_time_to_update_log_of_factor'] = 3;

/**
 * Use the SharedWorker pinger
 *
 * Default: <samp>true</samp>
 *
 * <i>DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!</i>
 * @global int $config['sess_use_shared_pinger']
 */
$config['sess_use_shared_pinger'] = true;

/**
 * Login page, called from /start only
 *
 * You might want to change this this to ssologin.php if you use SSO and IE10.
 *
 * <i>DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!</i>
 * @global string $config['sess_login_page']
 */
$config['sess_login_page'] = '/q/login';

/**
 * Use long lasting (Sse_model)
 *
 * Default: <samp>true</samp>
 *
 * <i>DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!</i>
 * @global boolean $config['us_use_long_lasting']
 */
$config['us_use_long_lasting'] = true;

/**
 * Use session logging (Session_log_model)
 *
 * Default: <samp>false</samp>
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global boolean $config['us_use_session_logging']
 */
$config['us_use_session_logging'] = false;

/**
 *******************************************************************************
 * untermStrich reports config
 *******************************************************************************
 */

/**
 * This sets the maximum amount of memory in bytes that a report is allowed to allocate before it is terminated.
 *
 * Default: <samp>'200M'</samp>
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global string $config['us_memory_limit']
 */
$config['us_memory_limit'] = '200M';

/**
 * This sets the maximum time in seconds a report or section of a report is allowed to run before it is terminated.
 *
 * Default: <samp>360</samp>
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global int $config['us_max_execution_time']
 */
$config['us_max_execution_time'] = 360;

/**
 * Set the path to the java file. You will not be able to create any PDF or PNG file without a valid entry!
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global string $config['us_java_path']
 */
$config['us_java_path'] = 'java';

/**
 * Set the java allowed memory in MB.
 * (Min 100, default 512)
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global string $config['us_java_path']
 */
$config['us_java_mem_max'] = 512;

/**
 * Set the java initial memory in MB.
 * (Min 10, default 32)
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global string $config['us_java_path']
 */
$config['us_java_mem_init'] = 32;

/**
 * Either set the path to the xsltproc file, or leave it empty to use php's transformation function
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global string $config['us_xsltproc_path']
 */
$config['us_xsltproc_path'] = '';

/**
 * Switch from php to xsltproc if the xml file is bigger than us_xsltproc_filesize in bytes
 *
 * Default: <samp>1048576</samp> (1MB)
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global int $config['us_xsltproc_filesize']
 */
$config['us_xsltproc_filesize'] = 1048576;

/**
 * Set the path to the libreoffice file to use ODS/ODT to PDF conversion / Use export HOME to set temp
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global string $config['us_libreoffice_path']
 */
$config['us_libreoffice_path'] = '';
$config['us_libreoffice_set_temp'] = true;

/**
 * Use this to activate debugging for the process server
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global boolean $config['us_process_server_debug']
 */
$config['us_process_server_debug'] = false;

/**
 * Process server mode
 *
 * Default: <samp>'auto'</samp>
 * Force MS Office, when on Windows: <samp>'msoffice'</samp>
 * Force LibreOffice, when on Windows: <samp>'libreoffice'</samp>
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global string $config['us_process_server_mode']
 */
$config['us_process_server_mode'] = 'auto';

/**
 *******************************************************************************
 * untermStrich config
 *******************************************************************************
 */

/**
 * Realtime per Ping (Wait loops, each 1 second, for the long lasting ping in the active tab only. Will be terminated, if a message arises.)
 *
 * @global string $config['us_realtime_loops']
 */
$config['us_realtime_loops'] = 9;

/**
 * Realtime per Ping (Wait time between two pings on the active tab, or when there was a session ID only)
 *
 * @global string $config['us_realtime_act_wait']
 */
$config['us_realtime_act_wait'] = 1750;

/**
 * Realtime per Ping (Wait time between two pings on all inactive tabs)
 *
 * @global string $config['us_realtime_non_wait']
 */
$config['us_realtime_non_wait'] = 12321;

/**
 * Default menustyle (<samp>1</samp>=large, <samp>2</samp>=small)
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global string $config['us_menustyle']
 */
$config['us_menustyle'] = '1';

/**
 * Debugging for XAJAX (DBG_XAJAX, false)
 *
 * Default: <samp>false</samp>
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global mixed $config['xajax_debug']
 */
$config['xajax_debug'] = false;

/**
 * Time in minutes a user can modify an entry within the work input without the system logging the modification
 *
 * Default: <samp>60</samp>
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global int $config['us_change_time']
 */
$config['us_change_time'] = 60;

/**
 * Use max() for every field not within the group by() section (<samp>'max'</samp>, <samp>''</samp>)
 *
 * Default: <samp>'max'</samp>
 *
 * If the SQL mode of MySQL does not have ONLY_FULL_GROUP_BY set use '', else 'max'.
 *
 * This may speed up certain requests.
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global string $config['us_mysql_max_on_group']
 */
$config['us_mysql_max_on_group'] = 'max';

/**
 * Max rows for autocomplete
 *
 * Default: <samp>100</samp>
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global int $config['us_max_rows_autocomplete']
 */
$config['us_max_rows_autocomplete'] = 100;

/**
 * Max rows for project_search
 *
 * Default: <samp>1000</samp>
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global int $config['us_max_rows_project_search']
 */
$config['us_max_rows_project_search'] = 1000;

/**
 * Show a warning if not in HTTPS mode
 *
 * Default: <samp>true</samp>
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global string $config['us_https_warning']
 */
$config['us_https_warning'] = true;

/**
 * Send action log
 *
 * Default: <samp>true</samp>
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global string $config['send_action_log']
 */
$config['send_action_log'] = true;

/**
 * Time in milliseconds before a table is loaded
 *
 * Default: <samp>300</samp>
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global int $config['us_wait_table_load']
 */
$config['us_wait_table_load'] = 200;

/**
 * Time in milliseconds before a live search is performed
 *
 * Default: <samp>300</samp>
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global int $config['us_wait_live_search']
 */
$config['us_wait_live_search'] = 300;

/**
 * Domain for Kerberos (ntlm) auth
 *
 * Default: <samp></samp>
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global string $config['kerberos_ntlm_domain']
 */
$config['kerberos_ntlm_domain'] = '';
$config['kerberos_ntlm_domain_after'] = false;

/**
 * Host for LDAP auth
 *
 * Default: <samp></samp>
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global string $config['ldap_auth_host']
 */
$config['ldap_auth_host'] = '';
$config['ldap_auth_security'] = 0;
$config['ldap_auth_update_us_password'] = false;

/**
 * Login - Show list of active users
 *
 * Default: <samp>false</samp>
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global string $config['us_logoffall_active_only']
 */
$config['us_logoffall_active_only'] = false;

/**
 * For correspondence - Max time (in hours) to look for changes in file, to update the fulltext
 *
 * Default: <samp>24</samp>
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global int $config['correspondence_max_update_fulltext']
 */
$config['correspondence_max_update_fulltext'] = 24;

/**
 * For correspondence - Interval (in minutes) to look for changes in file, to update the fulltext
 *
 * Default: <samp>30</samp>
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global int $config['correspondence_update_fulltext_interval']
 */
$config['correspondence_update_fulltext_interval'] = 30;

/**
 * For correspondence - Scale image B_BILD, P_BILD size
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global int $config['correspondence_image_scale']
 */
$config['correspondence_image_scale'] = 1;

/**
 * https://developer.mozilla.org/en-US/docs/Web/Security/CSP/CSP_policy_directives
 *
 * Default: <samp>frame-options 'self'</samp>
 * Allow all: <samp>frame-ancestors *</samp>
 * Allow just one: <samp>frame-options 'self' http://example.com</samp>
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global string $config['content_security_policy']
 */
$config['content_security_policy'] = "frame-ancestors 'self'";

/**
 * untermStrich user rights mode (<samp>1</samp>=Standard, <samp>2</samp>=SaaS v1, <samp>3</samp>=SaaS v2)
 *
 * @global string $config['us_rights_mode']
 */
$config['us_rights_mode'] = 1;

/**
 * Max differenece in SDD input, before untermStrich creates a successor
 *
 * Default: <samp>0.01</samp>
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global float $config['max_differenece_before_successor']
 */
$config['max_differenece_before_successor'] = 0.01;

/**
 *******************************************************************************
 * Cache
 *******************************************************************************
 */

/**
 * Cache refresh time
 *
 * Time in seconds how long a cache entry stays valid.
 *
 * <i>USE THIS TO MODIFY UNTERMSTRICH</i>
 * @global int $config['cache_time']
 */
$config['cache_time'] = 3600;

/**
 * Currency symbol if no currency system active
 *
 * @global string $config['global_currency_symbol']
 */
$config['global_currency_symbol'] = '€';

/**
 *******************************************************************************
 * File path security
 *******************************************************************************
 */

/**
 * Defines paths where an upload or download is always blocked
 *
 * @global string $config['us_block_paths']
 */
$config['us_block_paths'] = array(
    '^...Windows',
    '^...system.sav',
    '^C..Programme',
    '^C..Program Files',
    '^C..Programmer',
    '^C..Programmes',
    '^C..Programmi',
    '^C..Programfiler',
    '^C..Arquivos de Programas',
    '^C..Archivos de programa',
    '^C..Program',

    '^C..Apache24',
    '^/Library',
    '^/var/www/html',

    '^/Applications',
    '^/System',
    '^/bin',
    '^/etc',
    '^/mach_kernel',
    '^/net',
    '^/private',
    '^/sbin',
    '^/tmp',
    '^/usr',
    '\.\./',
    '\.\.\\\\',
);

/**
 * Defines path file extensions where an upload or download is always blocked
 *
 * @global string $config['us_block_path_extensions']
 */
$config['us_block_path_extensions'] = array(
    'php',
    'ini',
    'apk',
    'app',
    'bat',
    'bin',
    'cmd',
    'com',
    'dll',
    'exe',
    'ipa',
    'js',
    'lnk',
    'msi',
    'reg',
    'scr',
    'sct',
    'server',
    'so',
    'vbs',
    'vbscript',
    'ws',
    'wsf',
);

/**
 * Defines if an upload or download outside of us_datapath is always blocked
 *
 * @global boolean $config['us_block_not_datapath']
 */
$config['us_block_not_datapath'] = false;

/**
 * Allows to set a custom (By the client) js file
 *
 * @global boolean $config['custom_js_file']
 */
$config['custom_js_file'] = '';

/**
 * Latin1 file mode for Windows Server
 *
 * @global boolean $config['windows_latin1']
 */
$config['windows_latin1'] = true;

/**
 * Advanced is_readable - Test via @fopen / @opendir
 *
 * @global boolean $config['advanced_is_readable']
 */
$config['advanced_is_readable'] = false;

/**
 * Deactivate iconv
 *
 * @global boolean $config['deactivate_iconv']
 */
$config['deactivate_iconv'] = false;

/**
 * Show valid (Cad_file_types and Plot_file_types) only in select for existing files
 *
 * @global boolean $config['drawings_show_valid_only']
 */
$config['drawings_show_valid_only'] = true;

/**
 * Min free diskpace of cache directory - In %
 *
 * @global int $config['min_free_diskpace']
 */
$config['min_free_diskpace'] = 3;

/**
 * Write config.php
 *
 * @global mixed $config['us_write_config']    One of false, "write", "init"
 */
$config['us_write_config'] = false;



$config['unittests'] = array();
$config['unittests']['O365'] = array();
$config['unittests']['O365']['username'] = '';
$config['unittests']['O365']['password'] = '';
