[ Index ]

PHP Cross Reference of phpBB-3.2.0-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: 513 lines (16 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 20 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()

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

return: string Avatar image
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)

phpbb_hash($password)   X-Ref
Hash the password

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

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

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

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

Deprecated, use filesystem class instead

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

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

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

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.

return: null
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

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

return: int|bool        Returns the log_id, if the entry was added to the database, false otherwise.
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

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.

return: null
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

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.

return: null
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

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.

return: mixed    The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the
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

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.

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

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.

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

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

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

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.

return: int        The plural-case we need to use for the number plural-rule combination
param: $rule        int            ID of the plural rule we want to use, see http://wiki.phpbb.com/Plural_Rules#Plural_Rules
param: $number    int|float    The number we want to get the plural case for. Float numbers are floored.

phpbb_pcre_utf8_support()   X-Ref

return: bool Always true



Generated: Sun Feb 19 19:47:08 2017 Cross-referenced by PHPXref 0.7.1