b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (Version 1.8) [ class tree: evocore ] [ index: evocore ] [ all elements ]

Class: GeneralSettings

Source Location: /blogs/inc/MODEL/settings/_generalsettings.class.php

Class GeneralSettings

Inherited Properties, Constants, and Methods
Inherited Properties Inherited Methods Inherited Constants

Inherited From AbstractSettings

AbstractSettings::$allLoaded
AbstractSettings::$cache
AbstractSettings::$cacheByColKeys
AbstractSettings::$colKeyNames
AbstractSettings::$colValueName
AbstractSettings::$dbTableName
AbstractSettings::$_defaults_to_be_serialized

Inherited From AbstractSettings

AbstractSettings::AbstractSettings()
Constructor.
AbstractSettings::dbupdate()
Commit changed settings to DB.
AbstractSettings::delete()
Remove a setting.
AbstractSettings::delete_array()
Delete an array of values.
AbstractSettings::get()
Get a setting from the DB settings table.
AbstractSettings::get_cond()
Only set the first variable (passed by reference) if we could retrieve a setting.
AbstractSettings::get_default()
Get the default for the last key of $colKeyNames
AbstractSettings::load_all()
Load all settings, disregarding the derived classes setting of $cacheByColKeys
  • useful if you know that you want to get
all user settings for example.
AbstractSettings::reset()
Reset cache (includes settings to be written to DB).
AbstractSettings::restore_defaults()
Delete values for $_defaults in DB.
AbstractSettings::set()
Temporarily sets a setting (dbupdate() writes it to DB).
AbstractSettings::set_array()
Set an array of values.
AbstractSettings::_load()
Loads the settings. Not meant to be called directly, but gets called when needed.

[ Top ]
Property Summary
array   $_defaults   The default settings to use, when a setting is not given in the database.

[ Top ]
Method Summary
GeneralSettings   GeneralSettings()   Constructor.

[ Top ]
Properties
array   $_defaults = array(
'admin_skin' => 'legacy',

'antispam_last_update' => '2000-01-01 00:00:00',
'antispam_threshold_publish' => '-90',
'antispam_threshold_delete' => '100', // do not delete by default!
'antispam_block_spam_referers' => '1',

'archive_mode' => 'monthly',
'AutoBR' => '0',
'auto_prune_stats' => '30', // days (T_hitlog and T_sessions)

'fm_enabled' => '1',
'fm_enable_create_dir' => '1',
'fm_enable_create_file' => '0',
'fm_enable_roots_blog' => '1',
// 'fm_enable_roots_group' => '0', // TO DO
'fm_enable_roots_user' => '0',

'fm_showtypes' => '0',
'fm_showfsperms' => '0',

'fm_default_chmod_file' => '664', // Needs UI
'fm_default_chmod_dir' => '775', // Needs UI

'links_extrapath' => '0',

'newusers_canregister' => '0',
'newusers_mustvalidate' => '1',
'newusers_revalidate_emailchg' => '0',
'newusers_level' => '1',

'permalink_type' => 'urltitle',
'posts_per_page' => '5',
'regexp_filename' => '^[a-zA-Z0-9\-_.]+$', // TODO: accept spaces and special chars / do full testing on this
'regexp_dirname' => '^[a-zA-Z0-9\-_]+$', // TODO: accept spaces and special chars / do full testing on this
'reloadpage_timeout' => '300',
'time_difference' => '0',
'timeout_sessions' => '604800', // seconds (604800 == 7 days)
'upload_enabled' => '1',
'upload_maxkb' => '100',
'user_minpwdlen' => '5',
'what_to_show' => 'posts',

'webhelp_enabled' => '1',
)
[line 56]

The default settings to use, when a setting is not given in the database.

API Tags:
Access:  protected

Information Tags:
Todo:  Allow overriding from /conf/_config_TEST.php?

Redefinition of:
AbstractSettings::$_defaults
Default settings.

[ Top ]
Methods
Constructor GeneralSettings  [line 115]

  GeneralSettings GeneralSettings( )

Constructor.

This loads the general settings and checks db_version.

It will also turn off error-reporting/halting of the DB object temporarily to present a more decent error message if tables do not exist yet.

Because the DB object itself creates a connection when it gets created "Error selecting database" occurs before we can check for it here.



[ Top ]

Documentation generated on Tue, 18 Dec 2007 23:14:57 +0100 by phpDocumentor 1.4.0