Exemplo n.º 1
0
function fs_initialize_fs_callbacks()
{
    $FS_PATH = fs_get_firestats_path();
    if ($FS_PATH) {
        require_once $FS_PATH . '/php/plugins.php';
        fs_add_action("db_upgraded", "fs_plugin_db_update");
    }
}
Exemplo n.º 2
0
        $config_path = $FS_CONTEXT['WP_PATH'];
        require_once $config_path;
    }
    if (!defined('FS_DEFAULT_LANG')) {
        define('FS_DEFAULT_LANG', 'en_US');
    }
    require_once dirname(__FILE__) . '/auth.php';
    require_once dirname(__FILE__) . '/db-common.php';
    require_once dirname(__FILE__) . '/fs-gettext.php';
    require_once dirname(__FILE__) . '/db-config-utils.php';
    require_once dirname(__FILE__) . '/plugins.php';
    // will trigger the initialization of the database connection
    $fsdb =& fs_get_db_conn();
    require_once dirname(__FILE__) . '/utils.php';
    fs_init_language();
    fs_add_action("authenticated", "fs_init_language");
    fs_register_incremental_process('rebuild_cache', 'fs_rebuild_cache_calc_max', 'fs_rebuild_cache', 'fs_rebuild_cache_desc', array(FS_ABS_PATH . '/php/rebuild-db.php'));
    fs_register_incremental_process('rebuild_countries', 'fs_rebuild_countries_calc_max', 'fs_rebuild_country_codes', null, array(FS_ABS_PATH . '/php/ip2country.php'));
    fs_register_incremental_process('recalculate_search_engine_terms', 'fs_recalculate_search_engine_terms_calc_max', 'fs_recalculate_search_engine_terms', null, array(FS_ABS_PATH . '/php/searchengines.php'));
    $GLOBALS['fs_initialized'] = true;
}
function fs_init_language()
{
    global $FS_LANG;
    global $fs_gettext;
    $fsdb =& fs_get_db_conn();
    $current_lang = null;
    if ($fsdb->is_connected()) {
        $current_lang = fs_get_option('current_language');
    }
    if (empty($current_lang)) {