[ Index ]

PHP Cross Reference of phpBB-3.2.11-deutsch




/includes/ -> functions_compatibility.php (summary)

This file is part of the phpBB Forum Software package.

Copyright: (c) phpBB Limited
License: GNU General Public License, version 2 (GPL-2.0)
File Size: 735 lines (22 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 25 functions


Functions that are not part of a class:

get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = 'USER_AVATAR', $ignore_config = false, $lazy = false)   X-Ref
Get user avatar

param: string $avatar Users assigned avatar name
param: int $avatar_type Type of avatar
param: string $avatar_width Width of users avatar
param: string $avatar_height Height of users avatar
param: string $alt Optional language string for alt tag within image, can be a language key or text
param: bool $ignore_config Ignores the config-setting, to be still able to view the avatar in the UCP
param: bool $lazy If true, will be lazy loaded (requires JS)
return: string Avatar image

phpbb_hash($password)   X-Ref
Hash the password

param: string $password Password to be hashed
return: string|bool Password hash or false if something went wrong during hashing

phpbb_check_hash($password, $hash)   X-Ref
Check for correct password

param: string $password The password in plain text
param: string $hash The stored password hash
return: bool Returns true if the password is correct, false if not.

phpbb_clean_path($path)   X-Ref
Eliminates useless . and .. components from specified path.

Deprecated, use filesystem class instead

param: string $path Path to clean
return: string Cleaned path

tz_select($default = '', $truncate = false)   X-Ref
Pick a timezone

param: string        $default            A timezone to select
param: boolean        $truncate            Shall we truncate the options text
return: string        Returns the options for timezone selector only

cache_moderators()   X-Ref
Cache moderators. Called whenever permissions are changed
via admin_permissions. Changes of usernames and group names
must be carried through for the moderators table.

return: null

update_foes($group_id = false, $user_id = false)   X-Ref
Removes moderators and administrators from foe lists.

param: array|bool $group_id If an array, remove all members of this group from foe lists, or false to ignore
param: array|bool $user_id If an array, remove this user from foe lists, or false to ignore
return: null

get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank_img_src)   X-Ref
Get user rank title and image

param: int $user_rank the current stored users rank id
param: int $user_posts the users number of posts
param: string &$rank_title the rank title will be stored here after execution
param: string &$rank_img the rank image as full img tag is stored here after execution
param: string &$rank_img_src the rank image source is stored here after execution

get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port = 80, $timeout = 6)   X-Ref
Retrieve contents from remotely stored file

add_log()   X-Ref
Add log entry

param: string    $mode                The mode defines which log_type is used and from which log the entry is retrieved
param: int        $forum_id            Mode 'mod' ONLY: forum id of the related item, NOT INCLUDED otherwise
param: int        $topic_id            Mode 'mod' ONLY: topic id of the related item, NOT INCLUDED otherwise
param: int        $reportee_id        Mode 'user' ONLY: user id of the reportee, NOT INCLUDED otherwise
param: string    $log_operation        Name of the operation
param: array    $additional_data    More arguments can be added, depending on the log_type
return: int|bool        Returns the log_id, if the entry was added to the database, false otherwise.

set_config($config_name, $config_value, $is_dynamic = false, \phpbb\config\config $set_config = null)   X-Ref
Sets a configuration option's value.

Please note that this function does not update the is_dynamic value for
an already existing config option.

param: string $config_name   The configuration option's name
param: string $config_value  New configuration value
param: bool   $is_dynamic    Whether this variable should be cached (false) or
return: null

set_config_count($config_name, $increment, $is_dynamic = false, \phpbb\config\config $set_config = null)   X-Ref
Increments an integer config value directly in the database.

param: string $config_name   The configuration option's name
param: int    $increment     Amount to increment by
param: bool   $is_dynamic    Whether this variable should be cached (false) or
return: null

request_var($var_name, $default, $multibyte = false, $cookie = false, $request = null)   X-Ref
Wrapper function of \phpbb\request\request::variable which exists for backwards compatability.
See {@link \phpbb\request\request_interface::variable \phpbb\request\request_interface::variable} for
documentation of this function's use.

param: mixed            $var_name    The form variable's name from which data shall be retrieved.
param: mixed            $default    A default value that is returned if the variable was not set.
param: bool            $multibyte    If $default is a string this paramater has to be true if the variable may contain any UTF-8 characters
param: bool            $cookie        This param is mapped to \phpbb\request\request_interface::COOKIE as the last param for
param: \phpbb\request\request_interface|null|false    If an instance of \phpbb\request\request_interface is given the instance is stored in
return: mixed    The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the

get_tables($db)   X-Ref
Get tables of a database

phpbb_chmod($filename, $perms = CHMOD_READ)   X-Ref
Global function for chmodding directories and files for internal use

This function determines owner and group whom the file belongs to and user and group of PHP and then set safest possible file permissions.
The function determines owner and group from common.php file and sets the same to the provided file.
The function uses bit fields to build the permissions.
The function sets the appropiate execute bit on directories.

Supported constants representing bit fields are:

CHMOD_ALL - all permissions (7)
CHMOD_READ - read permission (4)
CHMOD_WRITE - write permission (2)
CHMOD_EXECUTE - execute permission (1)

NOTE: The function uses POSIX extension and fileowner()/filegroup() functions. If any of them is disabled, this function tries to build proper permissions, by calling is_readable() and is_writable() functions.

param: string    $filename    The file/directory to be chmodded
param: int    $perms        Permissions to set
return: bool    true on success, otherwise false

phpbb_is_writable($file)   X-Ref
Test if a file/directory is writable

This function calls the native is_writable() when not running under
Windows and it is not disabled.

param: string $file Path to perform write test on
return: bool True when the path is writable, otherwise false.

phpbb_is_absolute($path)   X-Ref
Checks if a path ($path) is absolute or relative

param: string $path Path to check absoluteness of
return: boolean

phpbb_realpath($path)   X-Ref
A wrapper for realpath

phpbb_get_plural_form($rule, $number)   X-Ref
Determine which plural form we should use.
For some languages this is not as simple as for English.

param: $rule        int            ID of the plural rule we want to use, see https://area51.phpbb.com/docs/dev/32x/language/plurals.html
param: $number    int|float    The number we want to get the plural case for. Float numbers are floored.
return: int        The plural-case we need to use for the number plural-rule combination

phpbb_pcre_utf8_support()   X-Ref

return: bool Always true

phpbb_load_extensions_autoloaders($phpbb_root_path)   X-Ref
Load the autoloaders added by the extensions.

param: string $phpbb_root_path Path to the phpbb root directory.

set_var(&$result, $var, $type, $multibyte = false)   X-Ref
Casts a variable to the given type.

phpbb_http_login($param)   X-Ref
Login using http authenticate.

param: array    $param        Parameter array, see $param_defaults array.
return: null

phpbb_build_hidden_fields_for_query_params($request, $exclude = null)   X-Ref
Converts query string (GET) parameters in request into hidden fields.

Useful for forwarding GET parameters when submitting forms with GET method.

It is possible to omit some of the GET parameters, which is useful if
they are specified in the form being submitted.

sid is always omitted.

param: \phpbb\request\request $request Request object
param: array $exclude A list of variable names that should not be forwarded
return: string HTML with hidden fields

phpbb_delete_user_pms($user_id)   X-Ref
Delete all PM(s) for a given user and delete the ones without references

param: int        $user_id    ID of the user whose private messages we want to delete
return: boolean        False if there were no pms found, true otherwise.

Generated: Wed Nov 11 20:33:01 2020 Cross-referenced by PHPXref 0.7.1