[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/includes/ -> functions_convert.php (summary)

(no description)

Copyright: (c) 2006 phpBB Group
License: http://opensource.org/licenses/gpl-license.php GNU Public License
Version: $Id$
File Size: 2479 lines (62 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 71 functions

  dec()
  inc()
  is_positive()
  not()
  str_to_bool()
  is_empty()
  str_to_primary_group()
  is_item_locked()
  days_to_seconds()
  is_user_anonymous()
  auto_id()
  set_user_type()
  minutes_to_hours()
  get_group_id()
  gen_email_hash()
  is_topic_locked()
  make_uid()
  validate_website()
  null_to_zero()
  null_to_str()
  get_config_value()
  decode_ip()
  decode_ban_ip()
  mimetype()
  remote_avatar_dims()
  import_avatar_gallery()
  import_attachment_files()
  attachment_forum_perms()
  base64_unpack()
  _import_check()
  import_attachment()
  import_rank()
  import_smiley()
  import_avatar()
  get_image_dim()
  get_smiley_width()
  get_smiley_height()
  get_smiley_dim()
  get_avatar_width()
  get_avatar_height()
  get_avatar_dim()
  get_upload_avatar_dim()
  get_gallery_avatar_dim()
  get_remote_avatar_dim()
  set_user_options()
  make_unique_filename()
  words_unique()
  add_user_group()
  user_group_auth()
  get_config()
  restore_config()
  update_folder_pm_count()
  path()
  extract_variables_from_file()
  get_path()
  compare_table()
  mass_auth()
  update_unread_count()
  add_default_groups()
  sync_post_count()
  add_bots()
  update_dynamic_config()
  update_topics_posted()
  fix_empty_primary_groups()
  remove_invalid_users()
  convert_bbcode()
  copy_file()
  copy_dir()
  relative_base()
  get_smiley_display()
  fill_dateformat()

Functions
Functions that are not part of a class:

dec($var)   X-Ref
Return the preceding value


inc($var)   X-Ref
Return the next value


is_positive($n)   X-Ref
Return whether the value is positive


not($var)   X-Ref
Boolean inverse of the value


str_to_bool($str)   X-Ref
Convert a textual value to it's equivalent boolean value

param: string $str String to convert (converts yes, on, y, 1 and true to boolean true)
return: boolean The equivalent value

is_empty($mixed)   X-Ref
Function to mimic php's empty() function (it is the same)


str_to_primary_group($status)   X-Ref
Convert the name of a user's primary group to the appropriate equivalent phpBB group id

param: string $status The name of the group
return: int The group_id corresponding to the equivalent group

is_item_locked($bool)   X-Ref
Convert a boolean into the appropriate phpBB constant indicating whether the item is locked


days_to_seconds($days)   X-Ref
Convert a value from days to seconds


is_user_anonymous($user_id)   X-Ref
Determine whether a user is anonymous and return the appropriate new user_id


auto_id($pad = 0)   X-Ref
Generate a key value based on existing values

param: int $pad Amount to add to the maximum value
return: int Key value

set_user_type($user_active)   X-Ref
Convert a boolean into the appropriate phpBB constant indicating whether the user is active


minutes_to_hours($minutes)   X-Ref
Convert a value from minutes to hours


get_group_id($group_name)   X-Ref
Return the group_id for a given group name


gen_email_hash($email)   X-Ref
Generate the email hash stored in the users table

Note: Deprecated, calls should directly go to phpbb_email_hash()

is_topic_locked($bool)   X-Ref
Convert a boolean into the appropriate phpBB constant indicating whether the topic is locked


make_uid($timestamp)   X-Ref
Generate a bbcode_uid value


validate_website($url)   X-Ref
Validate a website address


null_to_zero($value)   X-Ref
Convert nulls to zeros for fields which allowed a NULL value in the source but not the destination


null_to_str($value)   X-Ref
Convert nulls to empty strings for fields which allowed a NULL value in the source but not the destination


get_config_value($config_name)   X-Ref
Get old config value


decode_ip($int_ip)   X-Ref
Convert an IP address from the hexadecimal notation to normal dotted-quad notation


decode_ban_ip($int_ip)   X-Ref
Reverse the encoding of wild-carded bans


mimetype($filename)   X-Ref
Determine the MIME-type of a specified filename
This does not actually inspect the file, but simply uses the file extension


remote_avatar_dims()   X-Ref
Obtain the dimensions of all remotely hosted avatars
This should only be called from execute_last
There can be significant network overhead if there are a large number of remote avatars


import_avatar_gallery($gallery_name = '', $subdirs_as_galleries = false)   X-Ref
No description

import_attachment_files($category_name = '')   X-Ref
No description

attachment_forum_perms($forum_id)   X-Ref
No description

base64_unpack($string)   X-Ref
No description

_import_check($config_var, $source, $use_target)   X-Ref
No description

import_attachment($source, $use_target = false)   X-Ref
No description

import_rank($source, $use_target = false)   X-Ref
No description

import_smiley($source, $use_target = false)   X-Ref
No description

import_avatar($source, $use_target = false, $user_id = false)   X-Ref
No description

get_image_dim($source)   X-Ref
Calculate the size of the specified image
Called from the following functions for calculating the size of specific image types


get_smiley_width($src)   X-Ref
Obtain the width of the specified smilie


get_smiley_height($src)   X-Ref
Obtain the height of the specified smilie


get_smiley_dim($source, $axis)   X-Ref
Obtain the size of the specified smilie (using the cache if possible) and cache the value


get_avatar_width($src, $func = false, $arg1 = false, $arg2 = false)   X-Ref
Obtain the width of the specified avatar


get_avatar_height($src, $func = false, $arg1 = false, $arg2 = false)   X-Ref
Obtain the height of the specified avatar


get_avatar_dim($src, $axis, $func = false, $arg1 = false, $arg2 = false)   X-Ref
No description

get_upload_avatar_dim($source, $axis)   X-Ref
Obtain the size of the specified uploaded avatar (using the cache if possible) and cache the value


get_gallery_avatar_dim($source, $axis)   X-Ref
Obtain the size of the specified gallery avatar (using the cache if possible) and cache the value


get_remote_avatar_dim($src, $axis)   X-Ref
Obtain the size of the specified remote avatar (using the cache if possible) and cache the value
Whilst it's unlikely that remote avatars will be duplicated, it is possible so caching seems the best option
This should only be called from a post processing step due to the possibility of network timeouts


set_user_options()   X-Ref
No description

make_unique_filename($filename)   X-Ref
Index messages on the fly as we convert them


words_unique(&$words)   X-Ref
No description

add_user_group($group_id, $user_id, $group_leader=false)   X-Ref
Adds a user to the specified group and optionally makes them a group leader
This function does not create the group if it does not exist and so should only be called after the groups have been created


user_group_auth($group, $select_query, $use_src_db)   X-Ref
Add users to the pre-defined "special" groups

param: string $group The name of the special group to add to
param: string $select_query An SQL query to retrieve the user(s) to add to the group

get_config()   X-Ref
Retrieves configuration information from the source forum and caches it as an array
Both database and file driven configuration formats can be handled
(the type used is specified in $config_schema, see convert_phpbb20.php for more details)


restore_config($schema)   X-Ref
Transfers the relevant configuration information from the source forum
The mapping of fields is specified in $config_schema, see convert_phpbb20.php for more details


update_folder_pm_count()   X-Ref
Update the count of PM's in custom folders for all users


path($path, $path_relative = true)   X-Ref
No description

extract_variables_from_file($_filename)   X-Ref
Extract the variables defined in a configuration file


get_path($src_path, $src_url, $test_file)   X-Ref
No description

compare_table($tables, $tablename, &$prefixes)   X-Ref
No description

mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting = ACL_NO)   X-Ref
Grant permissions to a specified user or group

param: string $ug_type user|group|user_role|group_role
param: mixed $forum_id forum ids (array|int|0) -> 0 == all forums
param: mixed $ug_id [int] user_id|group_id : [string] usergroup name
param: mixed $acl_list [string] acl entry : [array] acl entries : [string] role entry
param: int $setting ACL_YES|ACL_NO|ACL_NEVER

update_unread_count()   X-Ref
Update the count of unread private messages for all users


add_default_groups()   X-Ref
Add any of the pre-defined "special" groups which are missing from the database


sync_post_count($offset, $limit)   X-Ref
Sync post count. We might need to do this in batches.


add_bots()   X-Ref
Add the search bots into the database
This code should be used in execute_last if the source database did not have bots
If you are converting bots this function should not be called


update_dynamic_config()   X-Ref
Update any dynamic configuration variables after the conversion is finished


update_topics_posted()   X-Ref
Updates topics_posted entries


fix_empty_primary_groups()   X-Ref
Ensure that all users have a default group specified and update related information such as their colour


remove_invalid_users()   X-Ref
Cleanly remove invalid user entries after converting the users table...


convert_bbcode($message, $convert_size = true, $extended_bbcodes = false)   X-Ref
No description

copy_file($src, $trg, $overwrite = false, $die_on_failure = true, $source_relative_path = true)   X-Ref
No description

copy_dir($src, $trg, $copy_subdirs = true, $overwrite = false, $die_on_failure = true, $source_relative_path = true)   X-Ref
No description

relative_base($path, $is_relative = true, $line = false, $file = false)   X-Ref
No description

get_smiley_display()   X-Ref
No description

fill_dateformat($user_dateformat)   X-Ref
No description



Generated: Wed Oct 2 15:03:47 2013 Cross-referenced by PHPXref 0.7.1