170 return _elgg_services()->datalist->runFunctionOnce($functionname, $timelastupdatedcheck);
257 throw new \InstallationException(
"Unable to handle this request. This site is not configured or the database is down.");
269 $CONFIG->site_config_loaded =
true;
289 $install_root = str_replace(
"\\",
"/", dirname(dirname(dirname(__FILE__))));
291 'path' =>
"$install_root/",
292 'view_path' =>
"$install_root/views/",
293 'plugins_path' =>
"$install_root/mod/",
297 'viewpath' =>
"$install_root/views/",
298 'pluginspath' =>
"$install_root/mod/",
308 if (!isset(
$CONFIG->cookies)) {
311 if (!isset(
$CONFIG->cookies[
'session'])) {
312 $CONFIG->cookies[
'session'] = array();
314 $session_defaults = session_get_cookie_params();
315 $session_defaults[
'name'] =
'Elgg';
316 $CONFIG->cookies[
'session'] = array_merge($session_defaults,
$CONFIG->cookies[
'session']);
317 if (!isset(
$CONFIG->cookies[
'remember_me'])) {
318 $CONFIG->cookies[
'remember_me'] = array();
320 $session_defaults[
'name'] =
'elggperm';
321 $session_defaults[
'expire'] = strtotime(
"+30 days");
322 $CONFIG->cookies[
'remember_me'] = array_merge($session_defaults,
$CONFIG->cookies[
'remember_me']);
329 if (isset(
$CONFIG->dataroot)) {
331 $CONFIG->dataroot_in_settings =
true;
337 $CONFIG->dataroot_in_settings =
false;
339 if (isset(
$CONFIG->simplecache_enabled)) {
340 $CONFIG->simplecache_enabled_in_settings =
true;
342 $simplecache_enabled =
datalist_get(
'simplecache_enabled');
343 if ($simplecache_enabled !==
false) {
344 $CONFIG->simplecache_enabled = $simplecache_enabled;
346 $CONFIG->simplecache_enabled = 1;
348 $CONFIG->simplecache_enabled_in_settings =
false;
351 $system_cache_enabled =
datalist_get(
'system_cache_enabled');
352 if ($system_cache_enabled !==
false) {
353 $CONFIG->system_cache_enabled = $system_cache_enabled;
355 $CONFIG->system_cache_enabled = 1;
361 $CONFIG->i18n_loaded_from_cache =
false;
364 $CONFIG->entity_types = array(
'group',
'object',
'site',
'user');
372 $tests[] =
"{$CONFIG->path}engine/tests/ElggCoreConfigTest.php";
377 $hooks->registerHandler(
'unit_test',
'system',
'_elgg_config_test');
if($guid==elgg_get_logged_in_user_guid()) $name
datalist_get($name)
Get the value of a datalist element.
elgg_get_plugins_path()
Get the plugin path for this installation.
_elgg_config_test($hook, $type, $tests)
@access private
unset_config($name, $site_guid=0)
Removes a config setting.
datalist_set($name, $value)
Set the value for a datalist element.
elgg_set_config($name, $value)
Set an Elgg configuration value.
elgg_save_config($name, $value, $site_guid=0)
Save a configuration setting.
elgg_get_site_url($site_guid=0)
Get the URL for the current (or specified) site.
run_function_once($functionname, $timelastupdatedcheck=0)
Run a function one time per installation.
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
set_config($name, $value, $site_guid=0)
Add or update a config setting.
elgg_get_root_path()
Get the root directory path for this installation.
_elgg_load_site_config()
Loads configuration related to this site.
_elgg_load_application_config()
Loads configuration related to Elgg as an application.
get_config($name, $site_guid=0)
Gets a configuration value.
elgg_get_data_path()
Get the data directory path for this installation.
sanitise_filepath($path, $append_slash=true)
Sanitise file paths ensuring that they begin and end with slashes etc.
is_memcache_available()
Return true if memcache is available and configured.