/sources/database_action.php

Description
Functions
add_config_option (line 238)

Add a configuration option into the database, and initialise it with a specified value.

void add_config_option (ID_TEXT $human_name, ID_TEXT $name, ID_TEXT $type, SHORT_TEXT $eval, ID_TEXT $category, ID_TEXT $group, [BINARY $shared_hosting_restricted = 0], [SHORT_TEXT $data = ''])
  • ID_TEXT $human_name: The language code to the human name of the config option
  • ID_TEXT $name: The codename for the config option
  • ID_TEXT $type: The type of the config option
  • SHORT_TEXT $eval: The PHP code to execute to get the default value for this option. Be careful not to make a get_option loop.
  • ID_TEXT $category: The language code for the option category to store the option in
  • ID_TEXT $group: The language code for the option group to store the option in
  • BINARY $shared_hosting_restricted: Whether the option is not settable when on a shared ocportal-hosting environment
  • SHORT_TEXT $data: Extra data for the option
add_specific_permission (line 296)

Add a specific-permission, and apply it to every usergroup.

void add_specific_permission (ID_TEXT $section, ID_TEXT $name, [boolean $default = false], [boolean $not_even_mods = false])
  • ID_TEXT $section: The section the specific-permission is filled under
  • ID_TEXT $name: The codename for the specific-permission
  • boolean $default: Whether this permission is granted to all usergroups by default
  • boolean $not_even_mods: Whether this permission is not granted to supermoderators by default (something very sensitive)
config_option_exists (line 207)

Check if a config option exists.

  • return: Whether it exists
boolean config_option_exists (ID_TEXT $name)
  • ID_TEXT $name: The name of the option
delete_attachments (line 351)

Delete attachments solely used by the specified hook.

void delete_attachments (ID_TEXT $type, [?object $connection = NULL])
  • ID_TEXT $type: The hook
  • ?object $connection: The database connection to use (NULL: standard site connection)
delete_config_option (line 271)

Deletes a specified config option permanently from the database.

void delete_config_option (ID_TEXT $name)
  • ID_TEXT $name: The codename of the config option
delete_specific_permission (line 339)

Delete a specific-permission, and every usergroup is then relaxed from the restrictions of this permission.

void delete_specific_permission (ID_TEXT $name)
  • ID_TEXT $name: The codename of the permission
get_db_keywords (line 26)

Returns a list of keywords for all databases we might some day support.

  • return: List of pairs
array get_db_keywords ()
get_false_permissions (line 149)

Returns a list of pairs, for which permissions are false by default for ordinary usergroups.

  • return: List of pairs
array get_false_permissions ()
mass_delete_lang (line 381)

Deletes all language codes linked to by the specified table and attribute identifiers, if they exist.

void mass_delete_lang (ID_TEXT $table, array $attrs, ?object $connection)
  • ID_TEXT $table: The table
  • array $attrs: The attributes
  • ?object $connection: The database connection to use (NULL: standard site connection)
permission_exists (line 219)

Check if a specific permission exists.

  • return: Whether it exists
boolean permission_exists (ID_TEXT $name)
  • ID_TEXT $name: The name of the option
set_specific_permission (line 324)

Sets the specific-permission of a usergroup

void set_specific_permission (GROUP $group_id, ID_TEXT $permission, boolean $value, [?ID_TEXT $page = NULL], [?ID_TEXT $category_type = NULL], [?ID_TEXT $category_name = NULL])
  • GROUP $group_id: The usergroup having the permission set
  • ID_TEXT $permission: The codename of the permission
  • boolean $value: Whether the usergroup has the permission
  • ?ID_TEXT $page: The ID code for the page being checked (NULL: current page)
  • ?ID_TEXT $category_type: The category-type for the permission (NULL: none required)
  • ?ID_TEXT $category_name: The category-name/value for the permission (NULL: none required)

Documentation generated on Sun, 02 Jan 2011 23:12:51 +0000 by phpDocumentor 1.4.3