Exemple #1
0
if (isset($env['max_upload_mb'])) {
    $db->max_upload_megabytes($env['max_upload_mb']);
}
if (INTRANET) {
    $env['authentication'] = 'password';
}
//if (UPLOADS)
//  $env['collection_cache']['posts']['location'] = UPLOADS;
//if (UPLOADS)
//  $env['collection_cache']['identities']['location'] = UPLOADS;
// PHP5 only set server timezone
if (function_exists(timezone_abbreviations_list) && environment('timezone')) {
    if (setting('timezone')) {
        set_tz_by_offset(setting('timezone'));
    } else {
        set_tz_by_offset(environment('timezone'));
    }
}
/**
 * load virtual API methods
 */
global $api_methods, $api_method_perms;
$api_methods = array();
$api_method_perms = array();
$Method =& $db->model('Method');
$Method->find_by(array('eq' => 'like', 'function' => 'api_%'));
while ($m = $Method->MoveNext()) {
    $api_method_perms[$m->function] = array('table' => $m->resource, 'perm' => $m->permission);
    $api_methods[$m->function] = $m->code;
    $request->connect($m->route, array('action' => $m->function));
    if ($m->omb) {
}
if ($CSLH_Config['speaklanguage'] == "ger") {
    $CSLH_Config['speaklanguage'] = "German";
}
if ($CSLH_Config['speaklanguage'] == "ita") {
    $CSLH_Config['speaklanguage'] = "Italian";
}
if ($CSLH_Config['speaklanguage'] == "por") {
    $CSLH_Config['speaklanguage'] = "Portuguese";
}
if ($CSLH_Config['speaklanguage'] == "spn") {
    $CSLH_Config['speaklanguage'] = "Spanish";
}
// Set Time Date:
if (function_exists('date_default_timezone_set')) {
    date_default_timezone_set(set_tz_by_offset($CSLH_Config['offset']));
}
// Sessions:
$autostart = @ini_get('session.auto_start');
if ($autostart == 0) {
    require_once "class/sessionmanager.php";
    $sess = new SessionManager();
}
if (empty($CSLH_Config['smtp_host'])) {
    $CSLH_Config['smtp_host'] = "";
}
if ($CSLH_Config['smtp_host'] != "") {
    require_once "class/smtp.php";
}
$languagefile = "lang" . C_DIR . "lang-" . $CSLH_Config['speaklanguage'] . ".php";
if (!file_exists($languagefile)) {