| Function Summary | |
|---|---|
| void | _import_check(mixed config_var, mixed source, mixed use_target) |
| void | add_bots() 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 |
| void | Add any of the pre-defined "special" groups which are missing from the database |
| void | add_user_group(mixed group_id, mixed user_id, bool group_leader) 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 |
| void | adjust_language_keys_callback(mixed matches) For replacing {L_*} strings with preg_replace_callback |
| void | attachment_forum_perms(mixed forum_id) |
| int | auto_id(int pad) Generate a key value based on existing values |
| void | base64_unpack(mixed string) |
| void | can_load_dll(mixed dll) Determine if we are able to load a specified PHP module and do so if possible |
| void | compare_table(mixed tables, mixed tablename, mixed prefixes) |
| void | connect_check_db(array dbms, mixed error_connect, mixed error, mixed dbms_details, mixed table_prefix, mixed dbhost, mixed dbuser, mixed dbpasswd, mixed dbname, mixed dbport, bool prefix_may_exist, bool load_dbal, bool unicode_check) Used to test whether we are able to connect to the database the user has specified and identify any problems (eg there are already tables with the names we want to use |
| void | convert_bbcode(mixed message, bool convert_size, bool extended_bbcodes) |
| void | copy_dir(mixed src, mixed trg, bool copy_subdirs, bool overwrite, bool die_on_failure, bool source_relative_path) |
| static void | copy_file(mixed src, mixed trg, bool overwrite, bool die_on_failure, bool source_relative_path) |
| void | days_to_seconds(mixed days) Convert a value from days to seconds |
| void | dbms_select(str default, bool only_20x_options) Generate the drop down of available database options |
| void | decode_ban_ip(mixed int_ip) Reverse the encoding of wild-carded bans |
| static void | decode_ip(mixed int_ip) Convert an IP address from the hexadecimal notation to normal dotted-quad notation |
| void | extract_variables_from_file(mixed _filename) Extract the variables defined in a configuration file |
| static void | fill_dateformat(mixed user_dateformat) |
| void | Ensure that all users have a default group specified and update related information such as their colour |
| void | gen_email_hash(mixed email) Generate the email hash stored in the users tableNote: Deprecated, calls should directly go to phpbb_email_hash() |
| void | get_available_dbms(bool dbms, bool return_unavailable, bool only_20x_options) Returns an array of available DBMS with some data, if a DBMS is specified it will only return data for that DBMS and will load its extension if necessary. |
| void | get_avatar_dim(mixed src, mixed axis, bool func, bool arg1, bool arg2) |
| void | get_avatar_height(mixed src, bool func, bool arg1, bool arg2) Obtain the height of the specified avatar |
| static void | get_avatar_width(mixed src, bool func, bool arg1, bool arg2) Obtain the width of the specified avatar |
| void | Return the bitfield calculated by the previous function |
| void | 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) |
| void | get_config_value(mixed config_name) Get old config value |
| static void | get_gallery_avatar_dim(mixed source, mixed axis) Obtain the size of the specified gallery avatar (using the cache if possible) and cache the value |
| void | get_group_id(mixed group_name) Return the group_id for a given group name |
| void | get_image_dim(mixed source) Calculate the size of the specified image Called from the following functions for calculating the size of specific image types |
| void | get_path(mixed src_path, mixed src_url, mixed test_file) |
| static void | get_remote_avatar_dim(mixed src, mixed axis) 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 |
| void | get_smiley_dim(mixed source, mixed axis) Obtain the size of the specified smilie (using the cache if possible) and cache the value |
| void | |
| void | get_smiley_height(mixed src) Obtain the height of the specified smilie |
| void | get_smiley_width(mixed src) Obtain the width of the specified smilie |
| void | get_tables(mixed db) Get tables of a database |
| void | get_upload_avatar_dim(mixed source, mixed axis) Obtain the size of the specified uploaded avatar (using the cache if possible) and cache the value |
| void | import_attachment(mixed source, bool use_target) |
| void | import_attachment_files(str category_name) |
| void | import_avatar(mixed source, bool use_target, bool user_id) |
| void | import_avatar_gallery(str gallery_name, bool subdirs_as_galleries) |
| void | import_rank(mixed source, bool use_target) |
| void | import_smiley(mixed source, bool use_target) |
| void | inc(mixed var) Return the next value |
| void | is_empty(mixed mixed) Function to mimic php's empty() function (it is the same) |
| void | is_item_locked(mixed bool) Convert a boolean into the appropriate phpBB constant indicating whether the item is locked |
| void | is_positive(mixed n) Return whether the value is positive |
| void | is_topic_locked(mixed bool) Convert a boolean into the appropriate phpBB constant indicating whether the topic is locked |
| void | is_user_anonymous(mixed user_id) Determine whether a user is anonymous and return the appropriate new user_id |
| void | make_uid(mixed timestamp) Generate a bbcode_uid value |
| void | make_unique_filename(mixed filename) Index messages on the fly as we convert them |
| void | mass_auth(string ug_type, mixed forum_id, mixed ug_id, mixed acl_list, int setting) Grant permissions to a specified user or group |
| void | mimetype(mixed filename) Determine the MIME-type of a specified filename This does not actually inspect the file, but simply uses the file extension |
| void | minutes_to_hours(mixed minutes) Convert a value from minutes to hours |
| void | not(mixed var) Boolean inverse of the value |
| void | null_to_str(mixed value) Convert nulls to empty strings for fields which allowed a NULL value in the source but not the destination |
| void | null_to_zero(mixed value) Convert nulls to zeros for fields which allowed a NULL value in the source but not the destination |
| void | path(mixed path, bool path_relative) |
| void | phpbb_attachment_category(mixed cat_id) Convert the attachment category constants This is only used if the Attachment MOD was installed |
| void | phpbb_attachment_forum_perms(mixed forum_permissions) Obtain list of forums in which different attachment categories can be used |
| void | phpbb_avatar_type(mixed type) Convert the avatar type constants |
| void | |
| void | phpbb_convert_authentication(mixed mode) Convert authentication user, group and forum table has to be filled in order to work |
| void | phpbb_convert_group_name(mixed group_name) Convert the group name, making sure to avoid conflicts with 3.0 special groups |
| void | phpbb_convert_group_type(mixed group_type) Convert the group type constants |
| void | phpbb_convert_topic_type(mixed topic_type) Convert the topic type constants |
| void | Copy thumbnails of uploaded images from the 2.0.x forum This is only used if the Attachment MOD was installed |
| void | Checks whether there are any usernames on the old board that would map to the same username_clean on phpBB3. |
| void | phpbb_disallowed_username(mixed username) Adjust 2.0.x disallowed names to 3.0.x format |
| void | Set forum flags - only prune old polls by default |
| void | phpbb_get_avatar_height(mixed user_avatar) Find out about the avatar's dimensions |
| void | phpbb_get_avatar_width(mixed user_avatar) Find out about the avatar's dimensions |
| void | phpbb_get_birthday(str birthday) Convert Birthday from Birthday MOD to phpBB Format |
| void | Obtain the path to uploaded files on the 2.0.x forum This is only used if the Attachment MOD was installed |
| void | phpbb_get_savebox_id(mixed user_id) Obtain the folder_id for the custom folder created to replace the savebox from 2.0.x (used to store saved private messages) |
| void | Transfer attachment specific configuration options These were not stored in the main config table on 2.0.x This is only used if the Attachment MOD was installed |
| void | phpbb_import_avatar(mixed user_avatar) Transfer avatars, copying the image if it was uploaded |
| void | Calculate the reason a user became inactive We can't actually tell the difference between a manual deactivation and one for profile changes from the data available to assume the latter |
| void | Calculate the date a user became inactive |
| void | Insert/Convert forums |
| void | phpbb_new_pm(mixed pm_type) Calculate whether a private message was new using the bitfield |
| void | Determine the last user to edit a post In practice we only tracked edits by the original poster in 2.0.x so this will only be set if they had edited their own post |
| void | phpbb_prepare_message(mixed message) Reparse the message stripping out the bbcode_uid values and adding new ones and setting the bitfield |
| void | phpbb_privmsgs_to_userid(mixed to_userid) Calculate the correct to_address field for private messages |
| void | phpbb_replace_size(mixed matches) |
| void | phpbb_set_default_encoding(mixed text) Same as phpbb_set_encoding, but forcing boards default language |
| void | phpbb_set_encoding(string text, bool grab_user_lang) Function for recoding text with the default language |
| void | phpbb_set_primary_group(mixed user_level) Set primary group. |
| void | phpbb_smilie_html_decode(mixed code) Just undos the replacing of '' |
| void | phpbb_unread_pm(mixed pm_type) Calculate whether a private message was unread using the bitfield |
| void | phpbb_user_id(mixed user_id) Return correct user id value Everyone's id will be one higher to allow the guest/anonymous user to have a positive id as well |
| void | relative_base(mixed path, bool is_relative, bool line, bool file) |
| void | 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 |
| void | Cleanly remove invalid user entries after converting the users table... |
| void | remove_remarks(mixed sql) remove_remarks will strip the sql comment lines out of an uploaded sql file |
| static void | restore_config(mixed schema) 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 |
| static void | |
| void | set_user_type(mixed user_active) Convert a boolean into the appropriate phpBB constant indicating whether the user is active |
| void | split_sql_file(mixed sql, mixed delimiter) split_sql_file will split an uploaded sql file into single sql statements. |
| boolean | str_to_bool(string str) Convert a textual value to it's equivalent boolean value |
| int | str_to_primary_group(string status) Convert the name of a user's primary group to the appropriate equivalent phpBB group id |
| void | sync_post_count(mixed offset, mixed limit) Sync post count. |
| void | Update any dynamic configuration variables after the conversion is finished |
| void | Update the count of PM's in custom folders for all users |
| void | Updates topics_posted entries |
| static void | Update the count of unread private messages for all users |
| void | user_group_auth(string group, string select_query, mixed use_src_db) Add users to the pre-defined "special" groups |
| void | utf8_new_case_fold(mixed text, str option) |
| static void | utf8_new_case_fold_nfkc(mixed text, str option) |
| mixed | utf8_new_normalize_nfc(mixed strings) A wrapper function for the normalizer which takes care of including the class if required and modifies the passed strings to be in NFC (Normalization Form Composition). |
| static void | validate_website(mixed url) Validate a website address |
| void | words_unique(mixed words) |
public void _import_check(mixed config_var, mixed source, mixed use_target)
public void add_bots()
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
public void add_default_groups()
Add any of the pre-defined "special" groups which are missing from the database
public void add_user_group(mixed group_id, mixed user_id, bool group_leader)
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
public void adjust_language_keys_callback(mixed matches)
For replacing {L_*} strings with preg_replace_callback
public void attachment_forum_perms(mixed forum_id)
public int auto_id(int pad)
Generate a key value based on existing values
public void base64_unpack(mixed string)
public void can_load_dll(mixed dll)
Determine if we are able to load a specified PHP module and do so if possible
public void compare_table(mixed tables, mixed tablename, mixed prefixes)
public void connect_check_db(array dbms, mixed error_connect, mixed error, mixed dbms_details, mixed table_prefix, mixed dbhost, mixed dbuser, mixed dbpasswd, mixed dbname, mixed dbport, bool prefix_may_exist, bool load_dbal, bool unicode_check)
Used to test whether we are able to connect to the database the user has specified and identify any problems (eg there are already tables with the names we want to use
public void convert_bbcode(mixed message, bool convert_size, bool extended_bbcodes)
public void copy_dir(mixed src, mixed trg, bool copy_subdirs, bool overwrite, bool die_on_failure, bool source_relative_path)
public static void copy_file(mixed src, mixed trg, bool overwrite, bool die_on_failure, bool source_relative_path)
public void days_to_seconds(mixed days)
Convert a value from days to seconds
public void dbms_select(str default, bool only_20x_options)
Generate the drop down of available database options
public void decode_ban_ip(mixed int_ip)
Reverse the encoding of wild-carded bans
public static void decode_ip(mixed int_ip)
Convert an IP address from the hexadecimal notation to normal dotted-quad notation
public void extract_variables_from_file(mixed _filename)
Extract the variables defined in a configuration file
public static void fill_dateformat(mixed user_dateformat)
public void fix_empty_primary_groups()
Ensure that all users have a default group specified and update related information such as their colour
public void gen_email_hash(mixed email)
Generate the email hash stored in the users table
Note: Deprecated, calls should directly go to phpbb_email_hash()
public void get_available_dbms(bool dbms, bool return_unavailable, bool only_20x_options)
Returns an array of available DBMS with some data, if a DBMS is specified it will only return data for that DBMS and will load its extension if necessary.
public void get_avatar_dim(mixed src, mixed axis, bool func, bool arg1, bool arg2)
public void get_avatar_height(mixed src, bool func, bool arg1, bool arg2)
Obtain the height of the specified avatar
public static void get_avatar_width(mixed src, bool func, bool arg1, bool arg2)
Obtain the width of the specified avatar
public void get_bbcode_bitfield()
Return the bitfield calculated by the previous function
public void get_config()
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)
public void get_config_value(mixed config_name)
Get old config value
public static void get_gallery_avatar_dim(mixed source, mixed axis)
Obtain the size of the specified gallery avatar (using the cache if possible) and cache the value
public void get_group_id(mixed group_name)
Return the group_id for a given group name
public void get_image_dim(mixed source)
Calculate the size of the specified image Called from the following functions for calculating the size of specific image types
public void get_path(mixed src_path, mixed src_url, mixed test_file)
public static void get_remote_avatar_dim(mixed src, mixed axis)
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
public void get_smiley_dim(mixed source, mixed axis)
Obtain the size of the specified smilie (using the cache if possible) and cache the value
public void get_smiley_display()
public void get_smiley_height(mixed src)
Obtain the height of the specified smilie
public void get_smiley_width(mixed src)
Obtain the width of the specified smilie
public void get_tables(mixed db)
Get tables of a database
public void get_upload_avatar_dim(mixed source, mixed axis)
Obtain the size of the specified uploaded avatar (using the cache if possible) and cache the value
public void import_attachment(mixed source, bool use_target)
public void import_attachment_files(str category_name)
public void import_avatar(mixed source, bool use_target, bool user_id)
public void import_avatar_gallery(str gallery_name, bool subdirs_as_galleries)
public void import_rank(mixed source, bool use_target)
public void import_smiley(mixed source, bool use_target)
public void inc(mixed var)
Return the next value
public void is_empty(mixed mixed)
Function to mimic php's empty() function (it is the same)
public void is_item_locked(mixed bool)
Convert a boolean into the appropriate phpBB constant indicating whether the item is locked
public void is_positive(mixed n)
Return whether the value is positive
public void is_topic_locked(mixed bool)
Convert a boolean into the appropriate phpBB constant indicating whether the topic is locked
public void is_user_anonymous(mixed user_id)
Determine whether a user is anonymous and return the appropriate new user_id
public void make_uid(mixed timestamp)
Generate a bbcode_uid value
public void make_unique_filename(mixed filename)
Index messages on the fly as we convert them
public void mass_auth(string ug_type, mixed forum_id, mixed ug_id, mixed acl_list, int setting)
Grant permissions to a specified user or group
public void mimetype(mixed filename)
Determine the MIME-type of a specified filename This does not actually inspect the file, but simply uses the file extension
public void minutes_to_hours(mixed minutes)
Convert a value from minutes to hours
public void not(mixed var)
Boolean inverse of the value
public void null_to_str(mixed value)
Convert nulls to empty strings for fields which allowed a NULL value in the source but not the destination
public void null_to_zero(mixed value)
Convert nulls to zeros for fields which allowed a NULL value in the source but not the destination
public void path(mixed path, bool path_relative)
public void phpbb_attachment_category(mixed cat_id)
Convert the attachment category constants This is only used if the Attachment MOD was installed
public void phpbb_attachment_forum_perms(mixed forum_permissions)
Obtain list of forums in which different attachment categories can be used
public void phpbb_avatar_type(mixed type)
Convert the avatar type constants
public void phpbb_check_username_collisions()
public void phpbb_convert_authentication(mixed mode)
Convert authentication user, group and forum table has to be filled in order to work
public void phpbb_convert_group_name(mixed group_name)
Convert the group name, making sure to avoid conflicts with 3.0 special groups
public void phpbb_convert_group_type(mixed group_type)
Convert the group type constants
public void phpbb_convert_topic_type(mixed topic_type)
Convert the topic type constants
public void phpbb_copy_thumbnails()
Copy thumbnails of uploaded images from the 2.0.x forum This is only used if the Attachment MOD was installed
public void phpbb_create_userconv_table()
Checks whether there are any usernames on the old board that would map to the same username_clean on phpBB3. Prints out a list if any exist and exits.
public void phpbb_disallowed_username(mixed username)
Adjust 2.0.x disallowed names to 3.0.x format
public void phpbb_forum_flags()
Set forum flags - only prune old polls by default
public void phpbb_get_avatar_height(mixed user_avatar)
Find out about the avatar's dimensions
public void phpbb_get_avatar_width(mixed user_avatar)
Find out about the avatar's dimensions
public void phpbb_get_birthday(str birthday)
Convert Birthday from Birthday MOD to phpBB Format
public void phpbb_get_files_dir()
Obtain the path to uploaded files on the 2.0.x forum This is only used if the Attachment MOD was installed
public void phpbb_get_savebox_id(mixed user_id)
Obtain the folder_id for the custom folder created to replace the savebox from 2.0.x (used to store saved private messages)
public void phpbb_import_attach_config()
Transfer attachment specific configuration options These were not stored in the main config table on 2.0.x This is only used if the Attachment MOD was installed
public void phpbb_import_avatar(mixed user_avatar)
Transfer avatars, copying the image if it was uploaded
public void phpbb_inactive_reason()
Calculate the reason a user became inactive We can't actually tell the difference between a manual deactivation and one for profile changes from the data available to assume the latter
public void phpbb_inactive_time()
Calculate the date a user became inactive
public void phpbb_insert_forums()
Insert/Convert forums
public void phpbb_new_pm(mixed pm_type)
Calculate whether a private message was new using the bitfield
public void phpbb_post_edit_user()
Determine the last user to edit a post In practice we only tracked edits by the original poster in 2.0.x so this will only be set if they had edited their own post
public void phpbb_prepare_message(mixed message)
Reparse the message stripping out the bbcode_uid values and adding new ones and setting the bitfield
public void phpbb_privmsgs_to_userid(mixed to_userid)
Calculate the correct to_address field for private messages
public void phpbb_replace_size(mixed matches)
public void phpbb_set_default_encoding(mixed text)
Same as phpbb_set_encoding, but forcing boards default language
public void phpbb_set_encoding(string text, bool grab_user_lang)
Function for recoding text with the default language
public void phpbb_set_primary_group(mixed user_level)
Set primary group. Really simple and only based on user_level (remaining groups will be assigned later)
public void phpbb_smilie_html_decode(mixed code)
Just undos the replacing of '<' and '>'
public void phpbb_unread_pm(mixed pm_type)
Calculate whether a private message was unread using the bitfield
public void phpbb_user_id(mixed user_id)
Return correct user id value Everyone's id will be one higher to allow the guest/anonymous user to have a positive id as well
public void relative_base(mixed path, bool is_relative, bool line, bool file)
public void remote_avatar_dims()
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
public void remove_invalid_users()
Cleanly remove invalid user entries after converting the users table...
public void remove_remarks(mixed sql)
remove_remarks will strip the sql comment lines out of an uploaded sql file
public static void restore_config(mixed schema)
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
public static void set_user_options()
public void set_user_type(mixed user_active)
Convert a boolean into the appropriate phpBB constant indicating whether the user is active
public void split_sql_file(mixed sql, mixed delimiter)
split_sql_file will split an uploaded sql file into single sql statements. Note: expects trim() to have already been run on $sql.
public boolean str_to_bool(string str)
Convert a textual value to it's equivalent boolean value
public int str_to_primary_group(string status)
Convert the name of a user's primary group to the appropriate equivalent phpBB group id
public void sync_post_count(mixed offset, mixed limit)
Sync post count. We might need to do this in batches.
public void update_dynamic_config()
Update any dynamic configuration variables after the conversion is finished
public void update_folder_pm_count()
Update the count of PM's in custom folders for all users
public void update_topics_posted()
Updates topics_posted entries
public static void update_unread_count()
Update the count of unread private messages for all users
public void user_group_auth(string group, string select_query, mixed use_src_db)
Add users to the pre-defined "special" groups
public void utf8_new_case_fold(mixed text, str option)
public static void utf8_new_case_fold_nfkc(mixed text, str option)
public mixed utf8_new_normalize_nfc(mixed strings)
A wrapper function for the normalizer which takes care of including the class if required and modifies the passed strings to be in NFC (Normalization Form Composition).
public static void validate_website(mixed url)
Validate a website address
public void words_unique(mixed words)