[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

/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: 883 lines (26 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 33 functions

  get_user_avatar()
  phpbb_hash()
  phpbb_check_hash()
  phpbb_clean_path()
  tz_select()
  cache_moderators()
  update_foes()
  get_user_rank()
  get_remote_file()
  add_log()
  set_config()
  set_config_count()
  request_var()
  get_tables()
  phpbb_chmod()
  phpbb_is_writable()
  phpbb_is_absolute()
  phpbb_realpath()
  phpbb_get_plural_form()
  phpbb_pcre_utf8_support()
  set_var()
  delete_attachments()
  phpbb_unlink()
  display_reasons()
  upload_attachment()
  phpbb_checkdnsrr()
  phpbb_inet_ntop()
  phpbb_inet_pton()
  phpbb_email_hash()
  phpbb_load_extensions_autoloaders()
  phpbb_http_login()
  phpbb_build_hidden_fields_for_query_params()
  phpbb_delete_user_pms()

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

string    $mode                The mode defines which log_type is used and from which log the entry is retrieved
int        $forum_id            Mode 'mod' ONLY: forum id of the related item, NOT INCLUDED otherwise
int        $topic_id            Mode 'mod' ONLY: topic id of the related item, NOT INCLUDED otherwise
int        $reportee_id        Mode 'user' ONLY: user id of the reportee, NOT INCLUDED otherwise
string    $log_operation        Name of the operation
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    $request
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: int            $rule    ID of the plural rule we want to use, see https://area51.phpbb.com/docs/dev/3.3.x/language/plurals.html
param: int|float    $number    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

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


delete_attachments($mode, $ids, $resync = true)   X-Ref
Delete Attachments

param: string $mode can be: post|message|topic|attach|user
param: mixed $ids can be: post_ids, message_ids, topic_ids, attach_ids, user_ids
param: bool $resync set this to false if you are deleting posts or topics

phpbb_unlink($filename, $mode = 'file', $entry_removed = false)   X-Ref
Delete attached file


display_reasons($reason_id = 0)   X-Ref
Display reasons


upload_attachment($form_name, $forum_id, $local = false, $local_storage = '', $is_message = false, $local_filedata = false)   X-Ref
Upload Attachment - filedata is generated here
Uses upload class

param: string            $form_name        The form name of the file upload input
param: int            $forum_id        The id of the forum
param: bool            $local            Whether the file is local or not
param: string            $local_storage    The path to the local file
param: bool            $is_message        Whether it is a PM or not
param: array            $local_filedata    A filespec object created for the local file
return: array File data array

phpbb_checkdnsrr($host, $type = 'MX')   X-Ref
Wrapper for php's checkdnsrr function.

param: string $host    Fully-Qualified Domain Name
param: string $type    Resource record type to lookup
return: mixed        true if entry found,

phpbb_inet_ntop($in_addr)   X-Ref
No description

phpbb_inet_pton($address)   X-Ref
Wrapper for inet_pton()

Converts a human readable IP address to its packed in_addr representation
inet_pton() is supported by PHP since 5.1.0, since 5.3.0 also on Windows.

param: string $address    A human readable IPv4 or IPv6 address.
return: mixed        false if address is invalid,

phpbb_email_hash($email)   X-Ref
Hashes an email address to a big integer

param: string $email        Email address
return: string            Unsigned Big Integer

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.

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: Mon Nov 25 19:05:08 2024 Cross-referenced by PHPXref 0.7.1