- Extensive refactoring of the existing importer
- Configuration of import with settings.yml instead of editing code
- Supports importing from phpBB 3.0.x and 3.1.x
- Imports all attachments (not just the ones embedded with [attachment])
from posts and private messages
- Imports all existing attachments without the need to configure allowed
file extensions or file sizes
- Imports polls
- Imports bookmarks
- Imports sticky topics and (global) announcements as pinned topics
- Imports categories in the original order and sets the content of the
category description topic
- Sets the creation date of category description topics to the creation
date of the first topic in each category
- Imports additional user attributes: last seen date, registration
IP address, website, date of birth, location
- Optionally set the user's name to its username
- Users that didn't activate their account in phpBB3 are imported as
inactive users
- All imported, active users are automatically approved
- Users that were deactivated in phpBB3 get suspended for 200 years
during the import
- Anonymous user can be imported as suspended users instead of the
system user
- Forums of type "link" are not imported as categories anymore
- Internal links to posts get rewritten during the import (previously
only links to topics got rewritten)
- Ordered lists with BBCode [list=a] (which are unsupported in
Discourse) get imported as if they would be [list=1]
- Importing of avatars, attachments, private messages, polls and
bookmarks can be disabled via configuration file
- Optional fixing of private messages for forums that have been upgraded
from phpBB2 prevents the import of duplicate messages and tries to
group related messages into topics
- Table prefix (default: phpbb) is configurable
- Most of phpBB's default smilies are mapped to Emojis and all other
smilies get uploaded and embedded as images. Smiley mappings can be
added or overridden in the settings.yml file.
- Move some methods into their own classes in order to make it easier
to reuse them outside of classes extending the base importer. For
compatibility reasons the old methods are still in the base importer
and delegate to the new objects. The following methods and hashes were
extracted:
- all the lookup maps for existing and imported data
- all the methods used for uploads and attachments
- No need to store failed users and groups. This information wasn't
used anyway.
- Print progress instead of category names when importing categories.
- Allow importers to override if bbcode_to_md should be used (until now
it always used ARGV)
- Allow importers to add additional site settings that automatically get
restored after the importer finishes.
- Show how many posts and messages are imported per minute. This should
help detecting when the import is slowing down and needs to be
restarted.
- Use max_image_width and max_image_height from settings instead of
hard-coded values for uploaded images.
The FallbackLocaleList object tells I18n::Backend::Fallbacks what order the
languages should be attempted in. Because of the translate_accelerator patch,
the SiteSetting.default_locale is *not* guaranteed to be fully loaded after the
server starts, so a call to ensure_loaded! is added after the locale is set for
the current user.
The declarations of config.i18n.fallbacks = true in the environment files were
actually garbage, because the I18n.default_locale was
SiteSetting.default_locale, so there was nothing to fall back to. *derp*
This patch sets I18n.defaultLocale in the Discourse.start() script block (it
was formerly always 'en') to SiteSetting.default_locale, and patches
translate() to perform fallback to defaultLocale followed by english.
Additionally, when enable_verbose_localization() is called, no fallbacks will
be performed.
It also memoizes the file loading operations in JsLocaleHelper and strips out
translations from the fallbacks that are also present in a prefered language,
to minimize file size.